SlideShare une entreprise Scribd logo
1  sur  34
Behavior - 喜びと悲しみに果てに -
蜜葉 優
• H.N. :蜜葉 優 [mitsuba yu]
• Expression Blendが好きな人
• 最近はカメラが趣味
– パワポの表紙はいつも自分の
• twitter:@mitsuba_tan
• Blog:http://c-mitsuba.hatenablog.com/
profile
Windows 8.1
+
Blend for VS 2013
ようやくBehaviorが
復活したらしい!!
うれしい!
Behavior知ってるよね。
だれが
どうされたときに
だれの
なにを
どうする。
Buttonが
Clickされたときに
Rectangleの
Fillを
Redに変更する。
Windows Phoneの場合
Windows Store Appsの場合
違い
BehaviorとかToriggerActionにあった
だれが
どうされたときに
が、1つのコントロールになっている。
違い
だれが
どうされたときに
が1つになったことで、同じBehaviorを
だれが
どうされたときに
実行するかまとめられるようになった。
いいこと。
だれが
どうされたときに
いっぱいのビヘイビアがまとまっているの
でわかりやすい。
わるいこと。
階層が深くなる。
わるいこと。
1つの「だれがどうしたときに」に対して、
1種類のビヘイビアしか置けない。
いろんな種類のビヘイビア置きたい。
わるいこと。
1種類のビヘイビアを複数設置しようとし
たときに、既存の「だれがどうしたとき
に」の配下にビヘイビアが設置される。
ボタンが押されたときに
なんか処理する
ボタンがドラッグされたときに
なんか処理する
的なXAMLがとても書きにくい。
かなしみ。
ビヘイビアの構成が変わっている以上、
WPF/SL/WPのビヘイビアと作り方が違う
かなしみ。
ビヘイビアに条件が書けない。
かなしみ。
条件的なやつは
DataTriggerBehaviorに吸収された。
DataTriggerBehaviorはEventTriggerBehavior
に入れ子にできない
かなしみ。
DataTriggerBehaviorはEventTriggerBehavior
に入れ子にできない
つまり
だれが、どうしたときに、
だれが、のなにが、どうなっていたら、
だれの、なにを、どうする。
ができない。
かなしみ。
DataTriggerBehaviorはEventTriggerBehaviorに
入れ子にできない
つまり
Buttonが、Clickされたときに、
Rectangleの、Visibilityが、Visibleだったら、
Rectangleの、Visibilityを、Collapsedにして、
Rectangleの、Visibilityが、Collapsedだったら、
Rectangleの、Visibilityを、Visibleにする
ができない。
いいこと。
VMのプロパティみて
プロパティがtrueだったら表示
プロパティがfalseだったら非表示
みたいな、イベントに依存しない処理はで
きる。
いいこと。
VMのプロパティみて
プロパティがtrueだったら表示
プロパティがfalseだったら非表示
みたいな、イベントに依存しない処理はで
きる。
それってコンバータでいいよね、は言って
はいけない。
こまかいこと。
数が少ないといえど、実質
ChangePropertyAction、
ControlStoryboardAction、
GoToStateAction、
NavigateToPageAction、
ぐらいしか多用しないから問題ない。
NavigateToPageActionにParameterが付けれる
ようになってすばらしい。
DataStore操作系っていうか、
そもそもDataStore系がなくて貧弱
結論。
UIのための簡単なコードは駆逐で
きそう。
問題は
結局それ、
コンバータでやんの?
ビヘイビアでやんの?
あるいは組み合わせてやんの?
Behaviorの使い勝手
あの頃の幸せをStore Apps
に求めてはいけない。
あの頃の幸せには
Triggerに条件分が書けることと
PropertyChangedTriggerBehaviorが
足りない。
言いかえれば、そこさえ何とかな
れば、だいぶまともになる。
あと地味にBlendが変わってる。
Blendのおはなしは、10月のめとろ
で!
とりあえず温泉にはいろう!

Contenu connexe

Plus de c-mitsuba

Avalonia for MacApps
Avalonia for MacAppsAvalonia for MacApps
Avalonia for MacAppsc-mitsuba
 
nameless ある沼にDeepDiveした人のポートフォリオ
nameless ある沼にDeepDiveした人のポートフォリオnameless ある沼にDeepDiveした人のポートフォリオ
nameless ある沼にDeepDiveした人のポートフォリオc-mitsuba
 
Emotional space
Emotional spaceEmotional space
Emotional spacec-mitsuba
 
Designer’s Design Talk Azure / Windows Development 2人のMVPの場合 -
Designer’s  Design Talk Azure / Windows Development  2人のMVPの場合 -Designer’s  Design Talk Azure / Windows Development  2人のMVPの場合 -
Designer’s Design Talk Azure / Windows Development 2人のMVPの場合 -c-mitsuba
 
うるしまカップ パネルディスカッション
うるしまカップ パネルディスカッションうるしまカップ パネルディスカッション
うるしまカップ パネルディスカッションc-mitsuba
 
Designer’s Design Talk - Azure / Windows Development 2人のMVPの場合 -
Designer’s Design Talk - Azure / Windows Development 2人のMVPの場合 - Designer’s Design Talk - Azure / Windows Development 2人のMVPの場合 -
Designer’s Design Talk - Azure / Windows Development 2人のMVPの場合 - c-mitsuba
 
30min serverless-x tuber
30min serverless-x tuber30min serverless-x tuber
30min serverless-x tuberc-mitsuba
 
HoloLensで航空管制
HoloLensで航空管制HoloLensで航空管制
HoloLensで航空管制c-mitsuba
 
Introducing micro:bit and demo
Introducing micro:bit and demoIntroducing micro:bit and demo
Introducing micro:bit and democ-mitsuba
 
micro:bitさわってみた。
micro:bitさわってみた。micro:bitさわってみた。
micro:bitさわってみた。c-mitsuba
 
HoloLens Demo
HoloLens DemoHoloLens Demo
HoloLens Democ-mitsuba
 
楽しく生きるために 何を選択して、どうしてきたか。
楽しく生きるために 何を選択して、どうしてきたか。楽しく生きるために 何を選択して、どうしてきたか。
楽しく生きるために 何を選択して、どうしてきたか。c-mitsuba
 
Dotnetlab: Introducing Fluent Design System and Mixed Reality
Dotnetlab: Introducing Fluent Design System and Mixed RealityDotnetlab: Introducing Fluent Design System and Mixed Reality
Dotnetlab: Introducing Fluent Design System and Mixed Realityc-mitsuba
 
to tanzanite
to tanzanite to tanzanite
to tanzanite c-mitsuba
 
Introduction Xamarin forms mac
Introduction Xamarin forms macIntroduction Xamarin forms mac
Introduction Xamarin forms macc-mitsuba
 
Tried to touch Xamarin Forms for MacOS
Tried to touch Xamarin Forms for MacOSTried to touch Xamarin Forms for MacOS
Tried to touch Xamarin Forms for MacOSc-mitsuba
 
Introducing Fluent Design
Introducing Fluent DesignIntroducing Fluent Design
Introducing Fluent Designc-mitsuba
 
ホントのホントの0から始める3Dモデリング入門
ホントのホントの0から始める3Dモデリング入門ホントのホントの0から始める3Dモデリング入門
ホントのホントの0から始める3Dモデリング入門c-mitsuba
 

Plus de c-mitsuba (20)

Avalonia for MacApps
Avalonia for MacAppsAvalonia for MacApps
Avalonia for MacApps
 
Me
MeMe
Me
 
nameless ある沼にDeepDiveした人のポートフォリオ
nameless ある沼にDeepDiveした人のポートフォリオnameless ある沼にDeepDiveした人のポートフォリオ
nameless ある沼にDeepDiveした人のポートフォリオ
 
Emotional space
Emotional spaceEmotional space
Emotional space
 
Designer’s Design Talk Azure / Windows Development 2人のMVPの場合 -
Designer’s  Design Talk Azure / Windows Development  2人のMVPの場合 -Designer’s  Design Talk Azure / Windows Development  2人のMVPの場合 -
Designer’s Design Talk Azure / Windows Development 2人のMVPの場合 -
 
うるしまカップ パネルディスカッション
うるしまカップ パネルディスカッションうるしまカップ パネルディスカッション
うるしまカップ パネルディスカッション
 
Designer’s Design Talk - Azure / Windows Development 2人のMVPの場合 -
Designer’s Design Talk - Azure / Windows Development 2人のMVPの場合 - Designer’s Design Talk - Azure / Windows Development 2人のMVPの場合 -
Designer’s Design Talk - Azure / Windows Development 2人のMVPの場合 -
 
30min serverless-x tuber
30min serverless-x tuber30min serverless-x tuber
30min serverless-x tuber
 
HoloLensで航空管制
HoloLensで航空管制HoloLensで航空管制
HoloLensで航空管制
 
Introducing micro:bit and demo
Introducing micro:bit and demoIntroducing micro:bit and demo
Introducing micro:bit and demo
 
micro:bitさわってみた。
micro:bitさわってみた。micro:bitさわってみた。
micro:bitさわってみた。
 
HoloLens Demo
HoloLens DemoHoloLens Demo
HoloLens Demo
 
楽しく生きるために 何を選択して、どうしてきたか。
楽しく生きるために 何を選択して、どうしてきたか。楽しく生きるために 何を選択して、どうしてきたか。
楽しく生きるために 何を選択して、どうしてきたか。
 
Dotnetlab: Introducing Fluent Design System and Mixed Reality
Dotnetlab: Introducing Fluent Design System and Mixed RealityDotnetlab: Introducing Fluent Design System and Mixed Reality
Dotnetlab: Introducing Fluent Design System and Mixed Reality
 
WinMR入門
WinMR入門WinMR入門
WinMR入門
 
to tanzanite
to tanzanite to tanzanite
to tanzanite
 
Introduction Xamarin forms mac
Introduction Xamarin forms macIntroduction Xamarin forms mac
Introduction Xamarin forms mac
 
Tried to touch Xamarin Forms for MacOS
Tried to touch Xamarin Forms for MacOSTried to touch Xamarin Forms for MacOS
Tried to touch Xamarin Forms for MacOS
 
Introducing Fluent Design
Introducing Fluent DesignIntroducing Fluent Design
Introducing Fluent Design
 
ホントのホントの0から始める3Dモデリング入門
ホントのホントの0から始める3Dモデリング入門ホントのホントの0から始める3Dモデリング入門
ホントのホントの0から始める3Dモデリング入門
 

温泉でびへいびあをちょっと触ってみたかんじ