WPF Win Form WPF XBAP WPFE IE IEMozilla
WPF Win. Form WPF XBAP WPF/E ブラウザ - - IE IE・Mozilla・ IE・Firefox・ Safari Opera・ Safari プラットフ ォーム Windows 2000・XP ・ 2003・Vista Windows XP・ 2003・ Vista Windows 2000・XP・ 2003・Vista マック 任意 . Net Framework 3. 0 ブラウザプ ラグイン なし ランタイムイ. Net Framework ンストール 2. 0 わんくま同盟 東京勉強会 #6 ASP. NET AJAX
基本サービス-プロパティ Expression XAMLを生成 XAML属性設定 Visual Studio プログラムで動的生成 プロパティ設定 XAML <Button Width="100"> OK <Button. Background> Light. Blue </Button. Background> </Button> C# Button b 1 = new Button(); b 1. Content = "OK"; b 1. Background = new Solid. Color. Brush(Colors. Light. Blue); b 1. Width = 100; VB. NET Dim b 1 As New Button b 1. Content = "OK" b 1. Background = New _ Solid. Color. Brush(Colors. Light. Blue) b 1. Width = 100 わんくま同盟 東京勉強会 #6
Expression Blend Visual Studio 連携 DEMO わんくま同盟 東京勉強会 #6
ユーザーインターフェースサービス-コントロール Windows Forms のみ Print. Preview. Dialog Date. Time. Picker Numeric. Updown Domain. Updown Error. Provider Help. Provider Image. List Link. Label Masked. Text. Box Month. Calender Notify. Icon Print. Document Property. Grid Color. Dialog Folder. Browse. Dialog Font. Dialog Data. Grid. View わんくま同盟 東京勉強会 #6
ユーザーインターフェースサービス-コントロール • WPF のみ(Tool. Boxで選択できるもの) 図形 Line パネル Dock. Panel Ellipse Stack. Panel Rectangle Virtual. Mode. Stack. Panel Tool. Bar. Overflow. Panel ビューアー Uniform. Grid View. Box Popup Scroll. Viewer Bullet. Decorator Flow. Document. Page. Viewer Flow. Document. Scroll. Viewer わんくま同盟 東京勉強会 #6
ユーザーインターフェースサービス-コントロール • WPF のみ(Tool. Boxで選択できるもの) Textやボタン 3 -D Text. Block View. Port 3 D Password. Box Repeat. Button Toggle. Button 小物 Expander インク Ink. Canvas Ink. Presenter Thumb Border Resize. Grip Content. Presenter Headered. Content. Control わんくま同盟 東京勉強会 #6
背景を透けさせる • dwmapi. dll の Dwm. Extend. Frame. Into. Client. Area と Dwm. Is. Composition. Enabled を使います。 • Window. On. Source. Initialized を、オーバー ライドしてBackgroundと Composition. Target. Background. Colorを Transparentに指定します。 • Dwm. Extend. Frame. Into. Client. Areaで全 Client. Areaに拡張します。 わんくま同盟 東京勉強会 #6
アニメーション • 例えば5秒後までに徐々に色が変わるように するには以下のようなタグを使います。 Color. Animation. Using. Key. Frames Spline. Color. Key. Frame <Storyboard x: Key="Timeline 1"> <Color. Animation. Using. Key. Frames Begin. Time="00: 00" Storyboard. Target. Name="ellipse" Storyboard. Target. Property="(Shape. Fill). (Solid. Color. Brush. Color)"> <Spline. Color. Key. Frame Key. Time="00: 00" Value="#FF 66132 E"/> <Spline. Color. Key. Frame Key. Time="00: 05" Value="#FF 6 A 6 A 6 A"/> </Color. Animation. Using. Key. Frames> </Storyboard> わんくま同盟 東京勉強会 #6
アニメーション • アニメーション可能なクラスがある型 Boolean Point 3 D Byte Point Char Quaternion Color Rect Decimal Rotation 3 D Double Single Int 16 Size Int 32 String Int 64 Thickness Matrix Vector 3 D Object Vector わんくま同盟 東京勉強会 #6
イベント • イベントの追加はプログラムからでもデザイ ナからでも作成できます。 • もちろんイベントの実装はプログラムで行いま す。 XAML <Repeat. Buttonx: Name=“Up. Arrow“ Click=“Up. Arrow_Click” /> C# Up. Arrow. Click+= new Routed. Event. Handler(Up. Arrow_Click); VB. NET Addhandler Up. Arrow. Click, Address. Of Up. Arrow_Click わんくま同盟 東京勉強会 #6
コマンド Command. Binding Save. Command. Binding = new Command. Binding( Application. Commands. Save, Save. Command. Executed, Save. Command. Can. Execute); this. Command. Bindings. Add(Save. Command. Binding); void Save. Command. Executed(object target, Executed. Routed. Event. Args e) { // 実際の保存処理 } void Save. Command. Can. Execute(object sender, Can. Execute. Routed. Event. Args e) { e. Can. Execute= true; } わんくま同盟 東京勉強会 #6
キー • キーをコマンドにバインディングできます。 下は「コントロール+S」を 「 Application. Commands. Save」コマンドに、 バインドした例です。 Key. Binding Save. Key. Binding = new Key. Binding( Application. Commands. Save, Key. S, Modifier. Keys. Control); this. Input. Bindings. Add(Save. Key. Binding); わんくま同盟 東京勉強会 #6
- Slides: 36