Coerce() public static method

Coerce control context menu
public static Coerce ( DependencyObject o ) : void
o System.Windows.DependencyObject Control
return void
Ejemplo n.º 1
0
 /// <summary>
 /// Default constructor
 /// </summary>
 public SplitButton()
 {
     ContextMenuService.Coerce(this);
     this.Click    += this.OnClick;
     this.Loaded   += this.OnLoaded;
     this.Unloaded += this.OnUnloaded;
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Default constructor
        /// </summary>
        public DropDownButton()
        {
            ContextMenuService.Coerce(this);

            this.Loaded += this.OnLoaded;
            this.Unloaded += this.OnUnloaded;
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Default Constructor
 /// </summary>
 public MenuItem()
 {
     ContextMenuService.Coerce(this);
     this.ToolTip = new ToolTip();
     ((ToolTip)this.ToolTip).Template = null;
     this.MouseWheel += this.OnMenuItemMouseWheel;
 }
Ejemplo n.º 4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="RibbonTabControl"/> class.
        /// </summary>
        public RibbonTabControl()
        {
            ContextMenuService.Coerce(this);

            this.Loaded   += this.OnLoaded;
            this.Unloaded += this.OnUnloaded;
        }
Ejemplo n.º 5
0
 /// <summary>
 /// Default constructor
 /// </summary>
 public Gallery()
 {
     ContextMenuService.Coerce(this);
     this.Loaded   += this.OnLoaded;
     this.Focusable = false;
     KeyboardNavigation.SetDirectionalNavigation(this, KeyboardNavigationMode.Continue);
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Default Constructor
 /// </summary>
 public MenuItem()
 {
     ContextMenuService.Coerce(this);
     ToolTip = new ToolTip();
     (ToolTip as ToolTip).Template = null;
     FocusManager.SetIsFocusScope(this, true);
     this.MouseWheel += OnMenuItemMouseWheel;
 }
Ejemplo n.º 7
0
        /// <summary>
        /// Default constructor
        /// </summary>
        public RibbonTabItem()
        {
            AddLogicalChild(groupsContainer);
            groupsContainer.Content = groupsInnerContainer;
            ContextMenuService.Coerce(this);

            this.Loaded   += this.OnLoaded;
            this.Unloaded += this.OnUnloaded;
        }
Ejemplo n.º 8
0
        /// <summary>
        /// Default constructor
        /// </summary>
        public SplitButton()
        {
            ContextMenuService.Coerce(this);
            this.Click += this.OnClick;
            //            AddHandler(ClickEvent, OnClick);

            this.Loaded   += this.OnLoaded;
            this.Unloaded += this.OnUnloaded;
        }
Ejemplo n.º 9
0
        /// <summary>
        /// Default constructor
        /// </summary>
        public DropDownButton()
        {
            ContextMenuService.Coerce(this);

            this.Loaded   += this.OnLoaded;
            this.Unloaded += this.OnUnloaded;

            this.AddHandler(System.Windows.Controls.MenuItem.SubmenuOpenedEvent, new RoutedEventHandler(this.OnSubmenuOpened));
            this.AddHandler(System.Windows.Controls.MenuItem.SubmenuClosedEvent, new RoutedEventHandler(this.OnSubmenuClosed));
        }
Ejemplo n.º 10
0
        /// <summary>
        /// Default constructor
        /// </summary>
        public SplitButton()
        {
            ContextMenuService.Coerce(this);
            //FocusManager.SetIsFocusScope(this, true);
            Click += OnClick;
            //            AddHandler(ClickEvent, OnClick);

            this.Loaded   += this.OnLoaded;
            this.Unloaded += this.OnUnloaded;
        }
Ejemplo n.º 11
0
        /// <summary>
        /// Default constructor
        /// </summary>
        public RibbonTabItem()
        {
            this.AddLogicalChild(this.groupsContainer);
            this.groupsContainer.Content = this.groupsInnerContainer;

            // Force redirection of DataContext. This is needed, because we detach the container from the visual tree and attach it to a diffrent one (the popup/dropdown) when the ribbon is minimized.
            this.groupsInnerContainer.SetBinding(DataContextProperty, new Binding("DataContext")
            {
                Source = this
            });

            ContextMenuService.Coerce(this);

            this.Loaded   += this.OnLoaded;
            this.Unloaded += this.OnUnloaded;
        }
Ejemplo n.º 12
0
 /// <summary>
 /// Default Constructor
 /// </summary>
 protected RibbonControl()
 {
     ContextMenuService.Coerce(this);
 }
Ejemplo n.º 13
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MenuItem"/> class.
 /// </summary>
 public MenuItem()
 {
     ContextMenuService.Coerce(this);
 }
Ejemplo n.º 14
0
 /// <summary>
 /// Default constructor
 /// </summary>
 public Button()
 {
     ContextMenuService.Coerce(this);
 }
Ejemplo n.º 15
0
 /// <summary>
 /// Default constructor
 /// </summary>
 public RadioButton()
 {
     ContextMenuService.Coerce(this);
     FocusManager.SetIsFocusScope(this, true);
 }
Ejemplo n.º 16
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MenuItem"/> class.
        /// </summary>
        public MenuItem()
        {
            ContextMenuService.Coerce(this);

            this.MouseWheel += this.OnMenuItemMouseWheel;
        }
Ejemplo n.º 17
0
 /// <summary>
 ///     Default Constructor
 /// </summary>
 public ComboBox()
 {
     ContextMenuService.Coerce(this);
 }
Ejemplo n.º 18
0
 /// <summary>
 /// Default constructor
 /// </summary>
 public CheckBox()
 {
     ContextMenuService.Coerce(this);
 }
Ejemplo n.º 19
0
 /// <summary>
 /// Default constructor
 /// </summary>
 public CheckBox()
 {
     ContextMenuService.Coerce(this);
     FocusManager.SetIsFocusScope(this, true);
 }
Ejemplo n.º 20
0
 /// <summary>
 /// Creates a new instance.
 /// </summary>
 public TextBox()
 {
     ContextMenuService.Coerce(this);
 }