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

tabcontrol inside radwindow

1 Answer 51 Views
Window
This is a migrated thread and some comments may be shown as answers.
NS
Top achievements
Rank 1
NS asked on 09 Oct 2008, 01:09 PM
Hello,
My Radwindow is declared as follow:
<telerik:RadWindow x:Name="window" ResizeMode="NoResize" Width="500" Height="300" Header="User Information" WindowStartupLocation="CenterScreen" LeftOffset="-150" TopOffset="-50" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">  
            <ADTool:ADUserDetail x:Name="usrCtrlUserDetail" /> 
        </telerik:RadWindow> 

ADUserDetail contains the following code (including tabcontrol)
<UserControl x:Class="SilverlightADTool.ADUserDetail" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"   
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation" 
    d:DesignWidth="1024" d:DesignHeight="768" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d">  
    <Grid x:Name="LayoutRoot" Background="White" Width="Auto" Height="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">  
        <Grid.RowDefinitions> 
            <RowDefinition Height="0.062*"/>  
        </Grid.RowDefinitions> 
        <telerik:RadTabControl HorizontalAlignment="Stretch" Margin="0,0,0,8" x:Name="rtcHeader" VerticalAlignment="Stretch">  
            <telerik:RadTabItem Header="User Information">  
                 <Grid x:Name="LayoutRoot2" Background="White">  
        <Grid.ColumnDefinitions> 
            <ColumnDefinition Width="124"/>  
            <ColumnDefinition Width="*"/>  
        </Grid.ColumnDefinitions> 
        <Grid.RowDefinitions> 
            <RowDefinition Height="31"/>  
            <RowDefinition Height="29" x:Name="rowAspex"/>  
            <RowDefinition Height="29"/>  
            <RowDefinition Height="*"/>  
        </Grid.RowDefinitions> 
        <TextBlock Margin="8,2,17,8" Text="ASPEX User" TextWrapping="Wrap" Grid.Row="1"/>  
        <TextBox HorizontalAlignment="Left" Margin="8,3.5,0,5.5" Width="199" Grid.Column="1" Text="TextBox" TextWrapping="Wrap" Grid.Row="1" VerticalAlignment="Stretch" Height="20" x:Name="txtbAspexUser"/>  
        <TextBlock Margin="8,8,17,8" Text="ASPEX User" TextWrapping="Wrap" Grid.Row="2"/>  
        <TextBlock HorizontalAlignment="Stretch" Margin="9,6,-94,2" Width="Auto" Text="" TextWrapping="Wrap" x:Name="txtbUserName" FontFamily="Aharoni" FontSize="16" Grid.Column="1"/>  
 
    </Grid> 
            </telerik:RadTabItem> 
            <telerik:RadTabItem Header="Group Membership">  
                <TextBlock Text="test group membership" /> 
            </telerik:RadTabItem> 
        </telerik:RadTabControl> 
    </Grid> 
</UserControl> 

Problem is that the Tabcontrol doesn't stretches to the right of the RadWindow.
I want to when I resize the Radwindow that the Tabcontrol automatically is attached to the right of the RadWindow.

How can I do this ?

1 Answer, 1 is accepted

Sort by
0
NS
Top achievements
Rank 1
answered on 09 Oct 2008, 02:46 PM
Found the solution myself :)

I must set the Width and Height of the usercontrol inside the radwindow to the width and height of the radwindow.

I also use the SizeChanged event of the radwindow to update the width and height of the usercontrol to the width and height of the radwindow.
Tags
Window
Asked by
NS
Top achievements
Rank 1
Answers by
NS
Top achievements
Rank 1
Share this question
or