Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Silverlight layout Best Practices

I'm writing a fairly big interface using Silverlight. As I progress, the xaml file is getting fairly big and is becoming proportionally uglier.

Questions

  1. Are there any resources out there to make the xaml more readable? For example, how would I display the order of attributes (e.g. height and Width first) so that it looks the most tidy?
  2. Another issue is that there are multiple ways to implement an interface with 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.

like image 946
QueueHammer Avatar asked Mar 04 '09 23:03

QueueHammer


2 Answers

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

like image 188
TJB Avatar answered Nov 12 '22 15:11

TJB


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

like image 2
JaredReisinger Avatar answered Nov 12 '22 15:11

JaredReisinger