win10应用UserControl

1   <Grid xmlns:src="using:UserControlExample" 
2          Margin="0,50,0,0">
3   <Grid.RowDefinitions>
4     <RowDefinition Height="Auto"/>
5     <RowDefinition Height="Auto"/>
6   </Grid.RowDefinitions>
7   <src:NameReporter Grid.Row="0"/>
8   <src:NameReporter Grid.Row="1" Margin="0,15,0,0"/>
9 </Grid>

要绑定 控件所在的位置

xmlns:src="using:UserControlExample" 


然后可以直接在工具箱拖出来使用
 <src:NameReporter Grid.Row="0"/>
原文地址:https://www.cnblogs.com/rongweijun/p/5322677.html