Hi to all,
I configured a Listbox with single Group, but if I change a GroupStyle, Group item not longer appears.
my XAML/C# code is this, and I attached a screenshots (where I put a red rectangle, it not shows my value), where I wrong?
01.
FastSearchItems =
new
ObservableCollection<FastSearchItem>();
02.
var view =
new
CollectionViewSource();
03.
view.GroupDescriptions.Add(
new
PropertyGroupDescription(propertyName:
"Tipo"
));
04.
view.Source = FastSearchItems;
05.
FastSearchItemsFound = view;
06.
07.
//Add several items
08.
FastSearchItems.Add(
new
FastSearchItem(
/*parameter values*/
));
09.
//[..]
01.
<
telerik:RadListBox
x:Name
=
"FastSearchRadListBox"
ItemsSource
=
"{Binding FastSearchItemsFound.View}"
02.
Grid.Row
=
"2"
Width
=
"300"
Grid.Column
=
"2"
03.
MouseDoubleClick
=
"FastSearchRadListBox_MouseDoubleClick"
04.
VerticalAlignment
=
"Top"
05.
Height
=
"400"
Visibility
=
"{Binding FastSearchIsDropDownOpen,Converter={StaticResource VisibilityConverter}}"
06.
ScrollViewer.VerticalScrollBarVisibility
=
"Auto"
07.
ScrollViewer.HorizontalScrollBarVisibility
=
"Disabled"
>
08.
<
telerik:RadListBox.ItemsPanel
>
09.
<
ItemsPanelTemplate
>
10.
<
StackPanel
Orientation
=
"Vertical"
/>
11.
</
ItemsPanelTemplate
>
12.
</
telerik:RadListBox.ItemsPanel
>
13.
<
telerik:RadListBox.ItemTemplate
>
14.
<
DataTemplate
>
15.
<
StackPanel
>
16.
<
TextBlock
Text
=
"{Binding Caption}"
/>
17.
</
StackPanel
>
18.
</
DataTemplate
>
19.
</
telerik:RadListBox.ItemTemplate
>
20.
<
telerik:RadListBox.GroupStyle
>
21.
<
GroupStyle
>
22.
<
GroupStyle.HeaderTemplate
>
23.
<
DataTemplate
>
24.
<
StackPanel
Orientation
=
"Vertical"
Background
=
"#FAFAFA"
>
25.
<
TextBlock
Text
=
"{Binding Caption}"
FontWeight
=
"Bold"
/>
26.
</
StackPanel
>
27.
</
DataTemplate
>
28.
</
GroupStyle.HeaderTemplate
>
29.
</
GroupStyle
>
30.
</
telerik:RadListBox.GroupStyle
>
31.
</
telerik:RadListBox
>