예제 #1
0
        //public static readonly StyledProperty<bool> CanAddToQuickAccessToolbarProperty;

        static RibbonButton()
        {
            //CanAddToQuickAccessToolbarProperty = AvaloniaProperty.Register<RibbonButton, bool>(nameof(CanAddToQuickAccessToolbar), true);
            RibbonControlHelper <RibbonButton> .SetProperties(out SizeProperty, out MinSizeProperty, out MaxSizeProperty);

            Button.FocusableProperty.OverrideDefaultValue <RibbonButton>(false);
        }
예제 #2
0
        static Gallery()
        {
            //SizeProperty = RibbonButton.SizeProperty.AddOwner<Gallery>();
            //MinSizeProperty = RibbonButton.MinSizeProperty.AddOwner<Gallery>();
            //MaxSizeProperty = RibbonButton.MaxSizeProperty.AddOwner<Gallery>();
            IsDropDownOpenProperty = ComboBox.IsDropDownOpenProperty.AddOwner <Gallery>(element => element.IsDropDownOpen, (element, value) => element.IsDropDownOpen = value);
            IsDropDownOpenProperty.Changed.AddClassHandler(new Action <Gallery, AvaloniaPropertyChangedEventArgs>((sneder, args) =>
            {
                sneder.UpdatePresenterLocation((bool)args.NewValue);
            }));
            //AffectsRender<Gallery>(SizeProperty, MinSizeProperty, MaxSizeProperty);

            RibbonControlHelper <Gallery> .SetProperties(out SizeProperty, out MinSizeProperty, out MaxSizeProperty);
        }
예제 #3
0
        static RibbonSplitButton()
        {
            ContentProperty   = RibbonButton.ContentProperty.AddOwner <RibbonSplitButton>();
            IconProperty      = RibbonButton.IconProperty.AddOwner <RibbonSplitButton>();
            LargeIconProperty = AvaloniaProperty.Register <RibbonButton, object>(nameof(LargeIcon), null);
            //SizeProperty = RibbonButton.SizeProperty.AddOwner<RibbonComboButton>();
            //MinSizeProperty = RibbonButton.MinSizeProperty.AddOwner<RibbonComboButton>();
            //MaxSizeProperty = RibbonButton.MaxSizeProperty.AddOwner<RibbonComboButton>();
            //CanAddToQuickAccessToolbarProperty = RibbonButton.CanAddToQuickAccessToolbarProperty.AddOwner<RibbonComboButton>();
            CommandProperty          = Button.CommandProperty.AddOwner <RibbonSplitButton>(button => button.Command, (button, command) => button.Command = command);
            CommandParameterProperty = Button.CommandParameterProperty.AddOwner <RibbonSplitButton>();
            //AffectsRender<RibbonComboButton>(SizeProperty, MinSizeProperty, MaxSizeProperty);
            //AffectsMeasure<RibbonComboButton>(SizeProperty, MinSizeProperty, MaxSizeProperty);
            //AffectsArrange<RibbonComboButton>(SizeProperty, MinSizeProperty, MaxSizeProperty);
            //RibbonControLHelper<RibbonComboButton>.AddHandlers(MinSizeProperty, MaxSizeProperty);
            RibbonControlHelper <RibbonSplitButton> .SetProperties(out SizeProperty, out MinSizeProperty, out MaxSizeProperty);

            Button.FocusableProperty.OverrideDefaultValue <RibbonSplitButton>(false);
        }