Importing Canvas from Expression Design - Too bloated XAML RRS feed

  • Question

  •  Hey all...

    I've started to design stuff in Expression Design, and I'm trying to import that stuff to Silverlight, but I'm having few minor problems.

    I'm able to import a Canvas to Silverlight and it's okay, only the XAML of that Canvas is huge! It's filling my XAML class with way too many lines.

    Obviously the best option would have been that it will be possible to import my stuff as a drawing brush, but unfortunately it's impossible in Silverlight.


    So is there any way I could somehow load my Canvas from another XAML class? Just so it will not fill my hosting class with bloated XAML?






    Friday, March 19, 2010 1:04 PM


  • hard to say without seeing what you're calling too big xaml lines.

    But to answer the second part of the question : in your project, just add a new UserControl. Just copy/past the Design stuff (take care about copy options in Expression Design !) into the new control.

    Then, i your main canvas, just drag and drop an instance of your new user control... The xaml of the main page will stay very short.

     Just another idea : vector is cool of course, but in many circumstances it is more efficient to export to PNG from Design and use the latter. A PNG can be very little, with transparency, and need no CPU on the host. It can even be resized (a little) without any visible effect. I personnly often use PNG instead of vector when I have complex drawing in Expressiono Design (and also when I'm using features that do not exist in Blend, such as brushes, a lot of effects,etc).

    Saturday, March 20, 2010 10:17 PM