Reputation: 10824
I'm writing a fairly big interface using Silverlight. As I progress, the xaml
file is getting fairly big and is becoming proportionally uglier.
grids
and stack panels
. Is there a preferred approach when using one or the other?I am looking for advice and links to other resources that can be used as examples.
Upvotes: 6
Views: 3094
Reputation:
Check out the series on best practices for Silverlight on:
Silverlight 2 Best Practices - 4 articles
The author has 4 articles on this.
Upvotes: 0
Reputation: 13497
If you have lots of complex XAML, you could try to break it down into several UserControls to make it more modular and have less XAML in each file.
Here is a tutorial http://silverlight.net/learn/tutorials/usercontrols.aspx
And here is a video http://silverlight.net/learn/learnvideo.aspx?video=52036
Upvotes: 3
Reputation: 24534
SilverLight like any other UI language has the size complexity problem
Much has been written about this problem in the HTML world, and the same rules apply
I prefer stackpanels over grids for their simplicity - It's a bit like the HTML worlds table vs .css layouts war
Have a look at other peoples SilverLight efforts with SilverLight Spy, and you might feel better about your own :-)
Upvotes: 0
Reputation: 7173
This may be the same as the XAML best practices question, where the recommendation was to take a look at http://dotnet.org.za/rudi/archive/2009/01/13/xaml-guidelines-released.aspx
Upvotes: 2