如何在Windows應用商店應用程序中更改ListView中的ListView項目選擇樣式?我想更改顏色,邊距並刪除複選框。我曾試圖改變各種Blend中的模板,但我想不出這一個:-(更改列表查看項目選擇樣式
XAML代碼:
<Page
x:Class="WindowsStoreListViewSelectionTest.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:WindowsStoreListViewSelectionTest"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Page.DataContext>
<local:BasicData/>
</Page.DataContext>
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<ListView ItemsSource="{Binding ListData}" SelectedIndex="1">
</ListView>
</Grid>
C# - 代碼:
public class BasicData
{
public BasicData()
{
_ListData = new ObservableCollection<object>();
ListData.Add("Alfa");
ListData.Add("Beta");
ListData.Add("Gamma");
}
private ObservableCollection<object> _ListData;
public ObservableCollection<object> ListData
{
get
{
return _ListData;
}
}
}