/// <summary> /// Raises the <see cref="DragCompleted"/> event. /// </summary> private void RaiseDragCompleted(Double hchange, Double vchange) { var evtData = RoutedEventData.Retrieve(this); var evtDelegate = EventManager.GetInvocationDelegate <UpfDragCompletedEventHandler>(DragCompletedEvent); evtDelegate(this, hchange, vchange, evtData); }
/// <summary> /// Raises the <see cref="ClickByUser"/> event. /// </summary> protected virtual void OnClickByUser() { var evtData = RoutedEventData.Retrieve(this); var evtDelegate = EventManager.GetInvocationDelegate <UpfRoutedEventHandler>(ClickByUserEvent); evtDelegate(this, evtData); }
/// <summary> /// Raises the <see cref="DragStarted"/> event. /// </summary> private void RaiseDragStarted(Double hoffset, Double voffset) { var evtData = RoutedEventData.Retrieve(this); var evtDelegate = EventManager.GetInvocationDelegate <UpfDragStartedEventHandler>(DragStartedEvent); evtDelegate(this, hoffset, voffset, evtData); }
/// <summary> /// Raises the <see cref="TextChanged"/> routed event. /// </summary> protected virtual void OnTextChanged() { var evtDelegate = EventManager.GetInvocationDelegate <UpfRoutedEventHandler>(TextChangedEvent); var evtData = RoutedEventData.Retrieve(this); evtDelegate(this, evtData); }
/// <summary> /// Raises the <see cref="Indeterminate"/> event. /// </summary> protected virtual void OnIndeterminate() { var evtData = RoutedEventData.Retrieve(this); var evtDelegate = EventManager.GetInvocationDelegate <UpfRoutedEventHandler>(IndeterminateEvent); evtDelegate(this, evtData); }
/// <summary> /// Raises the <see cref="PasswordBox.PasswordChangedEvent"/> routed event against the editor's templated parent. /// </summary> private void RaisePasswordChanged(PasswordBox target) { var evtDelegate = EventManager.GetInvocationDelegate <UpfRoutedEventHandler>(PasswordBox.PasswordChangedEvent); var evtData = RoutedEventData.Retrieve(target); evtDelegate(target, evtData); }
/// <summary> /// Raises the <see cref="Scroll"/> event. /// </summary> /// <param name="type">The scroll event type.</param> protected internal void RaiseScrollEvent(ScrollEventType type) { var evtData = RoutedEventData.Retrieve(this); var evtDelegate = EventManager.GetInvocationDelegate <UpfScrollEventHandler>(ScrollEvent); evtDelegate(this, type, evtData); }
/// <summary> /// Raises the <see cref="Click"/> event. /// </summary> protected virtual void OnClick() { var evtData = RoutedEventData.Retrieve(this); var evtDelegate = EventManager.GetInvocationDelegate <UpfRoutedEventHandler>(ClickEvent); evtDelegate(this, evtData); CommandManager.ExecuteSource(View, this); }
/// <summary> /// Raises the SelectionChanged event. /// </summary> private void RaiseSelectionChanged() { if (suspendSelectionChangedLevel > 0) { return; } var evtDelegate = EventManager.GetInvocationDelegate <UpfRoutedEventHandler>(SelectionChangedEvent); var evtData = RoutedEventData.Retrieve(this); evtDelegate(this, evtData); }
/// <summary> /// Handles <see cref="Scroll"/> events raised by the scroll bar's child scroll bars. /// </summary> private static void HandleScrollEvent(DependencyObject element, ScrollEventType type, RoutedEventData data) { var scrollbar = (ScrollBar)element; var hscroll = scrollbar.PART_HScrollBar; var vscroll = scrollbar.PART_VScrollBar; if (data.OriginalSource == hscroll || data.OriginalSource == vscroll) { // Re-raise the event with this control as the source var evtData = RoutedEventData.Retrieve(scrollbar); var evtDelegate = EventManager.GetInvocationDelegate <UpfScrollEventHandler>(ScrollEvent); evtDelegate(scrollbar, type, evtData); data.Handled = true; } }
/// <summary> /// Occurs when the value of the <see cref="IsSelected"/> dependency property changes. /// </summary> private static void HandleIsSelectedChanged(DependencyObject dobj, Boolean oldValue, Boolean newValue) { var item = (ListBoxItem)dobj; if (item.IsSelected) { var evtDelegate = EventManager.GetInvocationDelegate <UpfRoutedEventHandler>(Selector.SelectedEvent); var evtData = RoutedEventData.Retrieve(dobj); evtDelegate(dobj, evtData); } else { var evtDelegate = EventManager.GetInvocationDelegate <UpfRoutedEventHandler>(Selector.UnselectedEvent); var evtData = RoutedEventData.Retrieve(dobj); evtDelegate(dobj, evtData); } item.UpdateHighlightOpacity(); }
/// <summary> /// Occurs when the value of the <see cref="IsSelected"/> dependency property changes. /// </summary> private static void HandleIsSelectedChanged(DependencyObject dobj, Boolean oldValue, Boolean newValue) { var item = (TabItem)dobj; if (item.IsSelected) { item.Classes.Set("selected"); var evtDelegate = EventManager.GetInvocationDelegate <UpfRoutedEventHandler>(Selector.SelectedEvent); var evtData = RoutedEventData.Retrieve(dobj); evtDelegate(dobj, evtData); } else { item.Classes.Remove("selected"); var evtDelegate = EventManager.GetInvocationDelegate <UpfRoutedEventHandler>(Selector.UnselectedEvent); var evtData = RoutedEventData.Retrieve(dobj); evtDelegate(dobj, evtData); } }