コード例 #1
0
        public void IsDirect_Property_Returns_True()
        {
            var target = new DirectProperty<Class1, string>(
                "test", 
                o => null, 
                null, 
                new PropertyMetadata());

            Assert.True(target.IsDirect);
        }
コード例 #2
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);
        }
コード例 #3
0
 static RibbonGroupBox()
 {
     CommandProperty = AvaloniaProperty.RegisterDirect <RibbonGroupBox, ICommand>(nameof(Command), button => button.Command, (button, command) => button.Command = command, enableDataValidation: true);
 }
コード例 #4
0
 static RibbonGroup()
 {
     HeaderProperty = AvaloniaProperty.RegisterDirect <RibbonGroup, string>(nameof(Header), o => o.Header, (o, v) => o.Header = v);
 }
コード例 #5
0
 static Class2()
 {
     StyledProperty.OverrideDefaultValue <Class2>("bar");
     DirectProperty.OverrideMetadata <Class2>(new DirectPropertyMetadata <string>("bar"));
 }
コード例 #6
0
 static Ribbon()
 {
     IsExpandedProperty        = AvaloniaProperty.RegisterDirect <Ribbon, bool>(nameof(IsExpanded), o => o.IsExpanded, (o, v) => o.IsExpanded = v, true);
     HelpButtonCommandProperty = AvaloniaProperty.RegisterDirect <Ribbon, ICommand>(nameof(HelpButtonCommand), o => o.HelpButtonCommand, (o, v) => o.HelpButtonCommand = v);
 }
コード例 #7
0
ファイル: Hyperlink.cs プロジェクト: roblthegreat/Jaya
 static Hyperlink()
 {
     UrlProperty = AvaloniaProperty.RegisterDirect <Hyperlink, Uri>(nameof(Url), o => o.Url, (o, v) => o.Url = v, null);
 }
コード例 #8
0
 static RibbonTabGroup()
 {
     TextProperty    = AvaloniaProperty.Register <RibbonTabGroup, string>(nameof(Text));
     CommandProperty = AvaloniaProperty.RegisterDirect <RibbonTabGroup, ICommand>(nameof(Command), button => button.Command, (button, command) => button.Command = command, enableDataValidation: true);
 }
コード例 #9
0
        public void IsDirect_Property_Returns_True()
        {
            var target = new DirectProperty <Class1, string>("test", o => null);

            Assert.True(target.IsDirect);
        }