0
分配按钮名称时崩溃我有按钮,列表框,并为他们每个人,我想 提供一个不同的名称。这是我在设置XAML结合如何:应用通过具有约束力的
<Button Content="{Binding count}"
x:Name="{Binding buttonName}"
Width="55"
Height="55"
BorderThickness="3"
FontSize="18.667"
Padding="-1,-2,0,0"
Margin="-400,0,0,0"
FontWeight="Bold"
Click="servingButtonClicked" />
buttonName
是一个字符串,其被存储在对象在LinkedList<string>
作为该列表框的的ItemSource。
为什么不这项工作?
错误:
Object reference not set to an instance of an object.
我怎么可能实现,否则我的目标是什么? – 2013-03-16 19:11:14
在XAML刚刚成立的唯一名称或不设置它。我看不到dataBinded按钮名称的用法。 – 2013-03-16 20:24:28