c# - 访问 HubSection 内的数据

标签 c# xaml windows-8.1

请帮助我:

如果我在 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/

相关文章:

c# - 使用 Owin 在自托管的 Web API 中获取远程主机 IP

c# - Azure Active Directory WebApi - 服务器到服务器

c# - 向图像添加行为

css - 禁用 Internet Explorer 11 自动缩放缩放至视口(viewport)宽度 - IE11

c# - 为什么这个 ListView 不滚动?

c# - 从 List<ItemDetails> 是实体的类创建 XML

c# - 我得到 'A project cannot have more than one ApplicationXaml item'

wpf - 在密码框中捕获返回键的最佳方法是什么? (WPF/XAML)

xaml - 向 {x :Bind} in XAML Universal Windows Platform 添加额外的字符串

MySQL Server 5.7.7 安装卡在 Windows 8.1 上的 "Starting Server"