【发布时间】:2013-12-05 09:58:48
【问题描述】:
我在两个相互关联的 wrappanles 中有两组按钮。当我将鼠标移到一个包装面板中的按钮上时,我希望其相关按钮同时亮起,即触发两个按钮的鼠标悬停事件。所以在我的代码示例中,当我移动带有标签“1.Block”的按钮时,它和另一行中的匹配按钮“1.Sqaure”必须都显示它们的鼠标悬停样式/动画。
<Grid x:Name="LayoutRoot" Background="White">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="400" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="60" />
<RowDefinition Height="60" />
</Grid.RowDefinitions>
<toolkit:WrapPanel Grid.Column="0" Grid.Row="0">
<Button Content="1. Block" Width="100" />
<Button Content="2. Block" Width="100" />
<Button Content="3. Block" Width="100" />
<Button Content="4. Block" Width="100" />
<Button Content="5. Block" Width="100" />
<Button Content="6. Block" Width="100" />
<Button Content="7. Block" Width="100" />
<Button Content="8. Block" Width="100" />
</toolkit:WrapPanel>
<toolkit:WrapPanel Grid.Column="0" Grid.Row="1">
<Button Content="1. Square" Width="100" />
<Button Content="2. Square" Width="100" />
<Button Content="3. Square" Width="100" />
<Button Content="4. Square" Width="100" />
<Button Content="5. Square" Width="100" />
<Button Content="6. Square" Width="100" />
<Button Content="7. Square" Width="100" />
<Button Content="8. Square" Width="100" />
</toolkit:WrapPanel>
</Grid>
我不知道从哪里开始?也许触发?任何建议将不胜感激。
【问题讨论】:
标签: silverlight button mouseover