What is the difference between x:Reference and ElementName?

后端 未结 2 1808
余生分开走
余生分开走 2020-11-27 12:29

According to the x:Reference Markup Extension page on MSDN, x:Reference

References an instance that is declared elsewhere in XAML markup. Th

2条回答
  •  被撕碎了的回忆
    2020-11-27 13:22

    ElementName is platform specific. I.e. it may or may not be present based on which platform you're using. x:Reference elevates that concept to a XAML native feature. Thus any platform that supports XAML supports x:Reference.

提交回复
热议问题