Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > PanelBar > RadPanelBar resizing TextBox

Not answered RadPanelBar resizing TextBox

Feed from this thread
  • Tom avatar

    Posted on Feb 7, 2012 (permalink)


    <UserControl ...>
    <telerik:RadPanelBar>
        <telerik:RadPanelBarItem Header="Hello" IsExpanded="True">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="70"></ColumnDefinition>
                    <ColumnDefinition Width="*"></ColumnDefinition>
                    <ColumnDefinition Width="70"></ColumnDefinition>
                    <ColumnDefinition Width="*"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition></RowDefinition>
                </Grid.RowDefinitions>
                <sdk:Label Grid.Column="0" Content="Label1" />
                <TextBox Grid.Column="1" Text="foo" BorderThickness="1" BorderBrush="Black" Height="20"  />
                <sdk:Label Grid.Column="2" Content="Label2" />
                <TextBox Grid.Column="3" Text="foo" BorderThickness="1" BorderBrush="Black" Height="20"  />
            </Grid>
        </telerik:RadPanelBarItem>
    </telerik:RadPanelBar>


    In a RadPanelBar my textboxes will resize according to the text I put into them.

    If I write "fooooooooooooooooooooooooooooooooooooooooooooooo" the text box will resize (same if I set a ColumnDefinition = "auto" instead of "*").

    I don't want this and can't find out how change RadPanelBar template (or something) to remove this auto-resizing behavior.

    Thank you!

    Reply

  • Tina Stancheva Tina Stancheva admin's avatar

    Posted on Feb 10, 2012 (permalink)

    Hi Tom,

    You can disable the internal RadPanelBar horizontal ScrollBar in order to get over this issue:
    <telerik:RadPanelBar ScrollViewer.HorizontalScrollBarVisibility="Disabled">
        <telerik:RadPanelBarItem Header="Hello"
                                    IsExpanded="True">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="70"></ColumnDefinition>
                    <ColumnDefinition Width="*"></ColumnDefinition>
                    <ColumnDefinition Width="70"></ColumnDefinition>
                    <ColumnDefinition Width="*"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition></RowDefinition>
                </Grid.RowDefinitions>
                <sdk:Label Grid.Column="0"
                            Content="Label1" />
                <TextBox Grid.Column="1"
                            Text="foo"
                            BorderThickness="1"
                            BorderBrush="Black"
                            Height="20" />
                <sdk:Label Grid.Column="2"
                            Content="Label2" />
                <TextBox Grid.Column="3"
                            Text="foo"
                            BorderThickness="1"
                            BorderBrush="Black"
                            Height="20" />
            </Grid>
        </telerik:RadPanelBarItem>
    </telerik:RadPanelBar>

    Please give this a try and let me know if it helps or if we can further assist you.

    Kind regards,
    Tina Stancheva
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>

    Reply

  • Tom avatar

    Posted on Feb 14, 2012 (permalink)

    Yes, it works great!
    Thank you.

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > PanelBar > RadPanelBar resizing TextBox
Related resources for "RadPanelBar resizing TextBox"

Silverlight PanelBar Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  ]