I have 5 buttons using a round image. One of these has its scale set to 2X so that it is wider. When I click on any button, I want to Make it wide, and reset all the others back to 1X.
The xaml for a button level 1 is
<Button x:Name="BtnSoundL1" Width="20" Height="20"
BorderBrush="white" BorderThickness="1"
Grid.Column="1"
PointerEntered = "BtnSoundL1_PointerEntered"
PointerExited = "BtnSoundL1_PointerExited"
Click = "BtnSoundL1_Click"
ToolTipService.ToolTip="Sound Level 1">
<Button.Template>
<ControlTemplate>
<Image Source="Assets/Images/Play/EggMonster.png" >
<Image.RenderTransform>
<CompositeTransform ScaleX="1" ScaleY="1"/>
</Image.RenderTransform>
</Image>
</ControlTemplate>
</Button.Template>
</Button>
then in the code behind
private void BtnSoundL5_Click(object sender, RoutedEventArgs e)
{
intSoundLevel = 5; // this is a global that I use the change the volume
//Now I want to set the ScaleX to 2 on the image, but I have been unable
//to determine how to reference the ScaleX value
}
Alternatively, I can make a new image and change its source, but I will still have the same problem of how to reference the Source to make the update. Changing the scale seems to be easier.