With .NET 4.0 Microsoft will bring up a improved version of XAML. This arcitle shows you the language enhancements they made.

Easy Object References with {x:Reference}

If you want to create an object reference today you need to do a databinding and declare the source with an ElementName. In XAML 2009 you can use the new {x:Reference} markup extension

<!-- XAML 2006 -->
<Label Target="{Binding ElementName=firstName}">FirstName</Label>
<TextBox x:Name="firstName" />
 
<!-- XAML 2009 -->
<Label Target="{x:Reference firstName}">FirstName</Label>
<TextBox x:Name="firstName" />

相关文章:

  • 2021-06-10
  • 2022-12-23
  • 2021-06-30
  • 2021-11-18
  • 2021-11-08
  • 2021-12-27
  • 2021-12-21
  • 2021-07-02
猜你喜欢
  • 2021-05-23
  • 2022-12-23
  • 2021-09-24
  • 2022-12-23
  • 2022-12-23
  • 2021-08-30
  • 2021-11-15
相关资源
相似解决方案