リストボックスにボタンがあり、それぞれに別の名前を付けたいと思っています。これは、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>
この listBox の itemSource としてオブジェクトに格納される文字列です。
なぜこれがうまくいかないのですか?
エラー:
Object reference not set to an instance of an object.