本文整理汇总了C#中System.Windows.Input.QueryCursorEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# QueryCursorEventArgs类的具体用法?C# QueryCursorEventArgs怎么用?C# QueryCursorEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
QueryCursorEventArgs类属于System.Windows.Input命名空间,在下文中一共展示了QueryCursorEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: OnQueryCursor
/// <inheritdoc/>
protected internal override void OnQueryCursor(QueryCursorEventArgs e)
{
if (LinkIsClickable()) {
e.Handled = true;
e.Cursor = Cursors.Hand;
}
}
开发者ID:Gobiner,项目名称:ILSpy,代码行数:8,代码来源:VisualLineLinkText.cs
示例2: OnQueryCursor
//-------------------------------------------------------------------
//
// Private Methods
//
//----------------------------------------------------------------------
#region Private Methods
// QueryCursorEvent callback.
// If this Hyperlink is editable, use the editor cursor unless
// the control key is down.
private static void OnQueryCursor(object sender, QueryCursorEventArgs e)
{
Hyperlink link = (Hyperlink)sender;
if (link.IsEnabled && link.IsEditable)
{
if ((Keyboard.Modifiers & ModifierKeys.Control) == 0)
{
e.Cursor = link.TextContainer.TextSelection.TextEditor._cursor;
e.Handled = true;
}
}
}
开发者ID:sjyanxin,项目名称:WPFSource,代码行数:24,代码来源:Hyperlink.cs
示例3: OnQueryCursor
protected override void OnQueryCursor(QueryCursorEventArgs e)
{
base.OnQueryCursor(e);
if (_context != null) {
Cursor cursor = _context.Services.Tool.CurrentTool.Cursor;
if (cursor != null) {
e.Cursor = cursor;
e.Handled = true;
}
}
}
开发者ID:icsharpcode,项目名称:WpfDesigner,代码行数:11,代码来源:DesignPanel.cs
示例4: OnQueryCursorThunk
private static void OnQueryCursorThunk(object sender, QueryCursorEventArgs e)
{
Invariant.Assert(!e.Handled, "Unexpected: Event has already been handled.");
UIElement uie = sender as UIElement;
if (uie != null)
{
uie.OnQueryCursor(e);
}
else
{
ContentElement ce = sender as ContentElement;
if (ce != null)
{
ce.OnQueryCursor(e);
}
else
{
((UIElement3D)sender).OnQueryCursor(e);
}
}
}
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:24,代码来源:UIElement.cs
示例5: textArea_QueryCursor
void textArea_QueryCursor(object sender, QueryCursorEventArgs e)
{
throw new NotImplementedException();
}
开发者ID:chinax01,项目名称:x01.MelonEditor,代码行数:4,代码来源:SelectionMouseHandler.cs
示例6: OnQueryCursor
protected override void OnQueryCursor(QueryCursorEventArgs e)
{
if (FindNextInsertionPoint(e.GetPosition(this)) >= 0)
e.Cursor = Cursors.UpArrow;
else
e.Cursor = Cursors.Arrow;
e.Handled = true;
}
开发者ID:nataviva,项目名称:SharpDevelop-1,代码行数:8,代码来源:InsertionCursorLayer.cs
示例7: OnQueryCursor
// QueryCursorEvent handler
internal static void OnQueryCursor(object sender, QueryCursorEventArgs e)
{
TextEditor This = TextEditor._GetTextEditor(sender);
if (This == null)
{
return;
}
if (This.TextView == null)
{
return;
}
// Determine whether the cursor is over our render scope. In particular, we want to distinguish between
// being directly over our RenderScope (including content of that scope), and being over visual chrome
// between our UiScope and our RenderScope (such as scroll bars)
if (IsPointWithinInteractiveArea(This, Mouse.GetPosition(This.UiScope)))
{
// Mouse is moving over our render scope, so we apply one of
// editing cursors - IBeam when outside of selection, Arrow when within selection,
// Resize - when over table borders, etc.
// Otherwise (when we are not over the render scope) we do not
// respond to QueryCursor request, thus leaving it for other
// elements to decide.
e.Cursor = This._cursor;
e.Handled = true;
}
}
开发者ID:JianwenSun,项目名称:cc,代码行数:31,代码来源:TextEditorMouse.cs
示例8: NotifyDragOutsideQueryCursor
protected virtual void NotifyDragOutsideQueryCursor( object sender, QueryCursorEventArgs e )
{
e.Cursor = ( this.DropOutsideCursor != null )
? this.DropOutsideCursor
: Cursors.No;
if( this.DragOutsideQueryCursor != null )
{
this.DragOutsideQueryCursor( sender, e );
}
e.Handled = true;
}
开发者ID:wangws556,项目名称:duoduo-chat,代码行数:13,代码来源:DragSourceManager.cs
示例9: OnDraggedElement_QueryCursor
private void OnDraggedElement_QueryCursor( object sender, QueryCursorEventArgs e )
{
if( this.IsDragging )
{
if( ( this.CurrentDropTarget == null ) || ( !this.CurrentDropTarget.CanDropElement( this.DraggedElement ) ) )
{
this.NotifyDragOutsideQueryCursor( sender, e );
}
}
}
开发者ID:wangws556,项目名称:duoduo-chat,代码行数:10,代码来源:DragSourceManager.cs
示例10: OnQueryCursor
/// <inheritdoc/>
protected override void OnQueryCursor(QueryCursorEventArgs e) {
if (!CanClick)
return;
e.Handled = true;
e.Cursor = referenceSegment.IsLocal ? Cursors.Arrow : Cursors.Hand;
}
开发者ID:levisre,项目名称:dnSpy,代码行数:8,代码来源:ReferenceElementGenerator.cs
示例11: UpdateCursorPrivate
private bool UpdateCursorPrivate()
{
int timeStamp = Environment.TickCount;
QueryCursorEventArgs queryCursor = new QueryCursorEventArgs(this, timeStamp);
queryCursor.Cursor = Cursors.Arrow;
queryCursor.RoutedEvent=Mouse.QueryCursorEvent;
//ProcessInput has a linkdemand
_inputManager.Value.ProcessInput(queryCursor);
return queryCursor.Handled;
}
开发者ID:JianwenSun,项目名称:cc,代码行数:10,代码来源:MouseDevice.cs
示例12: m_rowResizerThumb_QueryCursor
private void m_rowResizerThumb_QueryCursor( object sender, QueryCursorEventArgs e )
{
FrameworkElement rowItem = ( FrameworkElement )this.DataContext;
if( rowItem == null )
return;
if( this.CanBeResized( this.Orientation ) )
{
DataGridContext dataGridContext = DataGridControl.GetDataGridContext( this );
if( dataGridContext != null )
{
TableView tableView = dataGridContext.DataGridControl.GetView() as TableView;
e.Cursor = ( ( tableView != null ) && ( this.Orientation == Orientation.Vertical ) )
? tableView.RowSelectorResizeNorthSouthCursor
: tableView.RowSelectorResizeWestEastCursor;
}
if( e.Cursor == null )
{
e.Cursor = ( this.Orientation == Orientation.Vertical )
? TableView.DefaultRowSelectorResizeNorthSouthCursor
: TableView.DefaultRowSelectorResizeWestEastCursor;
}
}
e.Handled = true;
}
开发者ID:Torion,项目名称:WpfExToolkit,代码行数:30,代码来源:RowSelector.cs
示例13: OnQueryCursor
protected override void OnQueryCursor(QueryCursorEventArgs e)
{
e.Handled = true;
e.Cursor = Cursors.Hand;
}
开发者ID:Alliance-Network,项目名称:Amoeba,代码行数:5,代码来源:AvalonEditHelperBase.cs
示例14: ColumnResizerThumb_QueryCursor
private void ColumnResizerThumb_QueryCursor( object sender, QueryCursorEventArgs e )
{
ColumnBase parentColumn = this.ParentColumn;
if( parentColumn == null )
return;
DataGridContext dataGridContext = this.DataGridContext;
bool showResizeCursor = !parentColumn.HasFixedWidth;
if( !showResizeCursor )
{
// Don't disable resizing if ColumnStretching can be disabled by an end-user resize.
showResizeCursor = ( dataGridContext != null ) && ( TableView.GetRemoveColumnStretchingOnResize( dataGridContext ) );
}
if( showResizeCursor )
{
if( dataGridContext != null )
{
UIViewBase uiViewBase = dataGridContext.DataGridControl.GetView() as UIViewBase;
e.Cursor = ( uiViewBase != null )
? uiViewBase.ColumnResizeWestEastCursor
: UIViewBase.DefaultColumnResizeWestEastCursor;
}
else
{
e.Cursor = UIViewBase.DefaultColumnResizeWestEastCursor;
}
e.Handled = true;
}
}
开发者ID:wangws556,项目名称:duoduo-chat,代码行数:35,代码来源:ColumnManagerCell.cs
示例15: OnQueryCursor
protected virtual void OnQueryCursor(QueryCursorEventArgs e);
开发者ID:jmreynolds,项目名称:SuperProductiveWPFApps,代码行数:1,代码来源:System.Windows.UIElement.cs
示例16: m_dragSourceManager_DragOutsideQueryCursor
private void m_dragSourceManager_DragOutsideQueryCursor( object sender, QueryCursorEventArgs e )
{
GroupByControl parentGBC = this.GetParentGroupByControl();
if( ( parentGBC == null ) || !parentGBC.IsGroupingModificationAllowed )
return;
DataGridContext dataGridContext = DataGridControl.GetDataGridContext( this );
if( ( dataGridContext != null ) && ( dataGridContext.DataGridControl != null ) )
{
UIViewBase uiViewBase = dataGridContext.DataGridControl.GetView() as UIViewBase;
e.Cursor = ( uiViewBase != null )
? uiViewBase.RemovingGroupCursor
: UIViewBase.DefaultGroupDraggedOutsideCursor;
}
else
{
e.Cursor = UIViewBase.DefaultGroupDraggedOutsideCursor;
}
}
开发者ID:wangws556,项目名称:duoduo-chat,代码行数:22,代码来源:GroupByItem.cs
示例17: OnQueryCursor
private void OnQueryCursor(object sender, QueryCursorEventArgs e)
{
if (_isSelecting || GetFixedPanelDocumentPage(e.GetPosition(_scope)) != null)
{
e.Cursor = Cursors.Cross;
}
else
{
e.Cursor = Cursors.Arrow;
}
e.Handled = true;
}
开发者ID:sjyanxin,项目名称:WPFSource,代码行数:13,代码来源:RubberbandSelector.cs
示例18: OnQueryCursor
protected internal virtual void OnQueryCursor(QueryCursorEventArgs e)
{
//TODO: VisualLineElement.OnQueryCursor()
throw new NotImplementedException();
}
开发者ID:chinax01,项目名称:x01.MelonEditor,代码行数:5,代码来源:VisualLineElement.cs
示例19: OnQueryCursor
private static void OnQueryCursor(object sender, QueryCursorEventArgs e)
{
FrameworkContentElement fce = (FrameworkContentElement) sender;
// We respond to querying the cursor by specifying the cursor set
// as a property on this element.
Cursor cursor = fce.Cursor;
if(cursor != null)
{
// We specify the cursor if the QueryCursor event is not
// handled by the time it gets to us, or if we are configured
// to force our cursor anyways. Since the QueryCursor event
// bubbles, this has the effect of overriding whatever cursor
// a child of ours specified.
if(!e.Handled || fce.ForceCursor)
{
e.Cursor = cursor;
e.Handled = true;
}
}
}
开发者ID:sjyanxin,项目名称:WPFSource,代码行数:22,代码来源:FrameworkContentElement.cs
示例20: OnQueryCursorOverride
private static void OnQueryCursorOverride(object sender, QueryCursorEventArgs e)
{
FrameworkElement frameworkElement = (FrameworkElement) sender;
Cursor cursor = frameworkElement.Cursor;
if (cursor == null || e.Handled && !frameworkElement.ForceCursor)
return;
e.Cursor = cursor;
e.Handled = true;
}
开发者ID:jchristian,项目名称:ui_events,代码行数:9,代码来源:FrameworkElement.cs
注:本文中的System.Windows.Input.QueryCursorEventArgs类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论