-
I use things like: var label = new Label() But when I want to create a style using Maui.Markup: Add("Label", new Style< Label >() I can't find a way to create the SyleClass as I can do in Xaml: <Style Class="LabelClass" TargetType="Label"> <...> </style>Is it possible to use style classes or should I use Keys only? Thanks in ad |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
No big deal, in case anybody else has this one: var style = (Style)new Style< Label >() style.Class = "Class"; easy piece, with the cast... |
Beta Was this translation helpful? Give feedback.
No big deal, in case anybody else has this one:
var style = (Style)new Style< Label >()
.AddAppThemeBinding(Label.TextColorProperty, Colors3.OnBackground, Colors3.OnBackgroundDark)
.ApplyToDerivedTypes(true)
.CanCascade(true));
style.Class = "Class";
easy piece, with the cast...