I have tried to change the RelativePanel attached properties of a control by XAML in the VisualState.Setters in a Visual State but the properties do not change, so I created a dependency property to test by code behind and neither.
Is there any way to refresh to a new group of values like:
<VisualState.Setters>
<Setter Target="TimestablesControl.RelativePanel.RightOf" Value=""/>
<Setter Target="TimestablesControl.RelativePanel.AlignRightWithPanel" Value="false"/>
<Setter Target="TimestablesControl.RelativePanel.AlignLeftWithPanel" Value="true"/>
</VisualState.Setters>
And make the view more 'responsive'?
For changing values of Attached Properties in Setter.Target use this format:
TargetObjectXName.(ClassName.AttachedPropertyName)
In you case:
<VisualState.Setters>
<Setter Target="TimestablesControl.(RelativePanel.RightOf)" Value="Control1"/>
<Setter Target="TimestablesControl.(RelativePanel.AlignRightWithPanel)" Value="False"/>
<Setter Target="TimestablesControl.(RelativePanel.AlignLeftWithPanel)" Value="True"/>
</VisualState.Setters>
Where "Control1" is the x:Name of the control you want to place left of TimestablesControl.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With