I am dynamically changing the canvas background in my app.
The page.xaml code is:
<Canvas x:Name="canvasBoard" Height="695" Width="1365" Grid.Row="0">
<Canvas.Background>
<ImageBrush Stretch="None" ImageSource="/Assets/board.png"/>
</Canvas.Background>
<Canvas.RenderTransform>
<ScaleTransform ScaleX="1.0"/>
</Canvas.RenderTransform>
</Canvas>
I want to change the ScaleTransfom ScaleX value dynamically to the background selected by the page.xaml.cs but am unable to do so. Any help is appreciated.
If you want to change the value of
ScaleXfrom code which I think is what you are asking you can do that with the following code inpage.xaml.cs: