Hello,
We have a gridview in a usercontrol that we would like to exand to the size of the window. However, unless you specifiy the size of the Gridview or the Size of the usercontrol the scroll bars will not appear. Is there a way around this? Please note we're using a gridview inside of grid where the grid row definition Height definition is set to "*". Below is the xaml code along with a screenshot.
We have a gridview in a usercontrol that we would like to exand to the size of the window. However, unless you specifiy the size of the Gridview or the Size of the usercontrol the scroll bars will not appear. Is there a way around this? Please note we're using a gridview inside of grid where the grid row definition Height definition is set to "*". Below is the xaml code along with a screenshot.
<UserControl |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" |
xmlns:Controls="clr-namespace:Dad.Common.UI.Controls;assembly=Dad.Common" |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" x:Class="Dad.Modules.Security.Presentation.Views.OrganizationalUnits" |
Margin="1" HorizontalAlignment="Left" VerticalAlignment="Top" |
mc:Ignorable="d" d:DesignWidth="680" d:DesignHeight="600" |
> |
<!-- <Grid Margin="1,1,1,1"> --> |
<Grid> |
<Grid.RowDefinitions> |
<RowDefinition Height="80"/> |
<RowDefinition Height="40"/> |
<RowDefinition Height="*"/> |
</Grid.RowDefinitions> |
<Border Grid.Row="0" Margin="0,0,0,0" VerticalAlignment="Top" Height="80" Width="Auto"> |
<Border.Background> |
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> |
<GradientStop Color="#FF175D12"/> |
<GradientStop Color="#FF93D48E" Offset="1"/> |
</LinearGradientBrush> |
</Border.Background> |
<Image HorizontalAlignment="Left" Margin="0,0,0,2" Width="371" Source="/Dad.Modules.Security;Component/Images/OULabel.png"/> |
</Border> |
<Border Grid.Row="1" Margin="0,0,0,0" VerticalAlignment="Top" Height="40" Width="Auto"> |
<StackPanel Orientation="Horizontal"> |
<telerik:RadButton Content="Refresh" Height="30" Width="80" Margin="15,5,0,5"/> |
<Controls:RadGridViewExporter Height="30" RadGridView="{Binding ElementName=OUGridView}" /> |
</StackPanel> |
</Border> |
<telerik:RadGridView x:Name="OUGridView" Grid.Row="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" |
ItemsSource="{Binding OrganizationalUnits}"/> |
</Grid> |
</UserControl> |