Listview
アイテムがselected
のときに境界線の背景を変更しようとしています。あなたのコードに基づいてリストビューで色を変更します
<Border x:Name="myback" Background="Transparent">
<ContentPresenter Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}"/>
</Border>
Listview
アイテムがselected
のときに境界線の背景を変更しようとしています。あなたのコードに基づいてリストビューで色を変更します
<Border x:Name="myback" Background="Transparent">
<ContentPresenter Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}"/>
</Border>
ボーダーのListViewItemのテンプレート内にある場合はその次のパスに移動してください場合、私は、不思議:C:\プログラムファイル(x86の)\ Windowsのキット\ 10 \設計時\ CommonConfiguration \ Neutral \ UAP \ 10.0.14393.0 \ Generic \ generic.xamlすべてのUWPコントロールのすべてのデフォルトスタイルを取得します。 ListViewItemスタイルを検索してください.2つのListViewItemスタイルがあります。ListViewItemExpandedという名前のスタイルをプロジェクトにコピーして、ListViewItemExpandedというスタイルでボーダーを追加してください。 ListViewItemが選択されている場合、選択/ PointerOverSelected/PressedSelected visualSTATEのを検索し、色を変更するため、内部に以下のXAMLコードを追加してくださいボーダーの背景を変更するために、その後
:
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="myback" Storyboard.TargetProperty="Background">
<DiscreteObjectKeyFrame KeyTime="0" Value="Red" />
</ObjectAnimationUsingKeyFrames>