Thursday, March 6, 2008

Extending Assets

Although many XAML images will be used as graphical resources in various user-interface controls, you may want to create an object or control directly from your XAML designs. Fortunately, this is a fairly straightforward task. Behind the scenes, your XAML creations have been objects all along, you just may not have noticed. Simply giving your XAML creation (say, MyClass.xaml) a class name will turn it into a full-fledged class.



Now that your XAML object has a class type, you can add a code-behind file (in this case, MyClass.xaml.cs) to contain the associated logic.



Your creation now has a visual appearance, thanks to the XAML graphics, and some functionality, thanks to the code. You'll notice that in Vectropy the names you assign to organize your graphical entities are actually assigned to the underlying XAML objects in the saved file. This allows you to simply reference and manipulate individual parts of your creation without any additional work.

1 comment:

Niya said...

Useful post. Thanks and keep blogging....

Regards,
vectorize image