locked
Grid Cell Padding/Margin RRS feed

  • Question

  • Hi,

    Bit of a newbie to Silverlight so a few questions 

    Is it possible to give Grid Rows/Columns some padding or margins? I am designing a form and all the rows/columns are essentially squashed together. I know I could add extra rows/columns in between to pad them out but wondering if there is a XAML attribute for this? If I add a margin to the grid, it does just than, but I am looking for padding/margins within the grid

    How do you set the width/height for the UserControl through an application resource. I am going to have several pages and instead of setting it on every page, was thinking an application resource would be good.I tried by adding the definition in the app.xaml file and then setting width={StaticResouce resourcename} but didn't work?

    Also how do you set a border on the user control area? I know you can set it on the containing div on the HTML page, but wondering if you can set it on the user control itself?

    Are there any good sample apps around for more business type silverlight apps where there are forms, WCF services etc that I can download?

    Thanks in advance

    Monday, January 19, 2009 11:50 PM

Answers

  • Also how do you set a border on the user control area? I know you can set it on the containing div on the HTML page, but wondering if you can set it on the user control itself?

    In your usercontrol put everything inside the border and there u go go u will have a border wrapped around your usercontrol.

    Are there any good sample apps around for more business type silverlight apps where there are forms, WCF services etc that I can download?

    The below link is a good place to start with

    http://silverlight.net/learn/videocat.aspx?cat=2#HDI2Basics

    and if the post was helpful then please 'Mark as Answer' - many thanks

    Sharker Khaleed Mahmud
    Software Developer
    (MCP,MCTS,MCPD[web])

    This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped.

    Tuesday, January 20, 2009 12:24 AM
  • You can use a Border as the direct child of a UserControl. But Visual Studio has a problem with intellisense in this area.

    Tuesday, January 20, 2009 1:24 AM

All replies

  • Also how do you set a border on the user control area? I know you can set it on the containing div on the HTML page, but wondering if you can set it on the user control itself?

    In your usercontrol put everything inside the border and there u go go u will have a border wrapped around your usercontrol.

    Are there any good sample apps around for more business type silverlight apps where there are forms, WCF services etc that I can download?

    The below link is a good place to start with

    http://silverlight.net/learn/videocat.aspx?cat=2#HDI2Basics

    and if the post was helpful then please 'Mark as Answer' - many thanks

    Sharker Khaleed Mahmud
    Software Developer
    (MCP,MCTS,MCPD[web])

    This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped.

    Tuesday, January 20, 2009 12:24 AM
  • Regarding the border, I tried that and it will not allow a border around a Grid. There is even no intellisense for the border unless it is contained within the grid? Maybe the border around the silverlight object will have to do

    Thanks

    Tuesday, January 20, 2009 1:04 AM
  • You can use a Border as the direct child of a UserControl. But Visual Studio has a problem with intellisense in this area.

    Tuesday, January 20, 2009 1:24 AM