简体   繁体   中英

Silverlight development: should I type XAML or use a tool?

I have been wondering what is the best way to do silverlight development in order to achieve the best results. So far, there are threee possibilities that come into my mind: 1 - visual studio visual editor, 2 - expression blend, 3 - coding XAML directly in visual studio.

I was especially curious about third point: are you developing silverlight by typing the XAML directly or not? I have experience with HTML authoring, and I always stayed as far as I could from visual editors (like dreamweaver) that used to output ugly HTML code...

So is it recommended to learn XAML in deep, or is it better to learn a tool and concentrate on the code?

My opinion is that it is always useful to know what the tools generate before you learn the tool itself. You mention Expression Blend, which is a wonderful tool. You should definitly look into it, but I recommend to get some basic knowledge about XAML before you let the tool do the job for you.

I do a mix. Sometimes I use Blend to build my XAML and sometimes I do it by coding the XAML directly. I find it that Blend often adds too much unnecessary code, and like to have control of what I put in, but using Blend allows you to be more efficient.

Good luck!

While you're learning how the system works, the graphical designers work ... well, they work OKAY. For production code, however, the designers open you up to all sorts of off-by-one-pixel troubles. To avoid those, write your own XAML, preferably with styles to enforce consistent spacing, margins, and the like.

My advice would be, use the designers as much as possible and if there is something you can't do with it, type the XAML.

Having a good understanding of XAML is important, but starting by using the designer will help you get used to it.

Using VS2008, I would have strongly encouraged you to use blend as the SL designer in VS was just missing. Nowadays, VS2010 has a good designer for SL but you might be interested in using blend in parallel for:

  • Animations
  • Triggers (they are part of blend's SDK, not the base SL framework)
  • Colors
  • Templates design (the create copy feature is very helpful)
  • Import from illustrator...
  • ...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM