BarContextMenu Class
Represents a context menu that can host any bar control.
public class BarContextMenu : ContextMenu, DUCE.IResource, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IHaveResources, IQueryAmbient, IAddChild, IGeneratorHost, IContainItemStorage
- Inheritance:
- System.Object System.Windows.Threading.DispatcherObject System.Windows.DependencyObject System.Windows.Media.Visual System.Windows.UIElement System.Windows.FrameworkElement System.Windows.Controls.Control System.Windows.Controls.ItemsControl System.Windows.Controls.Primitives.MenuBase System.Windows.Controls.ContextMenu Object
Constructors
BarContextMenu()
Initializes a new instance of the BarContextMenu class.
public BarContextMenu()
Methods
ClearContainerForItemOverride(DependencyObject, Object)
When overridden in a derived class, undoes the effects of the System.Windows.Controls.ItemsControl.PrepareContainerForItemOverride(System.Windows.DependencyObject, System.Object) method.
protected override void ClearContainerForItemOverride(DependencyObject element, object item)
Parameter | Type | Description |
---|---|---|
element | System.Windows.DependencyObject | The container element. |
item | System.Object | The item. |
GetContainerForItemOverride()
Creates or identifies the element used to display the specified item.
protected override DependencyObject GetContainerForItemOverride()
Returns
- System.Windows.DependencyObject:
The element used to display the specified item.
IsItemItsOwnContainerOverride(Object)
Determines whether the specified item is, or is eligible to be, its own item container.
protected override bool IsItemItsOwnContainerOverride(object item)
Parameter | Type | Description |
---|---|---|
item | System.Object | The item to check whether it is an item container. |
Returns
OnContextMenuOpening(ContextMenuEventArgs)
Invoked whenever an unhandled ContextMenuOpening routed event reaches this class in its route. Implement this method to add class handling for this event.
protected override void OnContextMenuOpening(ContextMenuEventArgs e)
Parameter | Type | Description |
---|---|---|
e | System.Windows.Controls.ContextMenuEventArgs | The System.Windows.RoutedEventArgs that contains the event data. |
OnCreateAutomationPeer()
Creates and returns a System.Windows.Automation.Peers.ContextMenuAutomationPeer object for this System.Windows.Controls.ContextMenu.
protected override AutomationPeer OnCreateAutomationPeer()
Returns
- System.Windows.Automation.Peers.AutomationPeer:
A System.Windows.Automation.Peers.ContextMenuAutomationPeer object for this System.Windows.Controls.ContextMenu.
OnKeyDown(KeyEventArgs)
Called when a KeyDown event is raised by an object inside the System.Windows.Controls.ContextMenu.
protected override void OnKeyDown(KeyEventArgs e)
Parameter | Type | Description |
---|---|---|
e | System.Windows.Input.KeyEventArgs | The event data for the KeyDown event. |
OnPreviewGotKeyboardFocus(KeyboardFocusChangedEventArgs)
Invoked when an unhandled PreviewGotKeyboardFocus attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
protected override void OnPreviewGotKeyboardFocus(KeyboardFocusChangedEventArgs e)
Parameter | Type | Description |
---|---|---|
e | System.Windows.Input.KeyboardFocusChangedEventArgs | The System.Windows.Input.KeyboardFocusChangedEventArgs that contains the event data. |
PrepareContainerForItemOverride(DependencyObject, Object)
Prepares the specified element to display the specified item.
protected override void PrepareContainerForItemOverride(DependencyObject element, object item)
Parameter | Type | Description |
---|---|---|
element | System.Windows.DependencyObject | Element used to display the specified item. |
item | System.Object | Specified item. |
Inherited Members
- System.Object.ToString()
- System.Object.Equals(System.Object)
- System.Object.Equals(System.Object, System.Object)
- System.Object.ReferenceEquals(System.Object, System.Object)
- System.Object.GetHashCode()
- System.Object.GetType()
- System.Object.MemberwiseClone()
Extension Methods
- FrameworkElementExtensions.AnimateDoubleProperty(String, Double, Double, Double, Nullable<Double>, Nullable<Double>)
- FrameworkElementExtensions.BindToProperty(DependencyProperty, Object, String, BindingMode, IValueConverter, Object)
- FrameworkElementExtensions.BindToProperty(DependencyProperty, Object, DependencyProperty, BindingMode, IValueConverter, Object)
- FrameworkElementExtensions.GetCurrentSize()