I need it to implement binding in setters.
Or are there any other workarounds to be able to set binding in style setters for Windows runtime?
I need it to implement binding in setters.
Or are there any other workarounds to be able to set binding in style setters for Windows runtime?
What kind of binding?
e.g.
<Setter Property="BorderThickness" Value="{ThemeResource TextControlBorderThemeThickness}"/>
Ok, then you should do something like this:
Here you can't bind a value to Padding.
<Style x:Key="GridViewItemStyle" TargetType="GridViewItem">
<Setter Property="Padding" Value="0"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="GridViewItem">
<GridViewItemPresenter Padding="{TemplateBinding Padding}"
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
You can bind it that way:
<Style x:Key="GridViewItemStyle" TargetType="GridViewItem">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="GridViewItem">
<GridViewItemPresenter Padding="{Binding PaddingValue}"
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>