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

ListView Styling

2 Answers 106 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.
Craig Neblett
Top achievements
Rank 1
Craig Neblett asked on 27 May 2015, 06:02 PM

I'd like to be able to modify or remove the selection adornment, but don't see that documented anywhere.

2 Answers, 1 is accepted

Sort by
0
shree
Top achievements
Rank 1
answered on 28 May 2015, 10:53 AM

Hi ALL,

 

IM Using telerik listview(universal)  added both SortDescriptors , GroupDescriptors. Sorting is on Date and groupping in on string(date string).

 <Data:RadListView Grid.Row="2" 
x:Name="lstMessages"
            ItemsSource="{Binding Messages}"
HorizontalAlignment="Stretch" 
VerticalAlignment="Bottom" 
            MinWidth="10"
VerticalContentAlignment="Bottom"                    
Background="Transparent" 
   SelectionMode="Single"
ItemTemplateSelector="{StaticResource MessageTemplateSelector}"  
SelectedItem="{Binding SelectedMessage, Mode=TwoWay}"
Loaded="lstMessages_Loaded" IncrementalLoadingMode="Auto"  EnsureCurrentItemIntoView="True" 
         IsSynchronizedWithCurrentItem="True">

            <Data:RadListView.GroupHeaderStyle>
                <Style TargetType="Primitives:ListViewGroupHeader">
                    <Setter Property="Background" Value="Transparent"/>
                    <Setter Property="HorizontalAlignment" Value="Stretch"/>
                    <Setter Property="HorizontalContentAlignment" Value="Center"/>
                    <Setter Property="Foreground" Value="{StaticResource ConversationForeground}"/>
                    <Setter Property="FontSize" Value="13" />
                    <!--ItemsSource="{Binding Messages}"-->
                </Style>
            </Data:RadListView.GroupHeaderStyle>

            <Data:RadListView.SortDescriptors>
                <Core:PropertySortDescriptor PropertyName="Date" SortOrder="Ascending"/>
            </Data:RadListView.SortDescriptors>

            <Data:RadListView.GroupDescriptors>
                <Core:PropertyGroupDescriptor SortOrder="Ascending"   PropertyName="GroupDate"/>
            </Data:RadListView.GroupDescriptors>

 

im showing group like yesterday, day before yesterday...23/May/2015...so on but when i sort by date it should show today date at last but it is shwoing yesterday group at the last. So how i can sort by date with Grouppping string.

 

Thank you

0
Rosy Topchiyska
Telerik team
answered on 01 Jun 2015, 03:55 PM
Hi guys,

I will try to answer your questions in one post.

@ Craig:
I have attached a project with the default style of the RadListViewItem, which you can modify to customize the appearance of the items. 

@ Shree:
If you are grouping by a string value, then the groups will be ordered lexicographically. If you wish to order them by the actual DateTime value, then you can use a property of type DateTime. I would like turn your attention to the fact that the context of this thread is not related to your issue. If you have further questions, I would like to kindly ask you to open a new thread. This will help us to better handle your case.

I hope this was helpful. Please, let us know if you have any other questions. 

Regards,
Rosy Topchiyska
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
Craig Neblett
Top achievements
Rank 1
Answers by
shree
Top achievements
Rank 1
Rosy Topchiyska
Telerik team
Share this question
or