Hello!
I have been fighting with this for a day now, and I'm running out of fuel. My main form has a Toolbars-collection containing ToolbarViewModels having properties like Band and BandIndex to bind to. I use the following xaml for my main form:
<telerik:RadToolBarTray
Name="Toolbars"
Grid.Row="1"
ItemsSource="{Binding Path=Toolbars}"
IsLocked="False"
>
<telerik:RadToolBarTray.ItemTemplate>
<DataTemplate>
<telerik:RadToolBar
Band="{Binding Path=Band}"
BandIndex="{Binding Path=BandIndex}"
ItemsSource="{Binding Path=Elements}"
>
<telerik:RadToolBar.ItemTemplate>
<DataTemplate>
...this part works, as the toolbars have content
</DataTemplate>
</telerik:RadToolBar.ItemTemplate>
</telerik:RadToolBar>
</DataTemplate>
</telerik:RadToolBarTray.ItemTemplate>
</telerik:RadToolBarTray>
As far as I can see, this should work. But what happens is that the last toolbar added to the Toolbars-collection is the topmost, and all other ones end up underneath it & invisible, stacked on top of each other in "Z-order". So in effect what doesn't seem to work is the BandIndex. The BandIndex getter of the view model is also accessed when the toolbar is added.
I have tried different alignment and content alignment combinations, but all toolbars still end up in the same place.
Any help appreciated,
Kim Johnsson
I have been fighting with this for a day now, and I'm running out of fuel. My main form has a Toolbars-collection containing ToolbarViewModels having properties like Band and BandIndex to bind to. I use the following xaml for my main form:
<telerik:RadToolBarTray
Name="Toolbars"
Grid.Row="1"
ItemsSource="{Binding Path=Toolbars}"
IsLocked="False"
>
<telerik:RadToolBarTray.ItemTemplate>
<DataTemplate>
<telerik:RadToolBar
Band="{Binding Path=Band}"
BandIndex="{Binding Path=BandIndex}"
ItemsSource="{Binding Path=Elements}"
>
<telerik:RadToolBar.ItemTemplate>
<DataTemplate>
...this part works, as the toolbars have content
</DataTemplate>
</telerik:RadToolBar.ItemTemplate>
</telerik:RadToolBar>
</DataTemplate>
</telerik:RadToolBarTray.ItemTemplate>
</telerik:RadToolBarTray>
As far as I can see, this should work. But what happens is that the last toolbar added to the Toolbars-collection is the topmost, and all other ones end up underneath it & invisible, stacked on top of each other in "Z-order". So in effect what doesn't seem to work is the BandIndex. The BandIndex getter of the view model is also accessed when the toolbar is added.
I have tried different alignment and content alignment combinations, but all toolbars still end up in the same place.
Any help appreciated,
Kim Johnsson