开发者

Expand a control to fill grid column

I'm having a problem getting a panelbar to expand it's width to match the Grid column it occupies. The offending code is the second appearance of a panelbar with an item header named "Operators". I can set the width explicitly to fill the column, but that would only show correctly for my specific resolution and is not the solution I'm looking for. I would just like it to stretch on it's own. Code snippet below.

<telerik:RadTabControl telerik:StyleManager.Theme="Windows7" Grid.Column="2">
                    <telerik:RadTabItem Header="Add/Edit">
                        <Grid ShowGridLines="True">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"></RowDefinition>
                                <RowDefinition Height="Auto"></RowDefinition>
                                <RowDefinition Height="*"></RowDefinition>
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"></ColumnDefinition>
                                <ColumnDefinition Width="Auto">&l开发者_运维问答t;/ColumnDefinition>
                            </Grid.ColumnDefinitions>

                            <TextBlock FontSize="20" Grid.Row="0">Organization Name Here:</TextBlock>
                            <my1:QueryBuilder Height="Auto" Width="Auto" Grid.Row="1"></my1:QueryBuilder>

                            <telerik:RadPanelBar ExpandMode="Single" Grid.Column="1" Grid.Row="1" Width="Auto"
                                                 VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch"
                                                 HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                                <telerik:RadPanelBarItem Header="Operators"></telerik:RadPanelBarItem>
                            </telerik:RadPanelBar>

                        </Grid>
                    </telerik:RadTabItem>
                </telerik:RadTabControl>


You Second ColumnDefinition should have Width of "*" not "Auto" as you have currently.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜