We have a WPF application using prism and regions.
The Shell looks like this.
We load a user control in the WorkSpaceRegion which contains a RadGridView.
But when the grid is displayed it always has the maximum width needed to display the entire grid.
How can we get the RadGridView to autosize so that it takes the available width of the main window instead of running of the screen?
Regards,
Peter
The Shell looks like this.
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height=
"Auto"
/>
<RowDefinition Height=
"*"
/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width=
"Auto"
/>
</Grid.ColumnDefinitions>
<billingCustomControls:BillingToaster Margin=
"0,0,-490,0"
/>
<ContentControl Grid.Row=
"0"
HorizontalContentAlignment=
"Stretch"
VerticalContentAlignment=
"Stretch"
prism:RegionManager.RegionName=
"{x:Static pll:RegionNames.BannerRegion}"
VerticalAlignment=
"Top"
/>
<Grid Grid.Row=
"1"
>
<Grid.RowDefinitions>
<RowDefinition Height=
"Auto"
/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width=
"Auto"
/>
<ColumnDefinition Width=
"*"
/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column=
"0"
>
<ContentControl Margin=
"0"
HorizontalContentAlignment=
"Stretch"
VerticalContentAlignment=
"Stretch"
prism:RegionManager.RegionName=
"{x:Static pll:RegionNames.UserDetailsRegion}"
/>
<Separator />
<ItemsControl Margin=
"0"
HorizontalContentAlignment=
"Stretch"
VerticalContentAlignment=
"Stretch"
prism:RegionManager.RegionName=
"{x:Static pll:RegionNames.TaskBarRegion}"
/>
<ContentControl Margin=
"0"
HorizontalContentAlignment=
"Stretch"
VerticalContentAlignment=
"Stretch"
MinHeight=
"200"
MinWidth=
"100"
prism:RegionManager.RegionName=
"{x:Static pll:RegionNames.FooterRegion}"
VerticalAlignment=
"Bottom"
/>
</StackPanel>
<Grid Grid.Column=
"1"
>
<Grid.RowDefinitions>
<RowDefinition Height=
"Auto"
/>
<RowDefinition Height=
"Auto"
/>
<RowDefinition Height=
"*"
/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width=
"Auto"
/>
</Grid.ColumnDefinitions>
<ContentControl Grid.Row=
"0"
HorizontalContentAlignment=
"Stretch"
VerticalContentAlignment=
"Stretch"
Margin=
"2,2,2,2"
prism:RegionManager.RegionName=
"{x:Static pll:RegionNames.MenuBarRegion}"
/>
<ContentControl Grid.Row=
"1"
HorizontalContentAlignment=
"Stretch"
VerticalContentAlignment=
"Stretch"
Margin=
"2,2,2,6"
prism:RegionManager.RegionName=
"{x:Static pll:RegionNames.BreadCrumbRegion}"
/>
<ContentControl Grid.Row=
"2"
HorizontalAlignment=
"Stretch"
VerticalAlignment=
"Stretch"
HorizontalContentAlignment=
"Stretch"
VerticalContentAlignment=
"Stretch"
Margin=
"2,2,2,2"
prism:RegionManager.RegionName=
"{x:Static pll:RegionNames.WorkSpaceRegion}"
/>
</Grid>
</Grid>
</Grid>
We load a user control in the WorkSpaceRegion which contains a RadGridView.
But when the grid is displayed it always has the maximum width needed to display the entire grid.
How can we get the RadGridView to autosize so that it takes the available width of the main window instead of running of the screen?
Regards,
Peter