Exemple #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;
        }
Exemple #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)
 {
 }
Exemple #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;
        }
Exemple #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ContextMenu"/> class.
 /// </summary>
 public ContextMenu()
 {
     _interaction = AvaloniaLocator.Current.GetService <IMenuInteractionHandler>() ??
                    new DefaultMenuInteractionHandler();
 }
Exemple #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));
 }
Exemple #6
0
 public Toolbar(IMenuInteractionHandler interactionHandler)
     : base(interactionHandler)
 {
 }
Exemple #7
0
 public MenuFlyoutPresenter(IMenuInteractionHandler menuInteractionHandler)
     : base(menuInteractionHandler)
 {
 }