This is a migrated thread and some comments may be shown as answers.

RadTabControl + Prism + Close Buttons

1 Answer 132 Views
TabControl
This is a migrated thread and some comments may be shown as answers.
Juliana
Top achievements
Rank 1
Juliana asked on 21 Jun 2010, 08:08 AM
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

1 Answer, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 24 Jun 2010, 12:04 PM
Hello Juliana,

Please take a look at the answer to your other thread here.

Best wishes,
Tina Stancheva
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
TabControl
Asked by
Juliana
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Share this question
or