I am trying to change the border background when a Listview
item is selected
.
<Border x:Name="myback" Background="Transparent">
<ContentPresenter Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}"/>
</Border>
Based on your code, I wonder if the Border is inside the template of the ListViewItem, if so please go to the following path: C:\Program Files (x86)\Windows Kits\10\DesignTime\CommonConfiguration\Neutral\UAP\10.0.14393.0\Generic\generic.xaml to get all the default style for all the UWP controls. Then please search for the ListViewItem style, you will find two ListViewItem style, Please copy the the style which is named as ListViewItemExpanded to your project and add your Border in side the ListViewItemExpanded style.
After that in order to change the Border Background when a ListViewItem is selected, please search for the Selected/PointerOverSelected/PressedSelected VisualState and add the following XAML code inside it for changing color:
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="myback" Storyboard.TargetProperty="Background">
<DiscreteObjectKeyFrame KeyTime="0" Value="Red" />
</ObjectAnimationUsingKeyFrames>