[英]How to get an instance UserControl from XAML?
In XAML, I put an user control.在 XAML 中,我放置了一个用户控件。 I'd like to get that instance in initialize component in C# code.
我想在 C# 代码中的初始化组件中获取该实例。
Use the x:Name
property in the XAML, and you will be able to reference it by that name from the code behind.使用 XAML 中的
x:Name
属性,您将能够从后面的代码中通过该名称引用它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.