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

Screen Not Updating with Horizontal Orientation

2 Answers 47 Views
TabControl
This is a migrated thread and some comments may be shown as answers.
heavywoody
Top achievements
Rank 1
heavywoody asked on 28 Feb 2013, 06:49 PM
I want tab controls to go vertically up the lefthand side.  But what is happening is space is always allocated in the grid for if it where horizontal and then the ViewModel name is shown in the Grid.  I have looked at there is nothing else being render in that column of hte control.  So I don't know how to refresh the screen after the tabcontrol has went verical and get rid of the viewmodel name being displayed.

Here is XAML

<Border Grid.Row="1" telerikControls:StyleManager.Theme="Expression_Dark">
            <Grid>
            	<!--<Grid.Effect>
            		<DropShadowEffect BlurRadius="10" Color="Black"/>
            	</Grid.Effect>-->
 
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="*"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <telerik:RadTabControl x:Name="tabDisplays" Grid.Column="0" TabOrientation="Horizontal"
                                       TabStripPlacement="Left" Align="Right"
                                       telerikControls:StyleManager.Theme="Expression_Dark"
                                       ItemsSource="{Binding Path=DisplayTabs}" SelectionChanged="RadTabControl_SelectionChanged_1">
                    <telerik:RadTabControl.ItemTemplate>
                        <DataTemplate>
                            <TextBlock Text="{Binding Name}" />
                        </DataTemplate>

Code behind
this.DataContext = new MainWindowViewModel();

2 Answers, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 05 Mar 2013, 04:19 PM
Hi Christian,

In order to display the proper content in the RadTabItems Content, you need to apply a ContentTemplate on the RadTabControl. The ContentTemplate defines a DataTemplate that controls how the business data will be visualized inside the content of each tab.

Also I'm not sure if you need a horizontal or vertical alignment of the content of the tabs, but please have in mind that the TabOrientation property controls that behavior. When set to vertical, the RadTabControl will make sure to rotate the tabs to display their content horizontally.

I attached a sample solution demonstrating how to setup your control per your requirements. Please have a look at it and let me know if I can further assist you.

All the best,
Tina Stancheva
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
heavywoody
Top achievements
Rank 1
answered on 05 Mar 2013, 04:34 PM
Thank you very much!  That did the trick!
Tags
TabControl
Asked by
heavywoody
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
heavywoody
Top achievements
Rank 1
Share this question
or