0

ユニバーサル Windows アプリケーションでラジオ ボタンを動的に設定しようとしています。私はすでにVisualStateさまざまな画面について書いています。ここで、ウィンドウの幅全体を使用する必要があるラジオ ボタンを設定しようとしました。すべての VisualState に固定幅を設定できますが、それは良い習慣ではなく、さらに処理するのが難しいと思います。 大きなタブでは、ラジオボタンは次のように表示されます

 <GridView Grid.Row="1" Height="auto" Width="auto" HorizontalAlignment="Stretch" ItemsSource="{Binding DamageLocationList}">
                            <GridView.ItemsPanel>
                                <ItemsPanelTemplate>
                                    <VariableSizedWrapGrid Orientation="Horizontal" />
                                </ItemsPanelTemplate>
                            </GridView.ItemsPanel>
                            <GridView.ItemTemplate>
                                <DataTemplate x:DataType="model:DamageLocations">
                                <Grid>
                                     <RadioButton Style="{StaticResource ButtonRadioButtonStyle}"  HorizontalContentAlignment="Center" HorizontalAlignment="Stretch" IsChecked="{Binding IsChecked, UpdateSourceTrigger=PropertyChanged}"  Content="{Binding DamageLocation}"   Margin="0" Click="RadioButton_Checked"  />
                                </Grid>
                                </DataTemplate>
                            </GridView.ItemTemplate>
                        </GridView>
4

1 に答える 1