asusralis
Topic Author
Posts: 142
Joined: 30 Jul 2018, 05:03

GridView's ColumnHeaderContainerStyle changes in Blend but not in Noesis.

22 Nov 2018, 14:15

Blend: https://i.imgur.com/mWAdvbj.png

Noesis: https://i.imgur.com/w56ATDJ.png

I'm trying to change both the header's background, foreground, and font size, but I wasn't sure what I'm doing wrong.
 
User avatar
sfernandez
Site Admin
Posts: 2984
Joined: 22 Dec 2011, 19:20

Re: GridView's ColumnHeaderContainerStyle changes in Blend but not in Noesis.

22 Nov 2018, 18:45

I'm seeing that ColumnHeaderContainerStyle property is not being applied to the generated header controls, and also our default template for the GridViewColumnHeader is not binding to the control properties like Background, so changes there will not reflect in the header representation.
Could you please report it in our bugtracker, we will fix it as soon as we can.

In the meantime you can redefine the default style and template in your xaml:
<Grid
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <Grid.Resources>
        <ControlTemplate x:Key="GridViewHeaderTemplate" TargetType="GridViewColumnHeader">
            <Border Background="Black">
                <ContentPresenter VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" />
            </Border>
        </ControlTemplate>
        <Style TargetType="GridViewColumnHeader">
            <Setter Property="Foreground" Value="Orange"/>
            <Setter Property="FontSize" Value="30"/>
            <Setter Property="Template" Value="{StaticResource GridViewHeaderTemplate}"/>
        </Style>
    </Grid.Resources>
    <ListView .../>
</Grid>
 
asusralis
Topic Author
Posts: 142
Joined: 30 Jul 2018, 05:03

Re: GridView's ColumnHeaderContainerStyle changes in Blend but not in Noesis.

24 Nov 2018, 23:01

Oops, the second picture was supposed to be the unchanged header in Unity.

I will submit it, thanks.
 
User avatar
sfernandez
Site Admin
Posts: 2984
Joined: 22 Dec 2011, 19:20

Re: GridView's ColumnHeaderContainerStyle changes in Blend but not in Noesis.

27 Nov 2018, 18:04

Ok, thanks.

Who is online

Users browsing this forum: Ahrefs [Bot] and 42 guests