请帮助我:
如果我在 HubSection 中有一个 TextBox,如果我有 TextBox 的网格位于 DataTemplate 中,我如何从中获取数据?,
<Hub Style="{StaticResource HubStyle1}">
<Hub.Header>
<!-- Some stuff here -->
</Hub.Header>
<HubSection Width="731" Style="{StaticResource HubSectionStyle1}">
<DataTemplate>
<Grid FlowDirection="RightToLeft" Margin=" 0,10,0,0" >
<TextBox
Grid.Row="0"
Grid.Column="1"
Style="{StaticResource AddTextBlockStyle}" />
</Grid>
</DataTemplate>
</HubSection>
</Hub>
最佳答案
处理任何元素的Loaded
事件,sender参数将是该元素。保存参数以供以后访问。
关于c# - 访问 HubSection 内的数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20846807/