Powered by MSDN

US - English
NEW! Silverlight 5 is available Learn More

Unable to fill the data grid in the whole screen. RSS

3 replies

Last post Oct 21, 2008 09:09 AM by Amanda Wang - MSFT

(0)
  • codebased

    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

     

    "If I've answered your query then please mark it as "Answered".
  • codebased

    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,

    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

     

    "If I've answered your query then please mark it as "Answered".
  • surbhiydv

    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 - MSFT

    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.

    Amanda Wang
    Microsoft Online Community Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.