Expression Blend的Data面板中有個非常有趣的項目,就叫做+XML
我和我的好朋友、寶貝學生互動及學習使用Blogger的地方。
<Canvas>
<MediaElement x:Name="mediaElem1"
Source="file:///c:/windows/media/tada.wav"
LoadedBehavior="Manual" />
<MediaElement x:Name="mediaElem2"
Source="file:///c:/windows/media/Windows Logoff Sound.wav"
LoadedBehavior="Manual" />
</Canvas>
提供 WPF 架構層級屬性集、事件和 Windows Presentation Foundation (WPF) 項目的方法。這個類別 (Class) 代表所提供的 WPF 架構層級實作 (Implementation),建置在由 UIElement 所定義的 WPF 核心層級 API 之上。
加上MouseOver透明度更改功能。
<Window x:Class="Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window1" Height="550" Width="419">
<Window.Resources>
<Style TargetType="Image">
<Setter Property="Width" Value="120" />
<Setter Property="Margin" Value="5" />
<Setter Property="Opacity" Value="0.2" />
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Trigger.Setters>
<Setter Property="Opacity" Value="1" />
</Trigger.Setters>
</Trigger>
</Style.Triggers>
</Style>
<Style TargetType="ListBox">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListBox">
<Border BorderThickness="1" BorderBrush="Black">
<ScrollViewer>
<StackPanel IsItemsHost="True" Orientation="Vertical"/>
</ScrollViewer>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Window.Resources>
<Grid>
<StackPanel Margin="93,32,98,0" Height="441" VerticalAlignment="Top">
<Label FontSize="30" HorizontalAlignment="Center">Image List</Label>
<ListBox Width="155" HorizontalAlignment="Center" Height="385">
<Image Source="Humpback Whale.jpg" />
<Label FontSize="12" HorizontalAlignment="Center">Humpback Whale</Label>
<Image Source="Oryx Antelope.jpg" />
<Label FontSize="12" HorizontalAlignment="Center">Oryx Antelope</Label>
<Image Source="Toco Toucan.jpg" />
<Label FontSize="12" HorizontalAlignment="Center">Toco Toucan</Label>
<Image Source="Green Sea Turtle.jpg" />
<Label FontSize="12" HorizontalAlignment="Center">Green Sea Turtle</Label>
</ListBox>
</StackPanel>
</Grid>
</Window>
<Window x:Class="Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window1" Height="550" Width="419">
<Window.Resources>
<Style TargetType="Image">
<Setter Property="Width" Value="120" />
<Setter Property="Margin" Value="5" />
</Style>
<Style TargetType="ListBox">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListBox">
<Border BorderThickness="1" BorderBrush="Black">
<ScrollViewer>
<StackPanel IsItemsHost="True" Orientation="Vertical"/>
</ScrollViewer>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Window.Resources>
<Grid>
<StackPanel Margin="93,32,98,0" Height="441" VerticalAlignment="Top">
<Label FontSize="30" HorizontalAlignment="Center">Image List</Label>
<ListBox Width="155" HorizontalAlignment="Center" Height="385">
<Image Source="Humpback Whale.jpg" />
<Label FontSize="12" HorizontalAlignment="Center">Humpback Whale</Label>
<Image Source="Oryx Antelope.jpg" />
<Label FontSize="12" HorizontalAlignment="Center">Oryx Antelope</Label>
<Image Source="Toco Toucan.jpg" />
<Label FontSize="12" HorizontalAlignment="Center">Toco Toucan</Label>
<Image Source="Green Sea Turtle.jpg" />
<Label FontSize="12" HorizontalAlignment="Center">Green Sea Turtle</Label>
</ListBox>
</StackPanel>
</Grid>
</Window>
This project is the portal for accessing the WPF Toolkit and the WPF Futures releases.
Downloads & Files
application, 322K, uploaded Oct 28 - 7654 downloads
source code, 751K, uploaded Oct 28 - 6852 downloads
Windows Presentation Foundation (WPF) - Release: WPF Toolkit - October 2008 Release
微軟進一步發布了Silverlight 2新版,以及Visual Studio 2008的Silverlight 2工具,讓開發人員可以運用.NET程式語言,例如C#、VB,就可以開發RIA應用。