本文整理汇总了C#中System.Windows.RoutedEvent类的典型用法代码示例。如果您正苦于以下问题:C# RoutedEvent类的具体用法?C# RoutedEvent怎么用?C# RoutedEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RoutedEvent类属于System.Windows命名空间,在下文中一共展示了RoutedEvent类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: SelectionCanvas
static SelectionCanvas()
{
FigureSelectedEvent =
EventManager.RegisterRoutedEvent("FigureSelected", RoutingStrategy.Bubble, typeof(FigureSelectedEventHandler), typeof(SelectionCanvas));
FiguresUpdatedEvent =
EventManager.RegisterRoutedEvent("FigureUpdated", RoutingStrategy.Bubble, typeof(FiguresUpdatedEventHandler), typeof(SelectionCanvas));
}
开发者ID:baluubas,项目名称:Magic,代码行数:7,代码来源:SelectionCanvas.cs
示例2: ExecutionConnectionDragEventArgs
protected ExecutionConnectionDragEventArgs(RoutedEvent routedEvent, object source, object node, object executionConnection, object executionConnector) :
base(routedEvent, source)
{
this.node = node;
this.draggedOutExecutionConnector = executionConnector;
this.executionConnection = executionConnection;
}
开发者ID:Nielk1,项目名称:FunctionalNodeGraphWPF,代码行数:7,代码来源:ExecutionConnectionDragEvents.cs
示例3: EventTriggerHandler
private EventTriggerHandler(FrameworkElement element, RoutedEvent routedEvent, IEnumerable<ITriggerAction> actions, BaseValueSource valueSource)
{
this.element = element;
this.routedEvent = routedEvent;
this.actions = actions;
this.valueSource = valueSource;
}
开发者ID:diab0l,项目名称:Granular,代码行数:7,代码来源:EventTrigger.cs
示例4: RaiseKeyboardEvent
public static void RaiseKeyboardEvent(this UIElement self, RoutedEvent evt, Key key)
{
self.RaiseEvent(new KeyEventArgs(Keyboard.PrimaryDevice, new FakePresentationSource(), 0, key)
{
RoutedEvent = evt
});
}
开发者ID:JackWangCUMT,项目名称:Plainion,代码行数:7,代码来源:UIElementExtensions.cs
示例5: RegisterRoutedEvent
// Registers a RoutedEvent with the given details
// NOTE: The Name must be unique within the given OwnerType
internal static RoutedEvent RegisterRoutedEvent(
string name,
RoutingStrategy routingStrategy,
Type handlerType,
Type ownerType)
{
Debug.Assert(GetRoutedEventFromName(name, ownerType, false) == null,
"RoutedEvent name must be unique within a given OwnerType");
lock (Synchronized)
{
// Create a new RoutedEvent
// Requires GlobalLock to access _countRoutedEvents
RoutedEvent routedEvent = new RoutedEvent(
name,
routingStrategy,
handlerType,
ownerType);
// Increment the count for registered RoutedEvents
// Requires GlobalLock to access _countRoutedEvents
_countRoutedEvents++;
AddOwner(routedEvent, ownerType);
return routedEvent;
}
}
开发者ID:krytht,项目名称:DotNetReferenceSource,代码行数:30,代码来源:GlobalEventManager.cs
示例6: BrushComboBox
static BrushComboBox()
{
SelectedIndexProperty = DependencyProperty.Register("SelectedIndex", typeof(int), typeof(BrushComboBox));
SelectedItemProperty = DependencyProperty.Register("SelectedItem", typeof(SolidColorBrush), typeof(BrushComboBox));
ColorChangedEvent = EventManager.RegisterRoutedEvent("ColorChanged", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(BrushComboBox));
IsEmptyColorProperty = DependencyProperty.Register("IsEmptyColor", typeof(bool), typeof(BrushComboBox));
}
开发者ID:Dr1N,项目名称:Whiteboard,代码行数:7,代码来源:BrushComboBox.xaml.cs
示例7: RoutedIdentifiedEventArgs
public RoutedIdentifiedEventArgs(RoutedEvent e, ClientIdentity clientId, object source)
: base(e, source)
{
if (clientId == null)
throw new NotSupportedException("clientId cannot be null.");
this.ClientId = clientId;
}
开发者ID:CodeByBerglund,项目名称:nai-framework,代码行数:7,代码来源:RoutedIdentifiedEventArgs.cs
示例8: RoutedDependencyPropertyChangedEventArgs
public RoutedDependencyPropertyChangedEventArgs(RoutedEvent routedEvent, DependencyProperty dependencyProperty, object oldValue, object newValue)
{
RoutedEvent = routedEvent;
DependencyProperty = dependencyProperty;
OldValue = oldValue;
NewValue = newValue;
}
开发者ID:cg123,项目名称:xenko,代码行数:7,代码来源:ScaleBar.cs
示例9: NavigationPanelItem
/// <summary>
/// Static constructor for the <see cref="NavigationPanelItem"/>
/// class registering dependency properties and events.
/// </summary>
static NavigationPanelItem()
{
DefaultStyleKeyProperty.OverrideMetadata(typeof(NavigationPanelItem), new FrameworkPropertyMetadata(typeof(NavigationPanelItem)));
NavigationPanelItemNameProperty = DependencyProperty.Register(
"NavigationPanelItemName", typeof(string), typeof(NavigationPanelItem));
ImageLocationProperty = DependencyProperty.Register(
"ImageLocation", typeof(string), typeof(NavigationPanelItem));
NavigationListProperty = DependencyProperty.Register(
"NavigationList", typeof(List<NavigationList>), typeof(NavigationList), new FrameworkPropertyMetadata(new List<NavigationList>()));
IsSelectedProperty = DependencyProperty.Register(
"IsSelected", typeof(bool), typeof(NavigationPanelItem));
CommandProperty = DependencyProperty.Register(
"Command", typeof(ICommand), typeof(NavigationPanelItem));
CommandParameterProperty = DependencyProperty.Register(
"CommandParameter", typeof(object), typeof(NavigationPanelItem));
CommandTargetProperty = DependencyProperty.Register(
"CommandTarget", typeof(UIElement), typeof(NavigationPanelItem));
ItemClickedEvent = EventManager.RegisterRoutedEvent(
"ItemClicked", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(NavigationPanelItem));
}
开发者ID:grantcolley,项目名称:wpfcontrols,代码行数:32,代码来源:NavigationPanelItem.cs
示例10: DialogClosingEventArgs
public DialogClosingEventArgs(DialogSession session, object parameter, RoutedEvent routedEvent, object source) : base(routedEvent, source)
{
if (session == null) throw new ArgumentNullException(nameof(session));
Session = session;
Parameter = parameter;
}
开发者ID:ItsJustSean,项目名称:MaterialDesignInXamlToolkit,代码行数:7,代码来源:DialogClosingEventArgs.cs
示例11: ConnectionDragEventArgs
protected ConnectionDragEventArgs(RoutedEvent routedEvent, object source,
ElementItem elementItem, ConnectorItem sourceConnectorItem)
: base(routedEvent, source)
{
_elementItem = elementItem;
_sourceConnectorItem = sourceConnectorItem;
}
开发者ID:4ux-nbIx,项目名称:gemini,代码行数:7,代码来源:ConnectionDragEventArgs.cs
示例12: PageChangedEventArgs
public PageChangedEventArgs(RoutedEvent EventToRaise, int OldPage, int NewPage, int TotalPages)
: base(EventToRaise)
{
_OldPage = OldPage;
_NewPage = NewPage;
_TotalPages = TotalPages;
}
开发者ID:modulexcite,项目名称:XAMLPagingControl,代码行数:7,代码来源:PageChangedEventArgs.cs
示例13: CommandSelector
static CommandSelector()
{
CommandProperty = DependencyProperty.Register(
"Command",
typeof(ICommand),
typeof(CommandSelector),
new FrameworkPropertyMetadata(OnCommandChanged) {
BindsTwoWayByDefault = true
}
);
CommandsSourceProperty = DependencyProperty.Register(
"CommandsSource",
typeof(object),
typeof(CommandSelector),
new PropertyMetadata(OnCommandsSourceChanged)
);
FilterProperty = DependencyProperty.Register(
"Filter",
typeof(object),
typeof(CommandSelector),
new PropertyMetadata(null, OnFilterChanged)
);
CommandChangedEvent = EventManager.RegisterRoutedEvent(
"CommandChanged",
RoutingStrategy.Bubble,
typeof(RoutedPropertyChangedEventHandler<ICommand>),
typeof(CommandSelector)
);
}
开发者ID:strager,项目名称:NoCap,代码行数:32,代码来源:CommandSelector.xaml.cs
示例14: RemoveHandler
public static void RemoveHandler(DependencyObject element, RoutedEvent routedEvent, Delegate handler)
{
if (element == null) { throw new ArgumentNullException("element"); }
var uie = element as UIElement;
if (uie != null)
{
uie.RemoveHandler(routedEvent, handler);
}
else
{
var ce = element as ContentElement;
if (ce != null)
{
ce.RemoveHandler(routedEvent, handler);
}
else
{
var u3d = element as UIElement3D;
if (u3d != null)
u3d.RemoveHandler(routedEvent, handler);
else
throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, "Invalid element {0}.", element.GetType()));
}
}
}
开发者ID:soukoku,项目名称:ModernWPF,代码行数:26,代码来源:EventUtil.cs
示例15: ConnectionDragEventArgs
protected ConnectionDragEventArgs(RoutedEvent routedEvent, object source, object node, object connection, object connector) :
base(routedEvent, source)
{
this.node = node;
this.draggedOutConnector = connector;
this.connection = connection;
}
开发者ID:Nielk1,项目名称:FunctionalNodeGraphWPF,代码行数:7,代码来源:ConnectionDragEvents.cs
示例16: RemoveWeakHandler
internal static void RemoveWeakHandler(
this UIElement source,
RoutedEvent routedEvent,
EventHandler<RoutedEventArgs> handler)
{
switch (routedEvent.Name)
{
case nameof(UIElement.GotKeyboardFocus):
GotKeyboardFocusEventManager.RemoveHandler(source, handler);
break;
case nameof(UIElement.MouseUp):
MouseUpEventManager.RemoveHandler(source, handler);
break;
case nameof(UIElement.PreviewMouseLeftButtonDown):
PreviewMouseLeftButtonDownEventManager.RemoveHandler(source, handler);
break;
case nameof(UIElement.MouseLeftButtonDown):
MouseLeftButtonDownEventManager.RemoveHandler(source, handler);
break;
case nameof(Control.MouseDoubleClick):
MouseDoubleClickEventManager.RemoveHandler(source, handler);
break;
default:
throw new ArgumentOutOfRangeException();
}
}
开发者ID:gitter-badger,项目名称:Gu.Wpf.NumericInput,代码行数:26,代码来源:WeakRoutedEventManager.generated.cs
示例17: RaiseCaptureEvent
static void RaiseCaptureEvent(Contact contact, RoutedEvent routedEvent, DependencyObject source, long timestamp)
{
ContactEventArgs args = new ContactEventArgs(contact, timestamp);
args.RoutedEvent = routedEvent;
args.Source = source;
MultitouchLogic.RaiseEvent(source, args);
}
开发者ID:zhuangfangwang,项目名称:ise,代码行数:7,代码来源:ContactsManager.cs
示例18: CommentRoutedEventArgs
public CommentRoutedEventArgs(RoutedEvent routedEvent, Comment c, CommentUC control, bool requiresDataRecontext)
: base(routedEvent)
{
Comment = c;
CommentControl = control;
this.RequiresDataRecontext = requiresDataRecontext;
}
开发者ID:gdlprj,项目名称:duscusys,代码行数:7,代码来源:CommentRoutedEventArgs.cs
示例19: TimelineBar
static TimelineBar()
{
// events
TimelineSelectedEvent = EventManager.RegisterRoutedEvent(
"TimelineSelected", RoutingStrategy.Bubble,
typeof(RoutedEventHandler), typeof(TimelineBar));
}
开发者ID:sohong,项目名称:greenfleet-viewer,代码行数:7,代码来源:TimelineBar.cs
示例20: DragablzDragDeltaEventArgs
public DragablzDragDeltaEventArgs(RoutedEvent routedEvent, object source, DragablzItem dragablzItem, DragDeltaEventArgs dragDeltaEventArgs)
: base(routedEvent, source, dragablzItem)
{
if (dragDeltaEventArgs == null) throw new ArgumentNullException("dragDeltaEventArgs");
_dragDeltaEventArgs = dragDeltaEventArgs;
}
开发者ID:CensoredHF,项目名称:Snappie,代码行数:7,代码来源:DragablzDragDeltaEventArgs.cs
注:本文中的System.Windows.RoutedEvent类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论