I have 2 styles in static resources. First ( with name LabelFont
SetterProperty="FontSize"
)
<OnIdiom x:TypeArguments:"x:Double" Phone="15", Tablet "30"/>.
Second is for setting Margin
with OnPlatform
and is BasedOn="LabelFont"
with name MarginLabel
and SetterProperty="Margin"
:
<OnPlatform x:TypeArguments="x:Double">
<On Platform="Android" Value="20,0,0,0" />
</OnPlatform>
(Sorry I dont have whole code now, I can post later if its necessary...) When I define a Label, where I use Style="{StaticResources MarginLabel}" the font is set, but not Margin. No error. Can anybody help me where is the problem? Thank you.
question from:https://stackoverflow.com/questions/65907932/xaml-static-resource-not-set