ListViewGroupHeader style

5 posts, 0 answers
  1. Geoffrey
    Geoffrey avatar
    48 posts
    Member since:
    Mar 2013

    Posted 13 Feb Link to this post

    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
  2. Tsvyatko
    Admin
    Tsvyatko avatar
    833 posts

    Posted 18 Feb Link to this post

    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
  3. Geoffrey
    Geoffrey avatar
    48 posts
    Member since:
    Mar 2013

    Posted 18 Feb in reply to Tsvyatko Link to this post

    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.
  4. Geoffrey
    Geoffrey avatar
    48 posts
    Member since:
    Mar 2013

    Posted 18 Feb Link to this post

    And the missing attached file.
  5. Tsvyatko
    Admin
    Tsvyatko avatar
    833 posts

    Posted 23 Feb Link to this post

    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
Back to Top