Style for Selected Button
-
Dear friends, i have small clarification i have i style for the button like these <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type Button}"> <Grid> <Viewbox> <Canvas Height="52.8" Width="52.8"> <!--Arrow Black--> <Path Name="ButtonBlack" Data="F1M27.165,118.481C27.165,132.57,38.587,391,27.165,118.481" Stretch="Fill"> <Path.Fill> <LinearGradientBrush EndPoint="0.5,0" StartPoint="0.5,1"> <GradientStop Color="#FFFEFFFE" Offset="0" /> <GradientStop Color="Black" Offset="1" /> </LinearGradientBrush> </Path.Fill> </Path> </Canvas> </Viewbox> <Viewbox> <ContentPresenter Margin="0,2,0,0" HorizontalAlignment="Center" VerticalAlignment="Center"/> </Viewbox> </Grid> <ControlTemplate.Triggers> <Trigger Property="IsMouseOver" Value="True"> <Setter TargetName="ButtonBlack" Property="Fill" Value="Yellow"/> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> and i am having 5 button on my user control (and above style is applied for the buttons) the use control is (tool box) . . now my problem is like these ... if i select(click) one button (tool) in my user control i have to apply different style then other ...and when i select old button then the first selected button should go back to old style ... is there any Trigger Property="IsSelected" ...like or i have to do it in code behind .. any idea? or solution? by Joe