I am new in WPF. In WPF application I used Listview
showing snap of listview below:-
Problem is that the empty space between grid column header and vertical scroll bar in listview (gridview)
I think its because of last blank column of grid is there any way to remove blank column or any alignment property for this to extend the width of my column "Device Name"
Below is my XAML for Listview-Gridview
<ListView x:Name="lstviewDevices" Height="263" ScrollViewer.HorizontalScrollBarVisibility="Disabled" HorizontalAlignment="Left" Margin="37,89,0,0" VerticalAlignment="Top" Width="128" SelectionChanged="lstviewDevices_SelectionChanged">
<ListView.Resources>
<Style TargetType="{x:Type GridViewColumnHeader}">
<Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="Background" Value="#adb8ca" />
<Setter Property="Foreground" Value="#fff" />
<Setter Property="FontSize" Value="15" />
<Setter Property="FontFamily" Value="sans-serif" />
<Setter Property="FontWeight" Value="SemiBold" />
<!--<Setter Property="Margin" Value="3,0,-7,1" />-->
</Style>
<Style TargetType="{x:Type ListViewItem}">
<Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="Background" Value="White" />
<Setter Property="Foreground" Value="#337ab7" />
<Setter Property="FontSize" Value="13" />
<Setter Property="FontFamily" Value="Roboto" />
</Style>
</ListView.Resources>
<ListView.View>
<GridView>
<GridViewColumn Header="Device Name" Width="Auto" DisplayMemberBinding="{Binding DeviceName}"/>
</GridView>
</ListView.View>
</ListView>
Are there any inputs on same ?
thanks in advance
Width="*"
on GridViewColumn – ASh