微軟的 silver light 展示頁面,里面有不少很cool的演示 :P
]]>今天拉斯維加斯開幕的NAB展會上,微軟正式發布了之前被譽為“Flash殺手”新跨平臺網絡媒體解決方案(之前的名稱為WPF/E),將其定名為Silverlight。
開發中的WPF/E全稱為Windows Presentation Foundation Everywhere,是微軟新Windows圖形子系統“Windows Presentation Foundation”(代號Avalon)的一個子集。WPF/E基于跨瀏覽器網絡技術,依賴XAML語言和JavaScript腳本創建頁面,與Flash一樣作為瀏覽器插件工作,同樣能顯示矢量圖形、動畫和視頻,可以運行在多種操作系統甚至移動設備上。
Silverlight相對于Flash的優勢在于視頻,未來我們可能將使用Silverlight輕松的在網頁上觀看高清視頻內容。Silverlight使用WMV格式,支持從低分辨率的移動媒體到全屏HD視頻,并支持VC-1編碼。為此微軟還專門同時發布了VC-1編碼器SDK。Silverlight基于.NET Framework,更方便程序員進行開發,提供高速媒體編碼、硬件加速、支持Windows Server “Longhorn”等特性。
微軟將于本月底的MIX07展會上對Silverlight進行詳細的介紹,并發布Silverlight Beta版本。支持Windows和Mac OS X系統,支持IE 6.0/7.0、Firefox 1.5.0.8/2.0、Safari等瀏覽器。
]]>This topic contains the following sections.
XamlPad is a Windows SDK tool that provides the following features:
Real-time editing and display of XAML content.
XAML markup is automatically saved to the file XamlPad_save.xaml
.
Auto parse and refresh modes provide XAML syntax validation and redisplay of content.
Basic text editing commands, including copy, paste, and undo. Also provides find support for simple strings. Invalid XAML displayed in red.
XAML errors are reported in the status bar on bottom left of the main window.
Expansion of XAML content into a visual tree allows you to view property values of content.
You can load an existing XAML file into XamlPad by passing the file name as a command-line argument (there is no File Open available in the menu).
![]() |
---|
Occasionally, incorrect markup may cause XamlPad to not load the markup if the invalid markup gets saved; XamlPad may then fail to load on subsequent attempts to run it. To fix this issue, open the
|
XamlPad provides a simple way to experiment with creating XAML content, since you see the results of the content displayed immediately. For example, XamlPad is useful for testing WPF features, such as OpenType fonts.
The auto parse mode allows you to see syntax errors immediately as you enter XAML. Otherwise, if auto parse is not enabled, you will not see errors until you click the Refresh button. You can enable and disable the auto parse mode by clicking on the Auto Parse button at the top of XamlPad.
When an error is encountered, the entire XAML content is displayed in a red color, and the status information at the bottom of XamlPad displays the specific syntax error. A hyperlink to the right of the displayed error allows you to quickly jump to the area of XAML content that contains the error. In the following sample, the Label definition is not properly terminated by a closing '>
'.
Analyzing the visual tree[Glossary Lookup Failure: visual_tree#484ef710-6484-400c-832c-768cb3a33aa5] hierarchy using XAMLPad may give you insight into how control template expansion works. This knowledge may help you understand the performance costs and tradeoffs of the design of your user interface. To view the visual tree that corresponds to your XAML content, click the Show Visual Tree button on the menu bar. The following screenshot shows the expansion of XAML content into visual tree nodes in the Visual Tree Explorer panel of XamlPad:
Click on a node to expand its hierarchy. Notice how the Label, TextBox, and Button controls each display a separate visual object hierarchy in the Visual Tree Explorer panel of XamlPad. This is because WPF controls have a ControlTemplate that contains the visual tree of that control. When you explicitly reference a control, you implicitly reference its visual hierarchy. For more information on visual objects and the visual tree, see Windows Presentation Foundation Graphics Rendering Overview.
You can view the property settings of an item in the Visual Tree Explorer by selecting the item. The Property Tree Explorer panel, below the Visual Tree Explorer panel, displays the current property settings for the selected visual object. In this case, two of the derived classes of the Label control are expanded: ContentControl and Control. You could continue expanding other derived classes, such as FrameworkElement, to view even more properties.
It is useful to understand how your application is represented in terms of the underlying visual tree. The WPF Visual Profiler, for example, presents performance issues in the context of a visual tree. In this screenshot, the CPU Usage section of the Visual Profiler gives you a precise breakdown of a visual object's use of WPF services, such as rendering and layout.
For more information on WPF performance tools, see Performance Profiling Tools for WPF.