1
我在我的設置中有一個StringCollection,並希望將1個項目綁定到標籤。WPF綁定文本框到一個字符串集合的項目
這是如何工作的。
xmlns:p="clr-namespace:MyNamespace.Properties"
<Label Content="{Binding Path=MyStringCollection.[2], Source={x:Static p:Settings.Default}}" />
但我想該指數綁定到另一個價值,並認爲這應該工作。但它沒有。
<Label Content="{Binding Path=MyStringCollection.[{Binding SelectedIndex Source={x:Static p:Settings.Default}}], Source={x:Static p:Settings.Default}}" />
有人能幫助我嗎?