wpf如何取得DataTemplate中嵌入的winform的控件名称?
如何取得picBox这一名称?
<DataTemplate x:Key="cardViewDataTemplate">
<Border HorizontalAlignment="Left" Grid.Row="0" Grid.Column="0" Grid.RowSpan="2" Width="80"
Margin="9" Height="80" VerticalAlignment="Top">
<WindowsFormsHost Height="Auto" Width="Auto" HorizontalAlignment="Left" Margin="20,112,0,0" x:Name="windowsFormsHost1" VerticalAlignment="Top" >
<WinFormControls:PictureBox Text="WinformButton" x:Name="picBox" />
</WindowsFormsHost>
</Border >
</DataTemplate>
好像不能读取的吧。可以set
DataTemplate dd = this.window.Resources["tmp"] as DataTemplate;