本文整理汇总了C#中System.Windows.QueryContinueDragEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# QueryContinueDragEventArgs类的具体用法?C# QueryContinueDragEventArgs怎么用?C# QueryContinueDragEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
QueryContinueDragEventArgs类属于System.Windows命名空间,在下文中一共展示了QueryContinueDragEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: OnQueryContinueDrag
protected override void OnQueryContinueDrag(QueryContinueDragEventArgs e)
{
base.OnQueryContinueDrag(e);
e.Action = DragAction.Cancel;
e.Handled = true;
}
开发者ID:ForNeVeR,项目名称:PoshConsole,代码行数:7,代码来源:ConsoleTextBox.EventHandlers.cs
示例2: triggerElement_QueryContinueDrag
private static void triggerElement_QueryContinueDrag(object sender, QueryContinueDragEventArgs e)
{
e.Action = DragAction.Drop;
if ((e.KeyStates & DragDropKeyStates.LeftMouseButton) != DragDropKeyStates.None)
e.Action = DragAction.Continue;
if (e.Action == DragAction.Drop)
_contentPresenter = null;
}
开发者ID:Mrding,项目名称:Ribbon,代码行数:8,代码来源:CursorBehavior.cs
示例3: OnPreviewQueryContinueDrag
protected override void OnPreviewQueryContinueDrag(QueryContinueDragEventArgs args)
{
base.OnPreviewQueryContinueDrag(args);
if (args.Action == DragAction.Cancel || args.Action == DragAction.Drop) {
CancelDrag();
} else if (args.Action == DragAction.Continue) {
Point p = MouseUtilities.GetMousePosition(this);
if ((p.Y < DRAG_MARGIN) || (p.Y > RenderSize.Height - DRAG_MARGIN)) {
if (_dragScrollTimer == null) {
_dragVelocity = DRAG_INITIAL_VELOCITY;
_dragScrollTimer = new DispatcherTimer();
_dragScrollTimer.Tick += TickDragScroll;
_dragScrollTimer.Interval = new TimeSpan(0, 0, 0, 0, (int)DRAG_INTERVAL);
_dragScrollTimer.Start();
}
}
}
}
开发者ID:kehh,项目名称:biolink,代码行数:19,代码来源:DragDropScrollViewer.cs
示例4: OnPreviewQueryContinueDrag
protected override void OnPreviewQueryContinueDrag(QueryContinueDragEventArgs args)
{
base.OnPreviewQueryContinueDrag(args);
if (args.Action == DragAction.Cancel || args.Action == DragAction.Drop)
{
CancelDrag();
}
else if (args.Action == DragAction.Continue)
{
Point p = MouseUtilities.GetMousePosition(this);
if ((p.Y < s_dragMargin) || (p.Y > RenderSize.Height - s_dragMargin))
{
if (_dragScrollTimer == null)
{
_dragVelocity = s_dragInitialVelocity;
_dragScrollTimer = new DispatcherTimer();
_dragScrollTimer.Tick += TickDragScroll;
_dragScrollTimer.Interval = new TimeSpan(0, 0, 0, 0, (int)s_dragInterval);
_dragScrollTimer.Start();
}
}
}
}
开发者ID:Saroko-dnd,项目名称:My_DZ,代码行数:24,代码来源:DragDropScrollViewer.cs
示例5: textArea_QueryContinueDrag
void textArea_QueryContinueDrag(object sender, QueryContinueDragEventArgs e)
{
try {
if (e.EscapePressed) {
e.Action = DragAction.Cancel;
} else if ((e.KeyStates & DragDropKeyStates.LeftMouseButton) != DragDropKeyStates.LeftMouseButton) {
e.Action = DragAction.Drop;
} else {
e.Action = DragAction.Continue;
}
e.Handled = true;
} catch (Exception ex) {
OnDragException(ex);
}
}
开发者ID:bbqchickenrobot,项目名称:AvalonEdit,代码行数:15,代码来源:SelectionMouseHandler.cs
示例6: DefaultQueryContinueDragHandler
public static void DefaultQueryContinueDragHandler(object sender, QueryContinueDragEventArgs e)
{
DataObjectExtensions.DefaultQueryContinueDrag(e);
}
开发者ID:kingpin2k,项目名称:MCS,代码行数:4,代码来源:DataObjectExtensions.cs
示例7: DragScope_QueryContinueDrag
void DragScope_QueryContinueDrag(object sender, QueryContinueDragEventArgs e)
{
if (this._dragHasLeftScope)
{
e.Action = DragAction.Cancel;
e.Handled = true;
}
}
开发者ID:angad,项目名称:PeopleBAWX,代码行数:8,代码来源:DragDropHandler.cs
示例8: OnQueryContinueDrag
/// <summary>
/// Virtual method reporting the query continue drag is going to happen
/// </summary>
protected internal virtual void OnQueryContinueDrag(QueryContinueDragEventArgs e) {}
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:4,代码来源:ContentElement.cs
示例9: OnQueryContinueDragThunk
private static void OnQueryContinueDragThunk(object sender, QueryContinueDragEventArgs e)
{
Invariant.Assert(!e.Handled, "Unexpected: Event has already been handled.");
UIElement uie = sender as UIElement;
if (uie != null)
{
uie.OnQueryContinueDrag(e);
}
else
{
ContentElement ce = sender as ContentElement;
if (ce != null)
{
ce.OnQueryContinueDrag(e);
}
else
{
((UIElement3D)sender).OnQueryContinueDrag(e);
}
}
}
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:24,代码来源:UIElement.cs
示例10: MouseElement_QueryContinueDrag
void MouseElement_QueryContinueDrag(object sender, QueryContinueDragEventArgs e) {
foreach (var m in mouseProcessors) {
if (e.Handled)
break;
m.PreprocessQueryContinueDrag(e);
}
if (!e.Handled)
defaultMouseProcessor.OnQueryContinueDrag(sender, e);
foreach (var m in mouseProcessors)
m.PostprocessQueryContinueDrag(e);
}
开发者ID:manojdjoshi,项目名称:dnSpy,代码行数:11,代码来源:HexMouseProcessorCollection.cs
示例11: DragSourceQueryContinueDrag
private void DragSourceQueryContinueDrag(object sender, QueryContinueDragEventArgs e)
{
UpdateWindowLocation();
}
开发者ID:bejumi,项目名称:OCTGN,代码行数:4,代码来源:FriendListItem.xaml.cs
示例12: DragScopeQueryContinueDrag
private void DragScopeQueryContinueDrag(object sender, QueryContinueDragEventArgs e)
{
if (!_dragHasLeftScope) return;
e.Action = DragAction.Cancel;
e.Handled = true;
}
开发者ID:bejumi,项目名称:OCTGN,代码行数:6,代码来源:FriendListItem.xaml.cs
示例13: PictureToAssign_OnQueryContinueDrag
private void PictureToAssign_OnQueryContinueDrag (object Sender, QueryContinueDragEventArgs E)
{
if (E.Action != DragAction.Continue)
{
DragStartPosition = new Point (0, 0);
IsDragging = false;
}
}
开发者ID:heinzsack,项目名称:DEV,代码行数:8,代码来源:BilderMapping.xaml.cs
示例14: OnDefaultQueryContinueDrag
/// <summary>
/// Default query continue drag during drag-and-drop operation.
/// </summary>
/// <remarks>
/// At this stage we do not know application's intended mouse
/// button combination for dragging. For default purposes we assume
/// that the DragDrop happens due to single mouse button press.
/// Hence if any two mouse buttons are pressed at any point of time,
/// then we cancel the drapdrop. Also if no mouse buttons are pressed at
/// any point of time, then we complete the drop. If an application intends
/// to privide multi-button press dragging (like dragging by pressing
/// both left and right buttons of mouse) applications will have
/// to handle (Preview)QueryContiueDragEvent to the allow
/// such valid combinations explicitly.
/// </remarks>
private void OnDefaultQueryContinueDrag(QueryContinueDragEventArgs e)
{
int mouseButtonDownCount = 0;
if ((e.KeyStates & DragDropKeyStates.LeftMouseButton) == DragDropKeyStates.LeftMouseButton)
{
mouseButtonDownCount++;
}
if ((e.KeyStates & DragDropKeyStates.MiddleMouseButton) == DragDropKeyStates.MiddleMouseButton)
{
mouseButtonDownCount++;
}
if ((e.KeyStates & DragDropKeyStates.RightMouseButton) == DragDropKeyStates.RightMouseButton)
{
mouseButtonDownCount++;
}
e.Action = DragAction.Continue;
if (e.EscapePressed ||
mouseButtonDownCount >= 2)
{
e.Action = DragAction.Cancel;
}
else if (mouseButtonDownCount == 0)
{
e.Action = DragAction.Drop;
}
}
开发者ID:JianwenSun,项目名称:cc,代码行数:44,代码来源:DragDrop.cs
示例15: RaiseQueryContinueDragEvent
/// <summary>
/// Raise QueryContinueDrag event for Tunel and Bubble.
/// </summary>
private void RaiseQueryContinueDragEvent(QueryContinueDragEventArgs args)
{
// Set PreviewQueryContinueDrag(Tunnel) first.
args.RoutedEvent=DragDrop.PreviewQueryContinueDragEvent;
// Raise the preview QueryContinueDrag event(Tunnel).
if (_dragSource is UIElement)
{
((UIElement)_dragSource).RaiseEvent(args);
}
else if (_dragSource is ContentElement)
{
((ContentElement)_dragSource).RaiseEvent(args);
}
else if (_dragSource is UIElement3D)
{
((UIElement3D)_dragSource).RaiseEvent(args);
}
else
{
throw new ArgumentException(SR.Get(SRID.ScopeMustBeUIElementOrContent), "scope");
}
// Set QueryContinueDrag(Bubble).
args.RoutedEvent = DragDrop.QueryContinueDragEvent;
// Raise QueryContinueDrag event(Bubble).
if (!args.Handled)
{
if (_dragSource is UIElement)
{
((UIElement)_dragSource).RaiseEvent(args);
}
else if (_dragSource is ContentElement)
{
((ContentElement)_dragSource).RaiseEvent(args);
}
else if (_dragSource is UIElement3D)
{
((UIElement3D)_dragSource).RaiseEvent(args);
}
else
{
throw new ArgumentException(SR.Get(SRID.ScopeMustBeUIElementOrContent), "scope");
}
}
// Call the default event handling method internally if no one handle the drag source events.
if (!args.Handled)
{
OnDefaultQueryContinueDrag(args);
}
}
开发者ID:JianwenSun,项目名称:cc,代码行数:56,代码来源:DragDrop.cs
示例16: OnQueryContinueDrag
void OnQueryContinueDrag(object sender, QueryContinueDragEventArgs e)
{
if ((e.KeyStates & DragDropKeyStates.LeftMouseButton) != DragDropKeyStates.LeftMouseButton)
{
e.Action = DragAction.Cancel;
}
}
开发者ID:Belgrath,项目名称:CoCEd,代码行数:7,代码来源:MainWindow.xaml.cs
示例17:
void IMouseProcessor.PostprocessQueryContinueDrag(QueryContinueDragEventArgs e) { }
开发者ID:manojdjoshi,项目名称:dnSpy,代码行数:1,代码来源:CompletionPresenter.cs
示例18: PreprocessQueryContinueDrag
public void PreprocessQueryContinueDrag(QueryContinueDragEventArgs e) {
IMouseProcessor processor = Content as IMouseProcessor;
if (processor != null) {
processor.PreprocessQueryContinueDrag(e);
}
}
开发者ID:omnimark,项目名称:PTVS,代码行数:6,代码来源:CompletionControl.xaml.cs
示例19: DragSource_QueryContinueDrag
private static void DragSource_QueryContinueDrag(object sender, QueryContinueDragEventArgs e)
{
if (e.Action == DragAction.Cancel || e.EscapePressed) {
DragAdorner = null;
EffectAdorner = null;
DropTargetAdorner = null;
}
}
开发者ID:GeoffEngelstein,项目名称:gong-wpf-dragdrop,代码行数:8,代码来源:DragDrop.cs
示例20: OnQueryContinueDrag
protected virtual void OnQueryContinueDrag (QueryContinueDragEventArgs e)
{
throw new NotImplementedException ();
}
开发者ID:alesliehughes,项目名称:olive,代码行数:4,代码来源:ContentElement.cs
注:本文中的System.Windows.QueryContinueDragEventArgs类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论