Example #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MenuBase"/> class.
        /// </summary>
        /// <param name="interactionHandler">The menu interaction handler.</param>
        public MenuBase(IMenuInteractionHandler interactionHandler)
        {
            Contract.Requires <ArgumentNullException>(interactionHandler != null);

            InteractionHandler = interactionHandler;
        }
Example #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ContextMenu"/> class.
 /// </summary>
 /// <param name="interactionHandler">The menu interaction handler.</param>
 public ContextMenu(IMenuInteractionHandler interactionHandler)
     : base(interactionHandler)
 {
 }
Example #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ContextMenu"/> class.
        /// </summary>
        /// <param name="interactionHandler">The menu iteraction handler.</param>
        public ContextMenu(IMenuInteractionHandler interactionHandler)
        {
            Contract.Requires <ArgumentNullException>(interactionHandler != null);

            _interaction = interactionHandler;
        }
Example #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ContextMenu"/> class.
 /// </summary>
 public ContextMenu()
 {
     _interaction = AvaloniaLocator.Current.GetService <IMenuInteractionHandler>() ??
                    new DefaultMenuInteractionHandler();
 }
Example #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MenuBase"/> class.
 /// </summary>
 /// <param name="interactionHandler">The menu interaction handler.</param>
 public MenuBase(IMenuInteractionHandler interactionHandler)
 {
     InteractionHandler = interactionHandler ?? throw new ArgumentNullException(nameof(interactionHandler));
 }
Example #6
0
 public Toolbar(IMenuInteractionHandler interactionHandler)
     : base(interactionHandler)
 {
 }
Example #7
0
 public MenuFlyoutPresenter(IMenuInteractionHandler menuInteractionHandler)
     : base(menuInteractionHandler)
 {
 }