0
ListBox에 데이터를 표시하는 자체 UserControl을 작성하고 있습니다. "DisplayMemberPath"와 같은 속성을 구현하고 싶습니다. 필자의 예에서는 "EditableMemberPath"로, 텍스트 상자에 표시 될 멤버를 결정해야합니다. 그러나 바인딩에서 바인딩을 사용하면 작동하지 않습니다.다른 바인딩에 바인딩 된 바인딩 경로를 어떻게 얻을 수 있습니까?
<ListBox ItemsSource="{Binding Path=Items, ElementName=me}"
SelectedItem="{Binding Path=SelectedItem, ElementName=me}">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel>
<Image Source="{Binding Converter={Binding Path=ItemToImageConverter, ElementName=me}}" />
<TextBlock Text="{Binding Path={Binding Path=EditableMemberPath, ElementName=me}}" />
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
적절한 해결책을 찾도록 도와 줄 수 있습니까?
안부
올리버 Hanappi
: http://stackoverflow.com/questions/777991/how-do-i-bind - 바인딩 경로 속성 대 기본 데이터/778146 # 778146 –