本文整理汇总了C#中System.Windows.GiveFeedbackEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# GiveFeedbackEventArgs类的具体用法?C# GiveFeedbackEventArgs怎么用?C# GiveFeedbackEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GiveFeedbackEventArgs类属于System.Windows命名空间,在下文中一共展示了GiveFeedbackEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ListBox_OnGiveFeedback
private void ListBox_OnGiveFeedback(object sender, GiveFeedbackEventArgs e)
{
if (Mouse.OverrideCursor != null)
Mouse.OverrideCursor = null;
Mouse.SetCursor(_closedHandCursor);
e.UseDefaultCursors = false;
e.Handled = true;
}
示例2: List_GiveFeedback
void List_GiveFeedback(object sender, GiveFeedbackEventArgs e)
{
if (adorner != null)
{
ListBoxItem lbl = sender as ListBoxItem;
var pos = lbl.PointFromScreen(GetMousePosition());
adorner.UpdatePosition(pos);
//e.Handled = true;
}
}
示例3: Label_GiveFeedback
private void Label_GiveFeedback(object sender, GiveFeedbackEventArgs e)
{
if (e.Effects == DragDropEffects.Copy)
{
e.UseDefaultCursors = false;
Mouse.SetCursor(Cursors.Pen);
}
else
e.UseDefaultCursors = true;
e.Handled = true;
}
示例4: OnGiveFeedback
protected override void OnGiveFeedback(GiveFeedbackEventArgs e)
{
base.OnGiveFeedback(e);
if (this.adorner != null)
{
Point curpos = MouseSimulator.GetCursorPosition();
Point point = this.border.PointFromScreen(curpos);
this.adorner.SetPosition(point.X, point.Y);
}
Cursor cursor = ((TextBlock)this.Resources["CursorClosedHand"]).Cursor;
Mouse.SetCursor(cursor);
e.Handled = true;
}
示例5: OnGiveFeedback
protected override void OnGiveFeedback(GiveFeedbackEventArgs e)
{
base.OnGiveFeedback(e);
if (e.Effects.HasFlag(DragDropEffects.Copy))
{
Mouse.SetCursor(Cursors.Cross);
}
else if (e.Effects.HasFlag(DragDropEffects.Move))
{
Mouse.SetCursor(Cursors.Pen);
}
else
{
Mouse.SetCursor(Cursors.No);
}
e.Handled = true;
}
示例6: triggerElement_GiveFeedback
private static void triggerElement_GiveFeedback(object sender, GiveFeedbackEventArgs e)
{
if (e.Effects == DragDropEffects.None)
{
e.UseDefaultCursors = true;
_isMouseOver = false;
}
else if (_isMouseOver)
{
Mouse.SetCursor(CreateCursor(_contentPresenter, 5, 5));
e.UseDefaultCursors = false;
}
else
{
Mouse.SetCursor(Cursors.Arrow);
e.UseDefaultCursors = false;
}
e.Handled = true;
}
示例7: OnGiveFeedback
private void OnGiveFeedback(object sender, GiveFeedbackEventArgs e)
{
if( _adorner != null )
{
_adorner.SetPosition( MouseEx.GetPosition( _dragSource ) );
}
}
示例8: textArea_GiveFeedback
void textArea_GiveFeedback(object sender, GiveFeedbackEventArgs e)
{
try {
e.UseDefaultCursors = true;
e.Handled = true;
} catch (Exception ex) {
OnDragException(ex);
}
}
示例9: DefaultGiveFeedback
public static void DefaultGiveFeedback(System.Windows.IDataObject data, GiveFeedbackEventArgs e)
{
bool flag1 = false;
bool flag2 = DataObjectExtensions.IsDropDescriptionDefault(data);
DropImageType dropImageType = DropImageType.Invalid;
if (!DataObjectExtensions.IsDropDescriptionValid(data) || flag2)
{
dropImageType = DataObjectExtensions.GetDropImageType(data);
flag1 = true;
}
if (DataObjectExtensions.IsShowingLayered(data))
{
e.UseDefaultCursors = false;
Mouse.SetCursor(Cursors.Arrow);
}
else
e.UseDefaultCursors = true;
if (DataObjectExtensions.InvalidateRequired(data) || !flag2 || dropImageType != DropImageType.None)
{
DataObjectExtensions.InvalidateDragImage(data);
DataObjectExtensions.SetInvalidateRequired(data, false);
}
if (flag1 && e.Effects != (DragDropEffects)dropImageType)
{
if (e.Effects == DragDropEffects.Copy)
DataObjectExtensions.SetDropDescription(data, DropImageType.Copy, "Copy", string.Empty);
else if (e.Effects == DragDropEffects.Link)
DataObjectExtensions.SetDropDescription(data, DropImageType.Link, "Link", string.Empty);
else if (e.Effects == DragDropEffects.Move)
DataObjectExtensions.SetDropDescription(data, DropImageType.Move, "Move", string.Empty);
else if (e.Effects == DragDropEffects.None)
DataObjectExtensions.SetDropDescription(data, DropImageType.None, (string)null, (string)null);
DataObjectExtensions.SetDropDescriptionIsDefault(data, true);
DataObjectExtensions.SetInvalidateRequired(data, true);
}
e.Handled = true;
}
示例10: OnGiveFeedback
/// <summary>
/// Virtual method reporting the give feedback is going to happen
/// </summary>
protected internal virtual void OnGiveFeedback(GiveFeedbackEventArgs e) {}
示例11: OnGiveFeedbackThunk
private static void OnGiveFeedbackThunk(object sender, GiveFeedbackEventArgs e)
{
Invariant.Assert(!e.Handled, "Unexpected: Event has already been handled.");
UIElement uie = sender as UIElement;
if (uie != null)
{
uie.OnGiveFeedback(e);
}
else
{
ContentElement ce = sender as ContentElement;
if (ce != null)
{
ce.OnGiveFeedback(e);
}
else
{
((UIElement3D)sender).OnGiveFeedback(e);
}
}
}
示例12: ellipse_GiveFeedback
private void ellipse_GiveFeedback(object sender, GiveFeedbackEventArgs e)
{
}
示例13: OnPreviewGiveFeedback
protected virtual void OnPreviewGiveFeedback(GiveFeedbackEventArgs e)
{
throw new NotImplementedException ();
}
示例14: DragSource_PreviewGiveFeedback
static void DragSource_PreviewGiveFeedback(object sender, GiveFeedbackEventArgs e)
{
// Can be used to set custom cursors
}
示例15: PreprocessGiveFeedback
public void PreprocessGiveFeedback(GiveFeedbackEventArgs e) {
IMouseProcessor processor = Content as IMouseProcessor;
if (processor != null) {
processor.PreprocessGiveFeedback(e);
}
}