开发者

Binding Between elements inside DataTemplate

开发者 https://www.devze.com 2023-01-19 14:32 出处:网络
How can I make binding between properties of two elements inside dataTemplate ? example : // Bind Text property to Content pro开发者_如何学Pythonperty

How can I make binding between properties of two elements inside dataTemplate ?

example : // Bind Text property to Content pro开发者_如何学Pythonperty

<DataTemplate>
  <TextBox Text="{Binding}" />
  <Label Content="{Binding}" />
</Datatemplate>


If I correctly understood.

<DataTemplate>
<TextBox x:Name="p_text" Text="{Binding login}"/>
<Button Content="{Binding ElementName=p_text, Path Text}"/>
</DataTemplate>
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号