0

リストのアイテムがタッチされたときの背景色を変更したい。XAML でこれを行うことはできますか?

        <ListBox x:Name="lstFlags">
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <Grid>
                         ...
                    </Grid>
                </DataTemplate>
            </ListBox.ItemTemplate>

            <ListBox.ItemContainerStyle>
                <Style TargetType="ListBoxItem">
                    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
                </Style>
            </ListBox.ItemContainerStyle>
        </ListBox>
4

1 に答える 1