This is a migrated thread and some comments may be shown as answers.

ListViewGroupHeader style

4 Answers 62 Views
ListView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Geoffrey
Top achievements
Rank 1
Geoffrey asked on 13 Feb 2016, 03:14 PM
Hi,

In the RadListView control, my data source is grouped twice.
I want, like the default ListView, that the group header stay at the top of the listview when I scroll until we reach an other group.

I want also that the bottom border of the group is gray.

I try that with no success :
1.<data:RadListView.GroupHeaderStyle>
2.                <Style TargetType="primitives:ListViewGroupHeader">
3.                    <Setter Property="Background" Value="Transparent" />
4.                    <Setter Property="BorderBrush" Value="Gray" />
5.                    <Setter Property="BorderThickness" Value="0,0,0,1" />
6.                </Style>
7.            </data:RadListView.GroupHeaderStyle>


Thanks in advance,
Geoffrey

4 Answers, 1 is accepted

Sort by
0
Tsvyatko
Telerik team
answered on 18 Feb 2016, 08:29 AM
Hello Geoffrey,

Currently RadListview does not support the freeze group header functionality. We do have plans to implement it, but it will be scheduled after Q2 release.

Regarding the group styling - we have located an issue with BorderBrush property. I have logged into our system and it will be addressed for the next internal build. Meanwhile you can you the following code as a workaround:

<Style TargetType="primitives:ListViewGroupHeader">
                  <Setter Property="Background" Value="Transparent" />
                  <Setter Property="BorderBrush" Value="Gray" />
                  <Setter Property="BorderThickness" Value="0,0,0,1" />
                  <Setter Property="HorizontalAlignment" Value="Stretch" />
                  <Setter Property="VerticalAlignment" Value="Stretch" />
                  <Setter Property="HorizontalContentAlignment" Value="Stretch" />
                  <Setter Property="VerticalContentAlignment" Value="Stretch" />
                  <Setter Property="IsTabStop" Value="False" />
                  <Setter Property="FontSize" Value="20" />
                  <Setter Property="MinHeight" Value="40" />
                  <Setter Property="Padding" Value="10 0" />
                  <Setter Property="ContentTemplate">
                      <Setter.Value>
                          <DataTemplate>
                              <TextBlock Text="{Binding Group.Key}" HorizontalAlignment="Left" VerticalAlignment="Center"/>
                          </DataTemplate>
                      </Setter.Value>
                  </Setter>
                  <Setter Property="Template">
                      <Setter.Value>
                          <ControlTemplate TargetType="primitives:ListViewGroupHeader">
                              <Grid>
                                  <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}"  BorderThickness="{TemplateBinding BorderThickness}">
                                      <ContentPresenter x:Name="testControl" Margin="{TemplateBinding Padding}"
                                            Content="{TemplateBinding DataContext}"  ContentTemplate="{TemplateBinding ContentTemplate}"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                                  </Border>
                              </Grid>
                          </ControlTemplate>
                      </Setter.Value>
                  </Setter>
              </Style>


I have updated your telerik points accordingly.

Please, excuse us for any inconvenience caused.

Regards,
Tsvyatko
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Geoffrey
Top achievements
Rank 1
answered on 18 Feb 2016, 06:20 PM
Thanks for your answer,

Freezing group is essential when you have lot of data in each group, please consider adding this feature in Q2 2016.

I have detected another bug, sometimes the listview does not resize correctly (see attached file). The space of the splitview is still here whereas it should not because I have an adaptive trigger that changed the display mode to Overlay (see bellow):

<VisualStateManager.VisualStateGroups>
            <VisualStateGroup x:Name="WindowStates">
                <VisualState x:Name="MobileState">
                    <VisualState.StateTriggers>
                        <stateTriggers:DeviceFamilyAdaptiveTrigger DeviceFamily="Mobile" />
                    </VisualState.StateTriggers>
                    <VisualState.Setters>
                        <Setter Target="SplitView.DisplayMode" Value="Overlay" />
                    </VisualState.Setters>
                </VisualState>
            </VisualStateGroup>
        </VisualStateManager.VisualStateGroups>


Moreover, in the readme of internal build for UWP, why changes are not displayed like in WPF. It's just writed NA.

Thanks in advance.
0
Geoffrey
Top achievements
Rank 1
answered on 18 Feb 2016, 06:21 PM
And the missing attached file.
0
Tsvyatko
Telerik team
answered on 23 Feb 2016, 09:37 AM
Hello Geoffrey,

Thank you for reporting this issue! Unfortunately, we are unable to get the same result from our side. Would it be possible to check the attached project and let us know how it can be modified to expose the issue. Specific steps or code snippet of the xaml structure of the page will help us identify and address the problem.

Regarding the frozen group headers, we will do our best to implement them earlier and ship them with Q2.

Regards,
Tsvyatko
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
ListView
Asked by
Geoffrey
Top achievements
Rank 1
Answers by
Tsvyatko
Telerik team
Geoffrey
Top achievements
Rank 1
Share this question
or