0
WPF XAML訪問自定義控制我有一個DataTemplate自定義控件`AutoCompleteTextBox如下圖所示:中的DataTemplate
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<StackPanel Orientation="Vertical">
<TextBlock
Text="{Binding Content, RelativeSource={RelativeSource Mode=TemplatedParent}}"
Margin="5" />
<Border DockPanel.Dock="Top"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Padding="2">
<uc:AutoCompleteTextBox x:Name="AutoTextBox" />
</Border>
</StackPanel>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
我怎麼能在代碼中訪問AutoTextBox
的背後?