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

RadPanelBar Width Chages in Telerik Q2

1 Answer 58 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
pv Upendran
Top achievements
Rank 1
pv Upendran asked on 29 Sep 2009, 07:58 AM
Hi,
   I am using the RadPanelBar in my application. Previously i used  Telerik Q1  and Silverlight 2.0. By using this every thing is perfect.
   Now I am using Silverlight 3.0  and Telerik Q2 in my application.

   My problem  is, Dynamically  the width of the RadPanel control  is changing according to the Header Text  lenght variation of RadPanelBarItems in Telerik Q2  . The coding is as follows:

<telerik:RadPanelBar x:Name="pb" Margin="2,2,2,2" Width="250" Foreground="Black" >
            <telerik:RadPanelBarItem  Name="pbiCustomerService" Tag="CSC" Selected="RadPanelBarItem_Selected" FontWeight="Bold"  FontFamily="Verdana" FontSize="12"  IsExpanded="True" Style="{StaticResource RadPanelBarItemStyle1}">
                <telerik:RadPanelBarItem.Header>
                    <StackPanel Orientation="Horizontal">
                        <Image Stretch="Uniform"  Width="30" Height="35" Margin="5,0,7,0" Source="../Images/IconCSC.png"/>
                        <TextBlock VerticalAlignment="Center" Text="Customer Service"/>
                    </StackPanel>
                </telerik:RadPanelBarItem.Header>
 </telerik:RadPanelBarItem>
 <telerik:RadPanelBarItem FontWeight="Bold" Tag="SA" Selected="RadPanelBarItem_Selected" FontFamily="Verdana" FontSize="12"  Style="{StaticResource RadPanelBarItemStyle1}">
                <telerik:RadPanelBarItem.Header>
                    <StackPanel Orientation="Horizontal">
                        <Image Stretch="Uniform"  Width="30" Height="35" Margin="5,0,7,0"  Source="../Images/IconSysAdmin.png"/>
                        <TextBlock Text="System Administration" VerticalAlignment="Center"/>
                    </StackPanel>
                </telerik:RadPanelBarItem.Header>
</telerik:RadPanelBarItem>
</telerik:RadPanelBar>

I had applied the MinWidth and MaxWidth property, but the width is not  fixed.
I need to keep the RadPanelBar or RadPanelBarItem width should be  fixed.

Can any body provide solution for this?


Thanks and regards,

Upendran.

1 Answer, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 02 Oct 2009, 07:50 AM
Hello Upendran,

If you want to set a static width to the PanelBar control, you should use the Width property. Please take a look at the sample project and let me know if you see anything wrong with it.

Kind regards,
Dimitrina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
PanelBar
Asked by
pv Upendran
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Share this question
or