0
我有一個silverlight telerik RadComboBox。我正在設計一個主詳細信息頁面。Silverlight組合框綁定到元素
在網格中,我有人員列表 - 網格中的一列是Salutation。 當我點擊網格中的一個項目時,下面的所有文本框根據它們的綁定來填充。
但與組合框,我想知道你是否可以像這樣綁定它。
SelectedItem="{Binding ElementName=PersonGrid, Path=SelectedItem.SalutationLookupValue, Mode=TwoWay}"
我猜你不能這樣做。我想這樣來做,但即時通訊思想,我需要selectedItem設置SelectedSalutation綁定,並設置時所選擇的項目設定爲電網的..
public Person SelectedPersonResult
{
get { return _selectedPersonResult; }
set
{
SetObject(ref _selectedPersonResult, value, "SelectedPersonResult");
if (_selectedSalutationResult != null)
{
SelectedSalutation = SalutationList.Where(x => x.Value == SelectedPersonResult.SalutationLookupValue).FirstOrDefault();
}
}
}
重新編號喜歡做它的第一種方式(在XAML內),但我猜想做第二種方法是唯一的方法?
這應該工作,因爲我已經做了更多的在線閱讀有關它..但由於某種原因,我錯過了東西..這裏是組合框 telerik:RadComboBox> –
gevjen
2011-02-17 22:29:41