2 types derived from ContextMenu
PresentationFramework (2)
src\Framework\MS\Internal\Documents\DocumentGridContextMenu.cs (1)
162private class ViewerContextMenu : ContextMenu
src\Framework\System\windows\Documents\TextEditorContextMenu.cs (1)
443private class EditorContextMenu : ContextMenu
6 instantiations of ContextMenu
PresentationFramework (5)
src\Framework\System\Windows\Controls\Primitives\ScrollBar.cs (3)
848ContextMenu verticalContextMenu = new ContextMenu(); 868ContextMenu horizontalContextMenuLeftToRight = new ContextMenu(); 888ContextMenu horizontalContextMenuRightToLeft = new ContextMenu();
src\Framework\System\Windows\Markup\Baml2006\WpfGeneratedKnownTypes.cs (1)
2958bamlType.DefaultConstructor = delegate() { return new System.Windows.Controls.ContextMenu(); };
src\Framework\System\Windows\Markup\KnownTypes.cs (1)
1187case KnownElements.ContextMenu: o = new System.Windows.Controls.ContextMenu(); break;
System.Activities.Presentation (1)
System.Activities.Presentation\System\Activities\Presentation\View\DesignerView.Commands.cs (1)
444ContextMenu newMenu = new ContextMenu() { ItemContainerStyleSelector = new ContextMenuItemStyleSelector(this) };
100 references to ContextMenu
PresentationFramework (92)
src\Framework\MS\Internal\Documents\DocumentGridContextMenu.cs (1)
91ContextMenu contextMenu;
src\Framework\MS\Internal\Documents\DocumentViewerHelper.cs (6)
388ContextMenu cm = null; 391cm = e.TargetElement.GetValue(FrameworkElement.ContextMenuProperty) as ContextMenu; 460cm.ClearValue(ContextMenu.PlacementProperty); 461cm.ClearValue(ContextMenu.PlacementTargetProperty); 462cm.ClearValue(ContextMenu.HorizontalOffsetProperty); 463cm.ClearValue(ContextMenu.VerticalOffsetProperty);
src\Framework\System\Windows\Automation\Peers\ContextMenuAutomationPeer.cs (1)
23public ContextMenuAutomationPeer(ContextMenu owner): base(owner)
src\Framework\System\Windows\Controls\ContextMenu.cs (29)
48EventManager.RegisterClassHandler(typeof(ContextMenu), AccessKeyManager.AccessKeyPressedEvent, new AccessKeyPressedEventHandler(OnAccessKeyPressed)); 50DefaultStyleKeyProperty.OverrideMetadata(typeof(ContextMenu), new FrameworkPropertyMetadata(typeof(ContextMenu))); 51_dType = DependencyObjectType.FromSystemTypeInternal(typeof(ContextMenu)); 53IsTabStopProperty.OverrideMetadata(typeof(ContextMenu), new FrameworkPropertyMetadata(BooleanBoxes.FalseBox)); 54KeyboardNavigation.TabNavigationProperty.OverrideMetadata(typeof(ContextMenu), new FrameworkPropertyMetadata(KeyboardNavigationMode.Cycle)); 55KeyboardNavigation.ControlTabNavigationProperty.OverrideMetadata(typeof(ContextMenu), new FrameworkPropertyMetadata(KeyboardNavigationMode.Contained)); 56KeyboardNavigation.DirectionalNavigationProperty.OverrideMetadata(typeof(ContextMenu), new FrameworkPropertyMetadata(KeyboardNavigationMode.Cycle)); 59FocusVisualStyleProperty.OverrideMetadata(typeof(ContextMenu), new FrameworkPropertyMetadata((object)null /* default value */)); 89ContextMenuService.HorizontalOffsetProperty.AddOwner(typeof(ContextMenu), 113ContextMenuService.VerticalOffsetProperty.AddOwner(typeof(ContextMenu), 138typeof(ContextMenu), 157ContextMenu ctrl = (ContextMenu) d; 182typeof(ContextMenu), 206ContextMenuService.PlacementRectangleProperty.AddOwner(typeof(ContextMenu), 229ContextMenuService.PlacementProperty.AddOwner(typeof(ContextMenu), 253typeof(ContextMenu), 259ContextMenu cm = (ContextMenu)d; 284Popup.CustomPopupPlacementCallbackProperty.AddOwner(typeof(ContextMenu)); 303Popup.StaysOpenProperty.AddOwner(typeof(ContextMenu)); 322public static readonly RoutedEvent OpenedEvent = PopupControlService.ContextMenuOpenedEvent.AddOwner(typeof(ContextMenu)); 351public static readonly RoutedEvent ClosedEvent = PopupControlService.ContextMenuClosedEvent.AddOwner(typeof(ContextMenu)); 473MenuItem.InsideContextMenuProperty.AddOwner(typeof(ContextMenu), 566ContextMenu cm = (ContextMenu)arg; 590ContextMenu cm = (ContextMenu)arg;
src\Framework\System\Windows\Controls\ContextMenuService.cs (6)
30typeof(ContextMenu), // Type 32new FrameworkPropertyMetadata((ContextMenu)null, 41public static ContextMenu GetContextMenu(DependencyObject element) 48ContextMenu cm = (ContextMenu)element.GetValue(ContextMenuProperty); 69public static void SetContextMenu(DependencyObject element, ContextMenu value)
src\Framework\System\Windows\Controls\GridView.cs (3)
395typeof(ContextMenu), 402public ContextMenu ColumnHeaderContextMenu 404get { return (ContextMenu)GetValue(ColumnHeaderContextMenuProperty); }
src\Framework\System\Windows\Controls\GridViewHeaderRowPresenter.cs (2)
186public ContextMenu ColumnHeaderContextMenu 188get { return (ContextMenu)GetValue(ColumnHeaderContextMenuProperty); }
src\Framework\System\Windows\Controls\PopupControlService.cs (13)
884ContextMenu cm = menu as ContextMenu; 902cm.SetCurrentValueInternal(ContextMenu.IsOpenProperty, BooleanBoxes.TrueBox); 919ContextMenu cm = source as ContextMenu; 1149if (o is ContextMenu) 1151o.CoerceValue(ContextMenu.HorizontalOffsetProperty); 1152o.CoerceValue(ContextMenu.VerticalOffsetProperty); 1153o.CoerceValue(ContextMenu.PlacementTargetProperty); 1154o.CoerceValue(ContextMenu.PlacementRectangleProperty); 1155o.CoerceValue(ContextMenu.PlacementProperty); 1156o.CoerceValue(ContextMenu.HasDropShadowProperty); 1182else if (dp == ToolTip.PlacementTargetProperty || dp == ContextMenu.PlacementTargetProperty)
src\Framework\System\Windows\Controls\Primitives\ScrollBar.cs (8)
844private static ContextMenu VerticalContextMenu 848ContextMenu verticalContextMenu = new ContextMenu(); 864private static ContextMenu HorizontalContextMenuLTR 868ContextMenu horizontalContextMenuLeftToRight = new ContextMenu(); 884private static ContextMenu HorizontalContextMenuRTL 888ContextMenu horizontalContextMenuRightToLeft = new ContextMenu(); 911binding.Path = new PropertyPath(ContextMenu.PlacementTargetProperty); 913binding.RelativeSource = new RelativeSource(RelativeSourceMode.FindAncestor, typeof(ContextMenu), 1);
src\Framework\System\Windows\Controls\StickyNote.cs (2)
576ContextMenu menu = Keyboard.FocusedElement as ContextMenu;
src\Framework\System\windows\Documents\TextEditorContextMenu.cs (5)
68ContextMenu contextMenu = null; 86contextMenu = (ContextMenu)e.TargetElement.GetValue(FrameworkElement.ContextMenuProperty); 99contextMenu = (ContextMenu)element.GetValue(FrameworkElement.ContextMenuProperty); 251UIElement placementTarget = ((ContextMenu)sender).PlacementTarget; 261((ContextMenu)sender).Closed -= new RoutedEventHandler(OnContextMenuClosed);
src\Framework\System\Windows\FrameworkContentElement.cs (3)
1869new FrameworkPropertyMetadata((ContextMenu) null)); 1874public ContextMenu ContextMenu 1878return (ContextMenu)GetValue(ContextMenuProperty);
src\Framework\System\Windows\FrameworkElement.cs (3)
5921new FrameworkPropertyMetadata((ContextMenu) null)); 5926public ContextMenu ContextMenu 5930return GetValue(ContextMenuProperty) as ContextMenu;
src\Framework\System\Windows\Generated\FrameworkContentElement.cs (2)
643ContextMenu contextMenu = 648RequestFlags.DeferredReferences).Value as ContextMenu;
src\Framework\System\Windows\Generated\FrameworkElement.cs (2)
663ContextMenu contextMenu = 668RequestFlags.DeferredReferences).Value as ContextMenu;
src\Framework\System\Windows\Markup\Baml2006\Baml2006KnownTypes.cs (1)
197case 105: t = () => typeof(ContextMenu); break;
src\Framework\System\Windows\Markup\Baml2006\WpfGeneratedKnownProperties.cs (3)
4311Type type = typeof(System.Windows.Controls.ContextMenu); 4313this.GetXamlType(typeof(System.Windows.Controls.ContextMenu)), // DeclaringType 4319bamlMember.GetDelegate = delegate(object target) { return ((System.Windows.Controls.ContextMenu)target).Items; };
src\Framework\System\Windows\Markup\Baml2006\WpfGeneratedKnownTypes.cs (1)
2956typeof(System.Windows.Controls.ContextMenu),
src\Framework\System\Windows\Markup\KnownTypes.cs (1)
5649case KnownElements.ContextMenu: t = typeof(System.Windows.Controls.ContextMenu); break;
System.Activities.Presentation (8)
System.Activities.Presentation\System\Activities\Presentation\View\ActivityTypeDesigner.xaml.cs (1)
34protected override void OnContextMenuLoaded(ContextMenu menu)
System.Activities.Presentation\System\Activities\Presentation\View\DesignerView.Commands.cs (3)
444ContextMenu newMenu = new ContextMenu() { ItemContainerStyleSelector = new ContextMenuItemStyleSelector(this) }; 489void UnloadContextMenu(ContextMenu contextMenuToUnload) 548this.UnloadContextMenu((ContextMenu)sender);
System.Activities.Presentation\System\Activities\Presentation\View\GenericActivityTypeDesigner.xaml.cs (1)
29protected override void OnContextMenuLoaded(ContextMenu menu)
System.Activities.Presentation\System\Activities\Presentation\WorkflowDesigner.cs (1)
338public ContextMenu ContextMenu
System.Activities.Presentation\System\Activities\Presentation\WorkflowViewElement.cs (2)
567protected virtual void OnContextMenuLoaded(ContextMenu menu) 1055internal void NotifyContextMenuLoaded(ContextMenu menu)