1
我需要自定義由Scrollview.horizontalscrollbarvisibility創建的滾動條。目前滾動條非常薄,不像標準滾動條。我試着改變scrollview的樣式,但沒有屬性來設置高度/寬度/顏色。XAML在ListView中定製滾動條(UWP)
<Grid x:Name="Playlist"
Visibility="{Binding IsShow}"
Width="960" >
<ListView x:Name="listview"
ScrollViewer.HorizontalScrollBarVisibility="Auto"
ScrollViewer.IsHorizontalRailEnabled="True"
ItemsSource="{Binding Path=YourCollection}"
GotFocus="StackPanel_GotFocus"
IsItemClickEnabled="True"
ItemClick="ListView_ItemClick"
Margin="125,198,125,19">
<ListView.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal"
Height="200"/>
</ItemsPanelTemplate>
</ListView.ItemsPanel>
<ListView.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Vertical"
Height="200"
Width="256">
<StackPanel Orientation="Horizontal">
<Image Source="{Binding Image}"
Height="144"
Width="256"
HorizontalAlignment="Stretch"
VerticalAlignment="Top"/>
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding Title}"
Height="56"
Width="256"
HorizontalAlignment="Stretch"
VerticalAlignment="Bottom"/>
</StackPanel>
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</Grid>