public void IsDirect_Property_Returns_True() { var target = new DirectProperty<Class1, string>( "test", o => null, null, new PropertyMetadata()); Assert.True(target.IsDirect); }
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); }
static RibbonGroupBox() { CommandProperty = AvaloniaProperty.RegisterDirect <RibbonGroupBox, ICommand>(nameof(Command), button => button.Command, (button, command) => button.Command = command, enableDataValidation: true); }
static RibbonGroup() { HeaderProperty = AvaloniaProperty.RegisterDirect <RibbonGroup, string>(nameof(Header), o => o.Header, (o, v) => o.Header = v); }
static Class2() { StyledProperty.OverrideDefaultValue <Class2>("bar"); DirectProperty.OverrideMetadata <Class2>(new DirectPropertyMetadata <string>("bar")); }
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); }
static Hyperlink() { UrlProperty = AvaloniaProperty.RegisterDirect <Hyperlink, Uri>(nameof(Url), o => o.Url, (o, v) => o.Url = v, null); }
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); }
public void IsDirect_Property_Returns_True() { var target = new DirectProperty <Class1, string>("test", o => null); Assert.True(target.IsDirect); }