1.关于控件的赋值和取值
a. label:通过label.属性可直接获取,赋值只要将相应的值转换为对应的格式即可。
例如:<Label FontSize="20" Name="lblScore" Width="90" Content="0"></Label>
cs:Score = Convert.ToInt32(lblScore.Content) + 10; lblScore.Content = Convert.ToString(Score);
b.下拉列表comboBox: 1).添加元素comboBox1.Items.Add("一");
2).我在使用SelectionChanged时,不知道为什么上下左右键会触发此事件,刚好与我的需要用的事件冲突了,然后我就把IsTabStop="False"