If I have 2 buttons, A and B, is it possible to create a style and trigger such that when the user hovers over button B, it will cause button A's style to change? I've tried using SourceName and TargetName, and am getting compiler errors. Here's the XAML that I'm fooling around with - I'd like to cause button A's content to be bolded when button B is moused over:
<Window x:Class="WpfApplication1.Window4"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window4" Height="300" Width="300">
<Window.Resources>
<Style x:Key="BoldWhenOver" TargetType="{x:Type Button}">
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="FontWeight" Value="Bold" />
</Trigger>
</Style.Triggers>
</Style>
</Window.Resources>
<StackPanel>
<Button Name="btnA" Content="A" Style="{StaticResource BoldWhenOver}" />
<Button Name="btnB" Content="B" />
</StackPanel>
Thanks for your help!! Andy