如何在c#中访问集线器部分控件

时间:2015-01-01 08:31:12

标签: c# windows-phone-8.1

<Hub x:Name="Hub" x:Uid="Hub" Header="Clock +" Background="Black"  

SectionsInViewChanged="Hub_SectionsInViewChanged">




        <HubSection Tag="0" Name="WorldClock" x:Uid="WorldClock" Header="WORLD CLOCK" 
                    DataContext="{Binding Groups}" HeaderTemplate="{ThemeResource HubSectionHeaderTemplate}" FontSize="22" >
            <DataTemplate>
                <Grid>

                    <Grid.RowDefinitions>

                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="*" />

                    </Grid.RowDefinitions>

                    <TextBlock Style="{StaticResource SubheaderTextBlockStyle}" 
                       Grid.Row="1" Margin="0,10,0,0" TextWrapping="Wrap" 
                       Text="" x:Name="date_time_block"/>

                </Grid>

            </DataTemplate>

        </HubSection>

我主要担心的是,在上面的代码中,我想知道如何在c#中访问该文本块的文本块。我知道c#但是对XAML有点了解。如果我把文本块放在hub部分之外它是可以访问的,但当我放入hub部分时它不是请帮助!!

0 个答案:

没有答案
相关问题