Tải bản đầy đủ - 0trang
Property Setting: Attribute Syntax vs. Element Syntax
The XAML Markup Language
placed in an attribute. Element-based syntax is a necessity to set the value of the Background property to a LinearGradientBrush.
You must become comfortable switching between attribute-based and element-based syntax in
XAML as necessary. In many cases, what begins as a simple attribute-based property must later be
changes to a more complex value that requires element-based syntax.
Referencing Additional Namespaces in XAML
As mentioned earlier, the capability to reference a namespace with “xmlns” is a part of the XML
standard. You can think of these namespace defi nitions as similar in concept to specifying an
Imports statement in Visual Basic or a using statement in C#.
The fi rst example only showed two namespaces:
The fi rst namespace is the default XML namespace, and it contains elements that can be used without a prefi x, such as