In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the example analysis of XAML parsing in Silverlight 4, which is very detailed and has certain reference value. Friends who are interested must finish it!
1. Control content is displayed directly
As you will recall, in the Silverlight 3 version, the text content of a control is usually represented by a property, such as:
However, the above expression is inconsistent with the XAML syntax expression of WPF, and there will be exceptions when the project is transplanted. In Silverlight 4, XAML not only supports the Silverlight 3 format, but also adds a new representation, as follows:
Text box I am CheckBox display text Click submit
two。 Text space display control
In Silverlight 3, XAML syntax parsing displays text spaces when the input text is as follows:
This is the Silverlight 3 China test program test space.
The results are as follows:
In Silverlight 4, the XAML syntax parser allows developers to control the output of text spaces, which has been improved by supporting the Silverlight 3 version format. As in the same code above, the effect in Silverlight 4 is as follows:
If you want to achieve the output effect of Silverlight 3 in Silverlight 4, you can use xml:space= "Preserve".
This is the Silverlight 3 China test program test space.
3. Support for XAML custom IDictionaries
In Silverlight 3, x:Key only supports adding object resources as follows:
In Silverlight 4, developers are allowed to add members of any type and attribute to Dictionary. This is of great help to complex XAML projects, both in terms of performance and usage. For details, please see MSDN: http://msdn.microsoft.com/en-us/library/cc189012(VS.95).aspx.
4. Simplification of references to namespaces
In earlier versions of Silverlight, if you used a different class library or a different version of Silverlight Toolkit, the developer had to define the specified namespace in each page header. In Silverlight 4, XmlnsDefinitionAttribute mapping is supported to specify namespace class libraries, allowing developers to define unified shared names, facilitate class library namespace references, and reduce code input. For details, please refer to MSDN: http://msdn.microsoft.com/en-us/library/system.windows.markup.xmlnsdefinitionattribute(v=VS.95).aspx.
5. XAML error exception input
In the early Silverlight development process, XAML exception message prompts were the weakest and were the most complained part of the official Silverlight forum. Silverlight 4 adds a lot of XAML exception error messages, as well as specific error message descriptions, which is similar to the WPF development environment.
The above is all the content of the article "sample Analysis of XAML parsing in Silverlight 4". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un