ListViewのスクロールをPixel単位にする
2021-03-14
VirtualizingPanel.ScrollUnit="Pixel" を設定する。
MainWindow.xaml
<Window x:Class="WpfApp19.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WpfApp19"
mc:Ignorable="d"
Title="MainWindow" Height="250" Width="400">
<Grid>
<ListView x:Name="lstView" Margin="30" ItemsSource="{Binding arrayString}" VirtualizingPanel.ScrollUnit="Pixel">
<ListView.ItemTemplate>
<DataTemplate>
<Button Height="50" Width="100" Content="{Binding}"/>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</Grid>
</Window>
関連記事
ListViewの中身の幅をいっぱいに広げる
MainWindow.xaml <Window x:Class="WpfA ...
ListViewを横並びにする
MainWindow.xaml <Window x:Class="WpfA ...
ListViewのマウスオーバー時・選択時の色を消す
MainWindow.xaml <Window x:Class="WpfA ...
Windowの子要素を再帰検索する
MainWindow.xaml <Window x:Class="WpfA ...
WPFの起動時に複数の画面を表示する
App.xamlのStartupUriを消去し、自動起動される画面を除去 ・修正 ...
ディスカッション
コメント一覧
まだ、コメントがありません