locked
how can i set set control's property in the gridview control?( win8 metro)

    Question

  • xaml file as follow

    <Grid Grid.Row="1" Background="White">

                <!-- コンテンツ -->
                <GridView
                x:Name="itemGridViewLeft"
                AutomationProperties.AutomationId="ItemGridView"
                AutomationProperties.Name="Grouped Items"            
                Padding="80,20,40,46"
                ItemsSource="{Binding Source={StaticResource leftGroupedItemsViewSource}}"
                SelectionMode="None"
                IsSwipeEnabled="false"
                IsItemClickEnabled="True"
                ItemClick="ItemView_ItemClick"  Foreground="{ThemeResource IMECandidateListPagingButtonBorderThemeBrush}">
                    <GridView.Background>
                        <SolidColorBrush Color="White"/>
                    </GridView.Background>
                    <GridView.ItemTemplate>
                        <DataTemplate>
                            <Grid HorizontalAlignment="Left" Width="256" Height="256" Background="White" Margin="0,0,0,0" PointerPressed="ItemView_PointPressed"  PointerReleased="ItemView_PointRelease">
                                <Border Background="#FFA9AAAD">
                                    <Image Source="{Binding ImagePath}" Stretch="Uniform" AutomationProperties.Name="{Binding Title}" />
                                </Border>
                                <Grid  x:Name="BookDeletePane" Background="Transparent" Visibility="{Binding DeleteButtonShow}">
                                    <Ellipse  x:Name="BookDelete" Margin="190,190,0,0"  Width="60" Height="60">
                                        <Ellipse.Fill>
                                            <ImageBrush Stretch="UniformToFill" ImageSource="../uninstall_normal.png" />
                                        </Ellipse.Fill>
                                    </Ellipse>
                                </Grid>

                                <Ellipse  x:Name="BookUpdate" Margin="0,0,190,190"  Width="60" Height="60">
                                    <Ellipse.Fill>
                                        <ImageBrush ImageSource="../updated_normal.png" />
                                    </Ellipse.Fill>
                                </Ellipse>
                                <Rectangle  x:Name="BookExpiration" Margin="30,98,30,98"  Width="200" Height="60" >
                                    <Rectangle.Fill>
                                        <ImageBrush Stretch="UniformToFill" ImageSource="../expiration_transparency.png" />
                                    </Rectangle.Fill>
                                </Rectangle>
                                <StackPanel Orientation="Horizontal"  x:Name="UninstallPane" Background="Transparent" >
                                    <Ellipse  x:Name="BookUninstall" Margin="40,0,0,0" Width="180" Height="180">
                                        <Ellipse.Fill>
                                            <ImageBrush Stretch="UniformToFill" ImageSource="../downloadNotYet_transparency.png" />
                                        </Ellipse.Fill>
                                    </Ellipse>
                                </StackPanel>
                                <ProgressBar x:Name="UpdateProgressBar"  Value="{Binding InstallIndicator}"  Width="200" Height="50" Margin="30,98,0,98"/>
                            </Grid>
                        </DataTemplate>
                    </GridView.ItemTemplate>
                    <GridView.ItemsPanel>
                        <ItemsPanelTemplate>
                            <ItemsWrapGrid GroupPadding="0,0,70,0"/>
                        </ItemsPanelTemplate>
                    </GridView.ItemsPanel>
                    <GridView.GroupStyle>
                        <GroupStyle>
                            <GroupStyle.HeaderTemplate>
                                <DataTemplate>
                                    <Grid Margin="0,0,0,2">
                                        <Button Foreground="{ThemeResource ApplicationHeaderForegroundThemeBrush}"
                                        AutomationProperties.Name="Group Title"
                                        Style="{StaticResource TextBlockButtonStyle}" >
                                        </Button>
                                    </Grid>
                                </DataTemplate>
                            </GroupStyle.HeaderTemplate>
                        </GroupStyle>
                    </GridView.GroupStyle>
                </GridView>

    in c# function(not event handle function),how can i find the  control(for example, I want to find all the comtol int the grid view control) and then set the property of them?

    Note:  Not in the event handle function (click,tap,PointerPressed etc.)

    Friday, July 4, 2014 7:22 AM

Answers