Sign In|Join
Home/Silverlight.NET Forums/General Silverlight Programming/Programming with .NET - General/Unable to fill the data grid in the whole screen.
Last post Oct 21, 2008 09:09 AM by Amanda Wang - MSFT
Participant
826 Points
386 Posts
Oct 17, 2008 05:29 AM | LINK
Hi there,
I want to give a data grid a complete width and hight available within the content presenter tag.. .. .how can I do that?
Thanks,
Rick
Oct 17, 2008 08:53 AM | LINK
Made it workable through stratch option.
thanks,
codebased Hi there, I want to give a data grid a complete width and hight available within the content presenter tag.. .. .how can I do that? Thanks, Rick
1134 Points
218 Posts
Oct 17, 2008 10:00 AM | LINK
Hi Rick
Mention Height and Width of DataGrid as auto.
(Please 'Mark as Answer' if it helps you)
All-Star
17236 Points
1466 Posts
Oct 21, 2008 09:09 AM | LINK
Hi,
You can try to removed the Width and Height properties in the UserControl tag. Normally, Width and Height's value are 400, 300.
for example:
<UserControl xmlns:data="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data" x:Class="datagrid.Page" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="400" Height="300"
If you remove them, you will find the fill the data grid in the whole screen at run time.
codebased
Participant
826 Points
386 Posts
Unable to fill the data grid in the whole screen.
Oct 17, 2008 05:29 AM | LINK
Hi there,
I want to give a data grid a complete width and hight available within the content presenter tag.. .. .how can I do that?
Thanks,
Rick
codebased
Participant
826 Points
386 Posts
Re: Unable to fill the data grid in the whole screen.
Oct 17, 2008 08:53 AM | LINK
Made it workable through stratch option.
thanks,
surbhiydv
Participant
1134 Points
218 Posts
Re: Unable to fill the data grid in the whole screen.
Oct 17, 2008 10:00 AM | LINK
Hi Rick
Mention Height and Width of DataGrid as auto.
(Please 'Mark as Answer' if it helps you)
Amanda Wang...
All-Star
17236 Points
1466 Posts
Re: Unable to fill the data grid in the whole screen.
Oct 21, 2008 09:09 AM | LINK
Hi,
You can try to removed the Width and Height properties in the UserControl tag. Normally, Width and Height's value are 400, 300.
for example:
<UserControl xmlns:data="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data" x:Class="datagrid.Page"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Width="400" Height="300"
If you remove them, you will find the fill the data grid in the whole screen at run time.
Microsoft Online Community Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help.