glennelong


Comments:

Part1: DataGridView For WPF « C# Disciples

posted by glennelongglennelong(0) 3 years, 5 months ago 0

=) Thanks for the additional informatin on controls:DataGridViewColumn. A problem I am experiencing using either method to display the DataGrid is formatting. When I try to add a WPF style, I lose the column headings. I have tried numerous settings with no joy. My goal is to do nothing more than round the corners of the otherwise boring listbox. At that point the headers seem to lose their mission and disappear.

Thanks

One Example:

<Style x:Key="RoundListBoxStyle" BasedOn="{x:Null}" TargetType="{x:Type ListView}">
<Setter Property="Foreground" Value="#FF000000" />
<Setter Property="Background" Value="LightSteelBlue" />
<Setter Property="FontFamily" Value="Arial" />
<Setter Property="FontSize" Value="12" />
<Setter Property="FontWeight" Value="Normal" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListView">
<Grid x:Name="Root">
<Border Padding="5" Background="LightSteelBlue" CornerRadius="5">
<ScrollViewer x:Name="ScrollViewer" Padding="{TemplateBinding Padding}">
<ItemsPresenter />
</ScrollViewer>
</Border>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>

Reply