遍历集合下的按钮
来源:互联网 发布:金蝶k3软件下载 编辑:程序博客网 时间:2024/05/18 01:34
private void btn_Click(object sender, RoutedEventArgs e)
{
FrameworkElement feSource = e.Source as FrameworkElement;
switch (feSource.Name)
{
case "btn_Blue":
btn_Yellow.Content = "Yellow";
btn_Red.Content = "Red";
btn_Blue.Content = "Hello Blue!";
break;
case "btn_Yellow":
btn_Red.Content = "Red";
btn_Blue.Content = "Blue";
btn_Yellow.Content = "Hello Yellow!";
break;
case "btn_Red":
btn_Blue.Content = "Blue";
btn_Yellow.Content = "Yellow";
btn_Red.Content = "Hello Red!";
break;
}
<Border Height="80" Width="350" BorderBrush="Red" BorderThickness="4" >
<StackPanel Background="LightBlue" Orientation="Horizontal" Button.Click="btn_Click" Margin="10,10,10,10" >
<Button Background="Blue" Name="btn_Blue" Width="80" Margin="10,10,10,10">Blue</Button>
<Button Background="Red" Name="btn_Red" Width="80" Margin="10,10,10,10">Red</Button>
<Button Background="Yellow" Name="btn_Yellow" Width="80" Margin="10,10,10,10">Yellow</Button>
</StackPanel>
</Border>
- 遍历集合下的按钮
- JAVA集合-集合的遍历
- 遍历集合的方法
- JavaMap集合的遍历
- Map集合的遍历
- map集合的遍历
- c#集合的遍历
- Map集合的遍历
- 集合的遍历删除
- Map集合的遍历
- 集合的遍历
- 集合的遍历
- 集合的遍历
- Map集合的遍历
- 集合的遍历
- map集合的遍历
- 集合的遍历
- 集合的嵌套遍历
- 算法竞赛入门经典 1.4 分支结构程序设计
- linux下django部署到apache
- Oracle DataGuard 物理Standby 搭建(上)
- 林欲静而风不止
- 在MFC下如何定义全局变量和全局函数
- 遍历集合下的按钮
- Oracle DataGuard 物理Standby 搭建(下)
- 面向过程和面向对象的一点区别
- document.createElement()的用法
- Python_API_Built-in Types_dict.update
- ajax jquery js 提交(添加)
- 马和驴的故事
- 软件自动更新思路
- wget用法集合