(X) Hide this
    • Login
    • Join
      • Generate New Image
        By clicking 'Register' you accept the terms of use .

Tip: How to declare objects in XAML?

(2 votes)
Denislav Savkov
>
Denislav Savkov
Joined Feb 11, 2008
Articles:   14
Comments:   6
More Articles
0 comments   /   posted on Sep 05, 2008
Tags:   xaml , denislav-savkov
Categories:   General

There are two ways to declare objects in XAML. The most common way is to declare elements using opening and closing tag - using the object element syntax

XAML

<objectName><objectName/> 

It has a shorter version

XAML

<objectName/>

that can be used if the object has no child elements. See how to set a property and how to declare a child element.

The other way is to create an object indirectly by setting a property. This syntax is used relatively rare. The type or property being set is required to support type converter that takes the string value of the property. This way the object is created from the converter using a string.

That's it!


Subscribe

Comments

No comments

Add Comment

Login to comment:
  *      *