Hi,
I used solution offered by Miroslav (http://www.telerik.com/community/forums/silverlight/tabcontrol/tab-control-and-prism.aspx#1002398 the one with binding in view). And it works pretty well untill I need to add close buttons to headers. I tried to add close buttons according to http://www.telerik.com/help/silverlight/radtabcontrol-how-to-add-close-button-to-the-tab-headers.html , but I got an error "Can not set HeaderTemplate/Selector and DisplayMemberPath simultaneously". If I delete DisplayMemberPath="HeaderInfo" and set binding in datatemplate like
<DataTemplate x:Key="CloseTemplate">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" TextWrapping="Wrap"
Text="{Binding HeaderInfo}"/>
<Button Grid.Column="1" Margin="3 0 0 0" Content="x"
HorizontalAlignment="Right"
VerticalAlignment="Center"
example:RoutedEventHelper.EnableRoutedClick="True" />
</Grid>
</DataTemplate>
Header stiil does not seem to appear.
How can I bind item header to view name and have close button at the same time?
Thanks in advance,
Juliana
I used solution offered by Miroslav (http://www.telerik.com/community/forums/silverlight/tabcontrol/tab-control-and-prism.aspx#1002398 the one with binding in view). And it works pretty well untill I need to add close buttons to headers. I tried to add close buttons according to http://www.telerik.com/help/silverlight/radtabcontrol-how-to-add-close-button-to-the-tab-headers.html , but I got an error "Can not set HeaderTemplate/Selector and DisplayMemberPath simultaneously". If I delete DisplayMemberPath="HeaderInfo" and set binding in datatemplate like
<DataTemplate x:Key="CloseTemplate">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" TextWrapping="Wrap"
Text="{Binding HeaderInfo}"/>
<Button Grid.Column="1" Margin="3 0 0 0" Content="x"
HorizontalAlignment="Right"
VerticalAlignment="Center"
example:RoutedEventHelper.EnableRoutedClick="True" />
</Grid>
</DataTemplate>
Header stiil does not seem to appear.
How can I bind item header to view name and have close button at the same time?
Thanks in advance,
Juliana