This question is locked. New answers and comments are not allowed.
I'm trying to emulate the functionality from http://demos.telerik.com/silverlight/#ScheduleView/FirstLook to include headers under each day for resource items.
My xaml page has the following RadListBox in it which changes based on a RadComboBox that is not included here. Whenever that RadComboBox changes, the items in this RadListBox changes also.
My ViewModel has the following:
This ResourceItemList is what gets re-populated whenever the RadComboBox changes. This is working fine. However, I am not sure of how to have the items in the RadListBox be the headers similar to the First Look example in the link above. My goal is to have them as groups and when you check/uncheck an item in the RadListBox it will show/hide the group.
How should I go about getting this to work with these items being dynamic?
Thanks,
Tim
My xaml page has the following RadListBox in it which changes based on a RadComboBox that is not included here. Whenever that RadComboBox changes, the items in this RadListBox changes also.
<StackPanel Name="ResourcePanel" Orientation="Vertical"> <TextBlock VerticalAlignment="Center" Text="Doctors:" Margin="3,3,3,3" telerik:StyleManager.Theme="Office_Silver"/> <telerik:RadListBox Name="ResList" Width="200" Height="200" ItemsSource="{Binding ResourceItemList, Mode=TwoWay}" > <telerik:RadListBox.ItemTemplate> <DataTemplate x:Name="ResourceTemplate"> <StackPanel Orientation="Horizontal"> <CheckBox ClickMode="Press" IsChecked="{Binding IsSelected, Mode=TwoWay}" telerik:StyleManager.Theme="Office_Silver"> <CheckBox.Content> <TextBlock Text="{Binding Name}"></TextBlock> </CheckBox.Content> </CheckBox> </StackPanel> </DataTemplate> </telerik:RadListBox.ItemTemplate> </telerik:RadListBox> </StackPanel>My ViewModel has the following:
private ObservableCollection<ResourceItem> _ResourceItemList; public ObservableCollection<ResourceItem> ResourceItemList { get { return _ResourceItemList; } set { if (_ResourceItemList != value) { _ResourceItemList = value; OnPropertyChanged("ResourceItemList"); } } }public MainPageViewModel(ILifestyleLiftServiceAgent serviceAgent) { this.ResourceItemList = new ObservableCollection<ResourceItem>(); // default resource list at first ResourceItemList.Add(new ResourceItem("First String", string.Empty, false)); ResourceItemList.Add(new ResourceItem("Second String", string.Empty, false)); ResourceItemList.Add(new ResourceItem("Third String", string.Empty, false)); }This ResourceItemList is what gets re-populated whenever the RadComboBox changes. This is working fine. However, I am not sure of how to have the items in the RadListBox be the headers similar to the First Look example in the link above. My goal is to have them as groups and when you check/uncheck an item in the RadListBox it will show/hide the group.
How should I go about getting this to work with these items being dynamic?
Thanks,
Tim