原创 WPF美女時鐘

改自網頁版的美女時鐘 MainWindow.xaml: <Window x:Class="Clock.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006

原创 MVVM模式WPF計算器

採用MvvmLight工具構建的計算器 Models:CalculationModel.cs using System; using System.Collections.Generic; using System.Linq; usi

原创 WPF之佈局控件

StackPanel:堆棧面板 <StackPanel Margin="3" Name="stackPanel1"> <Label Margin="3" HorizontalAlignment="Center"> A

原创 WPF版會飛的小鳥

用Blend畫界面、做動畫,C#控制位移。 MainWindow.xaml: <Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentati

原创 WPF之路由事件

路由規則之冒泡規則: <Window x:Class="RoutedEvents.BubbledLabelClick" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/pre

原创 WPF 自下定義多指針標尺

Window2.xaml: <Window x:Class="Test.Window2"         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

原创 MVVM模式基於開源VLC解碼器WPF萬能視頻播放器

採用VLC解碼器,能播放市面上幾乎所有格式影片。 Models:SysInfo.cs using System; using System.Collections.Generic; using System.Linq; using S

原创 WPF之功能鍵檢測

<StackPanel Margin="5"> <TextBox KeyDown="KeyEvent"></TextBox> <TextBlock Name="lblInfo"></TextBlock> <Bu

原创 WPF之鼠標拖放複製

<Grid Margin="5"> <Grid.RowDefinitions> <RowDefinition></RowDefinition> <RowDefinition></RowDefinitio

原创 WPF之效果

模糊效果: <Button Content="Blurred (Radius=2)" Padding="5" Margin="3"> <Button.Effect>

原创 WPF之命令

<Button Margin="5" Command="local:DataCommands.Requery">Requery</Button> public partial class CustomCommand : Syste

原创 WPF之動畫

樣式動畫: <Window.Resources> <Style x:Key="GrowButtonStyle"> <Style.Triggers> <Trig

原创 WPF之動畫

線性關鍵幀、不連續關鍵幀動畫: <Window.Triggers> <EventTrigger RoutedEvent="Window.Loaded"> <EventTrigger.Acti

原创 控件基類及屬性

3個基類的繼承層次結構: System.Windows.UIElement System.Windows.FrameworkElement System.Windows.Controls.Control UIElement類常用屬性

原创 一個Metro風格的開源項目 MahApps.Metro

目錄: Metro風格控件 Metro主題   MahApps.Metro文檔地址:http://mahapps.com/MahApps.Metro/ 源碼地址:https://github.com/MahApps/MahApps.