Hi,
I create a toolbar with a four buttons. If I append the buttons to the toolbar in XAML, all OK.
I create a toolbar with a four buttons. If I append the buttons to the toolbar in XAML, all OK.
<tn:RadToolBar UseLayoutRounding="True" Grid.Row="0" |
x:Name="tbMain1"><BR><Button Content="Button 1" |
tn:RadToolBar.OverflowMode="Never"/><BR><Button Content="Button 2" |
tn:RadToolBar.OverflowMode="Never"/><BR><Button Content="Button 3" |
tn:RadToolBar.OverflowMode="Never"/><BR><Button Content="Button 4" |
tn:RadToolBar.OverflowMode="Never"/><BR></tn:RadToolBar> |
Now, I'm defining a DataTemplate for the toolbar...
<tn:RadToolBar UseLayoutRounding="True" Grid.Row="0" |
x:Name="tbMain"><BR><tn:RadToolBar.ItemTemplate><BR><DataTemplate><BR><Button |
Content="{Binding Path=Caption}" |
tn:RadToolBar.OverflowMode="Never"/><BR></DataTemplate><BR></tn:RadToolBar.ItemTemplate><BR></tn:RadToolBar> |
... and assign ItemSource property in code-behind file...
IList<ItemViewModel> models = new List<ItemViewModel><BR>{<BR>new |
ItemViewModel(ItemType.Command, "Command 1"),<BR>new |
ItemViewModel(ItemType.Tool, "Tool 1"),<BR>new ItemViewModel(ItemType.Command, |
"Command 2"),<BR>new ItemViewModel(ItemType.Tool, "Tool |
2")<BR>};<BR>tbMain.ItemsSource = models;<BR> |
Now, I'm resizing the browser window so that last button on the toolbar is hidden.
After the browser window is maximized, the number of buttons is doubled.
SL 3, IE 8, Telerik 2009.3.1322.1030