えムナウ Blog

えムナウ の なすがまま

目次

Blog 利用状況

ニュース


follow mnow at http://twitter.com


えムナウのプログラミングのページ

INETAJ

書庫

日記カテゴリ

ギャラリ

MVVM パターンで VM から VIEW を操作したい その2

私の意見に対して結構反響があったのでこちらも書いておかなければと思い書いておく。

MVVM パターンで VM から VIEW を操作したい
http://blogs.wankuma.com/mnow/archive/2010/09/20/193090.aspx

MVVM パターンで ViewModel から VIEW を操作したいということに対するアメリカでの解決策に近いものは、添付ビヘイビアーだ。
コントロールにちょっとした操作を行うのがその目的である。

Expression Blend において標準の添付ビヘイビアーは以下のようになっている。

ビヘイビアー1

また、Microsoft Expression Blend Software Development Kit もあり独自の添付ビヘイビアーも作成できる。

Expression Blend 標準の添付ビヘイビアーは、トリガー、条件、共通プロパティ、その他のプロパティで構成されている。
ビヘイビアー2
「トリガー、条件」は共通で PropertyChangedTrigger を使うと ViewModel のプロパティ変更をトリガにでき、条件にも ViewModel のプロパティが使用できる。
各ビヘイビアーで異なるのは共通プロパティ、その他のプロパティ(例はアニメーションのプロパティになっている)で、コントロールにどういう操作を行うかの部分となる。
ちなみに XAML はこんな感じになっている。

xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:ic="http://schemas.microsoft.com/expression/2010/interactions"

<i:Interaction.Triggers>
    <ic:PropertyChangedTrigger Binding="{Binding ViewModelProperty}">
        <i:Interaction.Behaviors>
            <ic:ConditionBehavior>
                <ic:ConditionalExpression>
                    <ic:ComparisonCondition LeftOperand="{Binding IntValue}" RightOperand="0"/>
                </ic:ConditionalExpression>
            </ic:ConditionBehavior>
        </i:Interaction.Behaviors>
        <ic:ChangePropertyAction PropertyName="Width" Value="200"/>
    </ic:PropertyChangedTrigger>
</i:Interaction.Triggers>

添付ビヘイビアーの利点は View のコードビハインドを書かなくてすむ、一度作成すると再利用が容易、使用するのにXAMLだけで書けるBlend でサポートされている、といろいろある。

MVVM パターンで VM から VIEW を操作するには、添付ビヘイビアーを使用することも推奨する。

投稿日時 : 2010年9月26日 21:25

コメントを追加

# [チラ裏]Blend勉強しなきゃなぁ 2010/09/27 13:28 PCだい「ちゅき」

[チラ裏]Blend勉強しなきゃなぁ

# [チラ裏]Blend勉強しなきゃなぁ 2010/09/27 13:30 PCだい「ちゅき」

[チラ裏]Blend勉強しなきゃなぁ

# re: MVVM パターンで VM から VIEW を操作したい その2 2010/09/27 19:47 なかむら

はてなダイアリーからトラックバックが遅れないので、コメントで失礼します。
http://d.hatena.ne.jp/griefworker/20100927/how_to_use_view_function_in_viewmodel_2

# eTNGOPLCcVTC 2019/04/22 17:07 https://www.suba.me/

xwkDgj It as not that I want to replicate your internet site, but I really like the design. Could you let me know which style are you using? Or was it especially designed?

# vroBsQVbzYLTdIF 2019/04/26 21:55 http://www.frombusttobank.com/

Wow, that as what I was exploring for, what a stuff! present here at this webpage, thanks admin of this web site.

# NVoEqlvVOyXzQrv 2019/04/27 4:56 http://avaliacao.se.df.gov.br/online/user/profile.

ThаА а?а?re is noticeablаАа?аБТ? a ton to realize about thаАа?б?Т€Т?аАа?б?Т€а?.

# hFXeuZHuQy 2019/04/27 21:36 https://www.masteromok.com/members/dinnersmoke14/a

very good put up, i definitely love this website, carry on it

# mIEpAPUQDeSRsVj 2019/04/30 23:52 http://share.eduservice.xyz/story.php?title=curso-

It as the little changes that will make the biggest changes. Thanks for sharing!

# hfoqqhYjYLMp 2019/05/01 18:15 https://www.easydumpsterrental.com

We all talk just a little about what you should speak about when is shows correspondence to because Perhaps this has much more than one meaning.

# iBAdNrSFtYj 2019/05/02 3:20 http://bgtopsport.com/user/arerapexign461/

Regards for this wonderful post, I am glad I discovered this web site on yahoo.

# lOCIkhHjgVqZxaPv 2019/05/02 21:04 https://www.ljwelding.com/hubfs/tank-fit-up-bed-sy

physical exam before starting one. Many undersized Robert Griffin Iii Jersey Price

# IVOSnhCCeGrZZj 2019/05/03 1:04 https://www.ljwelding.com/hubfs/welding-tripod-500

Must tow line I concur! completely with what you said. Good stuff. Keep going, guys..

# riDhROsxOyBxfSit 2019/05/03 9:22 http://dalemisczynski.com/__media__/js/netsoltrade

This blog is no doubt entertaining and besides factual. I have picked up a bunch of helpful stuff out of this amazing blog. I ad love to visit it every once in a while. Thanks a bunch!

# QFgAlMIZoUbepFfDcT 2019/05/03 16:29 https://mveit.com/escorts/netherlands/amsterdam

This is one awesome blog post. Fantastic.

# psKMtUHKpYEW 2019/05/03 19:00 https://mveit.com/escorts/australia/sydney

Money and freedom is the best way to change, may you be rich and continue to help other people.

# wnnSKgdGsNrvBSDm 2019/05/04 3:50 https://timesofindia.indiatimes.com/city/gurgaon/f

Thanks again for the blog post.Much thanks again. Really Great.

# BGBGpUDoERNscvOWKhF 2019/05/04 5:04 https://www.gbtechnet.com/youtube-converter-mp4/

Some genuinely good content on this internet site , regards for contribution.

# Ahaa, its pleasant discussion concerning this paragraph here at this weblog, I have read all that, so now me also commenting here. 2019/05/05 5:31 Ahaa, its pleasant discussion concerning this para

Ahaa, its pleasant discussion concerning this paragraph here at this weblog, I have read all that, so now me also commenting here.

# mJUFDDobIvEqJij 2019/05/05 19:18 https://docs.google.com/spreadsheets/d/1CG9mAylu6s

This blog was how do you say it? Relevant!! Finally I have found something that helped me. Appreciate it!

# igIHNYTKgGuJQduV 2019/05/07 18:21 https://www.mtcheat.com/

south korea jersey ??????30????????????????5??????????????? | ????????

# ZcWPkQcnuV 2019/05/08 20:27 https://ysmarketing.co.uk/

There is definately a great deal to know about this issue. I really like all of the points you made.

# HHaOJBNPWQUMP 2019/05/08 23:04 https://www.edocr.com/v/ear3mb4g/CassiusWilson/Sto

Its hard to find good help I am forever proclaiming that its hard to get good help, but here is

# wqvIcPgFEIV 2019/05/09 3:21 http://ncusedbooks.ca/author/kadynthornton/

It as enormous that you are getting ideas from this piece of writing as well as from our dialogue made at this place.

# JjUMFqjoyjLQwVetUp 2019/05/09 7:40 http://sendvid.com/bs0c4hfw

Thanks for the post.Really looking forward to read more. Fantastic.

# NnlUifyJFDV 2019/05/09 9:19 https://www.youtube.com/watch?v=9w5qk_gXWEE&fe

in a while that isn at the same outdated rehashed material.

# wIyZleDsZEdh 2019/05/09 11:38 http://harlan4679sp.icanet.org/chats-the-secret-to

It as hard to come by well-informed people in this particular topic, however, you sound like you know what you are talking about! Thanks

# asLdPuJKKeICsJ 2019/05/09 11:56 https://www.plurk.com/p/na02f3

This is one awesome blog article.Much thanks again. Really Great.

# vWNBNDcNJmV 2019/05/09 15:45 https://reelgame.net/

Whoa! This blog looks just like my old one! It as on a entirely different topic but it has pretty much the same layout and design. Outstanding choice of colors!

# CFjuSeqzyoLlSmOMShT 2019/05/09 20:05 https://pantip.com/topic/38747096/comment1

It as great that you are getting ideas from this piece of writing as well as from our discussion made at this time.

# gZzXqwzEBgFJdukY 2019/05/09 21:58 https://www.sftoto.com/

topic of unpredicted feelings. Feel free to surf to my web blog; how to Get rid Of dark Circles

# pwhlqfIyFGrhmv 2019/05/10 3:28 https://betadeals.com.ng/user/profile/3657372

You made some decent points there. I looked on the internet to find out more about the issue and found most people will go along with your views on this web site.

# jnTGGdblITfIUP 2019/05/10 5:04 https://totocenter77.com/

Very neat blog.Really looking forward to read more. Really Great.

# PvyFwwwzArYmPJRQX 2019/05/10 7:19 https://bgx77.com/

What as up, I just wanted to say, I disagree. Your article doesn at make any sense.

# gIrmPpRniwUM 2019/05/11 5:19 https://www.mtpolice88.com/

Wow, this piece of writing is fastidious, my sister is analyzing these kinds of things, therefore I am going to tell her.

# GalsVPTYTATkOCKB 2019/05/11 6:59 http://aaimpact.com/__media__/js/netsoltrademark.p

It was big joy to detect and read this comprehensive blog. Fantastic reading!

# mbmCCcZuwCNDTlRehmh 2019/05/12 22:11 https://www.sftoto.com/

Some truly good posts on this website , thankyou for contribution.

# KptlNTahho 2019/05/13 0:31 https://www.mjtoto.com/

Well I definitely enjoyed reading it. This information offered by you is very effective for good planning.

# HrUevhyVCc 2019/05/13 19:35 https://www.ttosite.com/

Very good information. Lucky me I came across your website by chance (stumbleupon). I ave saved as a favorite for later!

# LaebzNkYCVZ 2019/05/13 21:06 https://www.smore.com/uce3p-volume-pills-review

writing is my passion that may be why it really is uncomplicated for me to complete short article writing in less than a hour or so a

# QrRQQPdIRZHOqh 2019/05/14 10:25 https://squareblogs.net/mcclanahanayala3/ahora-es-

This unique blog is really educating and also diverting. I have chosen many handy advices out of this amazing blog. I ad love to go back again and again. Cheers!

# FlkqNxERNJz 2019/05/14 12:34 https://pixelware01.page.tl/PIXELWARE.htm

The visitors took an early lead. The last

# xonrObjygwWty 2019/05/14 14:40 http://neil7270ag.thedeels.com/according-to-the-la

Just wanna state that this is handy , Thanks for taking your time to write this.

# AZELwDCuploqDB 2019/05/14 19:02 https://www.dajaba88.com/

Right now it appears like Drupal would be the preferred blogging platform obtainable at the moment. (from what I ave read) Is that what you are working with in your weblog?

# BNJIvpZVDV 2019/05/14 20:50 https://bgx77.com/

I will definitely check these things out

# PgfTrBNrDSSnsFEozP 2019/05/14 23:43 https://totocenter77.com/

It is not my first time to pay a quick visit this site,

# vcgXnPoHXNDtbs 2019/05/15 1:31 https://www.mtcheat.com/

Thanks so much for the article.Thanks Again. Really Great.

# ufnbQenopz 2019/05/15 3:37 http://auditingguy597iu.crimetalk.net/you-are-in-t

This can be a really very good study for me, Should admit which you are a single of the best bloggers I ever saw.Thanks for posting this informative write-up.

# EceEPjICogiKRY 2019/05/15 4:24 http://www.jhansikirani2.com

I'а?ve learn several just right stuff here. Certainly value bookmarking for revisiting. I wonder how much attempt you place to create this type of great informative site.

# toUVfWwvtZwYktgj 2019/05/15 8:09 http://bbs.zxtsg.com/home.php?mod=space&uid=30

Im thankful for the blog.Much thanks again. Really Great.

# KlLuzgQMbeyUKD 2019/05/15 18:59 http://funny-shop.club/story.php?id=24781

loading velocity is incredible. It seems that you are

# sQDgWAJQeJFeA 2019/05/15 19:12 https://www.goodreads.com/group

Your style is unique compared to other people I have read stuff from. I appreciate you for posting when you have the opportunity, Guess I will just bookmark this web site.

# QlYBrDsVZlbw 2019/05/16 0:51 https://www.kyraclinicindia.com/

I was suggested this website by my cousin. I am not sure whether this post is written by him as no one else know such detailed about my problem. You are incredible! Thanks!

# We stumbled over here from a different website and thought I might as well check things out. I like what I see so i am just following you. Look forward to checking out your web page yet again. 2019/05/16 21:00 We stumbled over here from a different website and

We stumbled over here from a different website and thought I might
as well check things out. I like what I see so i am just following you.
Look forward to checking out your web page yet again.

# rjVOHbBbMOKQvUbdy 2019/05/17 3:33 https://xceptionaled.com/members/northblack6/activ

I simply could not leave your website before suggesting that I extremely enjoyed the standard info an individual supply to your guests? Is going to be again ceaselessly in order to inspect new posts.

# GnSYZDJItiLsP 2019/05/17 6:37 https://www.youtube.com/watch?v=Q5PZWHf-Uh0

Terrific work! That is the type of info that should be shared across the net. Disgrace on Google for no longer positioning this put up higher! Come on over and seek advice from my web site. Thanks =)

# fZxpnKAMgSuloqCh 2019/05/17 19:32 https://www.youtube.com/watch?v=9-d7Un-d7l4

Your web site provided us with valuable info to

# lsbcgbQwsZKIkMJUe 2019/05/18 2:59 https://tinyseotool.com/

I value the post.Much thanks again. Great.

# qObhqhnevoGzs 2019/05/18 3:29 http://www.zoraholidays.net/index.php/component/k2

Some truly prime content on this web site , saved to my bookmarks.

# xsUNBOaqmePNJBVb 2019/05/18 5:58 https://www.mtcheat.com/

With thanks for sharing your awesome websites.|

# KdUQUQnPpMFkVrKyIj 2019/05/20 17:33 https://nameaire.com

There as definately a great deal to know about this subject. I love all of the points you have made.

# levDFXzBekMpgsX 2019/05/20 21:51 http://corporativoinfo.com/cisa/modules.php?name=Y

quite good put up, i certainly enjoy this web web site, keep on it

# LXNwdpBHoHLcVaj 2019/05/21 22:20 https://nameaire.com

You, my pal, ROCK! I found exactly the information I already searched everywhere and simply couldn at find it. What an ideal web-site.

# ZEJgJqDOxgesXg 2019/05/22 17:13 https://furrate2.bladejournal.com/post/2019/05/22/

The best approach for the men which you can understand more about today.

# JJHliULsjHZZfuneB 2019/05/22 19:25 https://www.ttosite.com/

Really enjoyed this blog post.Thanks Again. Great.

# QyyctkDEjx 2019/05/22 20:41 https://penzu.com/p/bc6655c1

to mind. Is it simply me or does it look like li?e some of

# ckvANcyWvdH 2019/05/22 23:22 https://famedspace.com/blog/view/82870/supposed-to

There is certainly noticeably a bundle to comprehend this. I assume you might have made particular great factors in functions also.

# teBHBoXcWmaoSj 2019/05/23 3:11 https://www.mtcheat.com/

The acetone and consultation need in each history and may be painless but however recently clinical.

# NEqykvrzyzsPDgO 2019/05/23 6:24 http://bgtopsport.com/user/arerapexign168/

This blog was how do you say it? Relevant!! Finally I ave found something which helped me. Cheers!

# TWSaHjTsgWWUiT 2019/05/23 17:15 https://www.combatfitgear.com

Some genuinely great information , Gladiola I discovered this.

# TqrUTZddExKF 2019/05/24 1:32 https://www.nightwatchng.com/&#8206;category/d

Thanks again for the blog post.Much thanks again.

# ccMTWOwJTeZcj 2019/05/24 5:45 https://www.talktopaul.com/videos/cuanto-valor-tie

JAPAN JERSEY ??????30????????????????5??????????????? | ????????

# TJFvxQhuOVsXlhvkJDz 2019/05/24 12:52 http://banki63.ru/forum/index.php?showuser=2540687

I went over this internet site and I conceive you have a lot of good information, saved to bookmarks (:.

# yLkofkdAfxIm 2019/05/24 17:27 http://tutorialabc.com

I truly appreciate this blog article.Much thanks again. Fantastic.

# QGGHmCjYjtXkJqAWG 2019/05/25 3:28 http://elkinmir.ru/bitrix/redirect.php?event1=&

You ave made some really good points there. I checked on the internet to find out more about the issue and found most individuals will go along with your views on this website.

# GNmJnVrFblQF 2019/05/25 7:49 http://bgtopsport.com/user/arerapexign838/

You made some decent points there. I looked on line for that issue and identified a lot of people will go coupled with with all your website.

# LAZUiccuPTaX 2019/05/25 12:35 https://blogfreely.net/willowtrail15/victoria-bc-a

short training method quite a lot to me and also also near our position technicians. Thanks; on or after all people of us.

# oWMCmpUjGbHw 2019/05/26 3:40 http://nifnif.info/user/Batroamimiz446/

you will have an ideal weblog right here! would you like to make some invite posts on my blog?

# MWEfoozcbBvPYQ 2019/05/27 3:23 http://bgtopsport.com/user/arerapexign676/

When I start your Rss feed it seems to be a lot of garbage, is the issue on my side?

# JbLoYqOVloWgCPZxyVd 2019/05/27 18:07 https://www.ttosite.com/

Thankyou for helping out, wonderful information.

# uOvgPfOAxrfbce 2019/05/28 0:07 https://www.mtcheat.com/

simply shared this helpful info with us. Please stay us up to date like this.

# BmtgjMyNaqgrAgzea 2019/05/28 6:54 https://www.reddit.com/r/oneworldherald/

This very blog is no doubt educating and also informative. I have chosen a lot of helpful tips out of this source. I ad love to go back again soon. Thanks a bunch!

# jpgJltTiICQwFt 2019/05/29 17:58 https://lastv24.com/

Wow! This could be one particular of the most useful blogs We ave ever arrive across on this subject. Actually Great. I am also an expert in this topic therefore I can understand your hard work.

# ywaFdMiLUJAkM 2019/05/29 20:28 http://bostonparking.com/__media__/js/netsoltradem

I will immediately grab your rss feed as I can not in finding your email subscription hyperlink or e-newsletter service. Do you have any? Please allow me recognize so that I may subscribe. Thanks.

# QupQEROoIBpA 2019/05/30 1:57 http://totocenter77.com/

Some truly fantastic articles on this website , appreciate it for contribution.

# gjJlgfHBOXfXHXAD 2019/05/30 7:00 https://ygx77.com/

Im grateful for the blog.Thanks Again. Much obliged.

# uzkQsykOEj 2019/06/01 1:10 https://www.intensedebate.com/people/repratipho

Wow! This could be one particular of the most useful blogs We have ever arrive across on this subject. Actually Excellent. I am also an expert in this topic so I can understand your effort.

# YuLjHVKRvBAuxaYmUoo 2019/06/03 23:54 https://ygx77.com/

I think other web site proprietors should take this website as an model, very clean and magnificent user genial style and design, as well as the content. You are an expert in this topic!

# SgjZmzzqpyrEzIxTsT 2019/06/04 0:04 http://b00ts.ru/bitrix/rk.php?goto=http://www.fbio

Wow! This could be one particular of the most helpful blogs We have ever arrive across on this subject. Basically Wonderful. I am also an expert in this topic so I can understand your hard work.

# mUGEqAgoyxIdobRA 2019/06/04 20:40 https://www.creativehomeidea.com/clean-up-debris-o

It as not that I want to replicate your web-site, but I really like the layout. Could you tell me which theme are you using? Or was it especially designed?

# YuyMKILCOHe 2019/06/05 16:58 http://maharajkijaiho.net

Only a smiling visitor here to share the love (:, btw outstanding style.

# TDTZLOsiezEt 2019/06/05 18:37 https://www.mtpolice.com/

This will be a great web site, might you be involved in doing an interview regarding how you developed it? If so e-mail me!

# pkWLGZgLGZrNfa 2019/06/06 1:28 https://mt-ryan.com/

You made some decent points there. I looked on the internet for the subject matter and found most persons will approve with your website.

# KfAxziInxVJjCzPbf 2019/06/07 2:37 https://www.anobii.com/groups/01ba0abef1973f2c38/

Know who is writing about bag and also the actual reason why you ought to be afraid.

# qileZkeeuXhxTuJDKY 2019/06/07 5:02 https://www.clipix.com/9/share-ehOmIulE

Thanks for the article.Thanks Again. Want more.

# FTmXJzajSiSs 2019/06/07 21:56 https://youtu.be/RMEnQKBG07A

Really enjoyed this article.Thanks Again. Awesome.

# rKmzwTYtUpFhFJiga 2019/06/07 23:50 https://totocenter77.com/

There as noticeably a bundle to find out about this. I assume you made sure good points in features also.

# wOWAkvfFJoLONcH 2019/06/08 1:30 https://www.ttosite.com/

I truly appreciate this blog.Really looking forward to read more. Keep writing.

# OwMgKlcuKaKg 2019/06/08 5:38 https://www.mtpolice.com/

Im no expert, but I think you just made an excellent point. You undoubtedly fully understand what youre talking about, and I can really get behind that. Thanks for being so upfront and so honest.

# bndbsqkYwIoYp 2019/06/10 16:44 https://ostrowskiformkesheriff.com

These are in fact wonderful ideas in on the topic of blogging. You have touched some pleasant things here. Any way keep up wrinting.

# EMWlokGybwM 2019/06/11 3:19 http://www.plerb.com/velvetplain8

wow, awesome blog.Much thanks again. Will read on...

# TVlJDvlCYJqY 2019/06/12 5:56 http://www.sla6.com/moon/profile.php?lookup=215126

I think this is a real great blog article.Really looking forward to read more. Great.

# WTpsjiVeBiuDM 2019/06/12 17:15 http://gomakonline.space/story.php?id=19944

It as hard to come by educated people about this subject, however, you sound like you know what you are talking about! Thanks

# mrteXDqMYg 2019/06/12 20:47 https://profiles.wordpress.org/godiedk13u/

Well I sincerely liked studying it. This tip provided by you is very constructive for correct planning.

# IPODKUMyXhwcO 2019/06/13 1:59 http://bgtopsport.com/user/arerapexign154/

I simply could not leave your web site before suggesting that I actually loved the usual information a person supply to your guests? Is going to be back regularly in order to check up on new posts

# dsGzGxSdXyooQMdeQpy 2019/06/14 16:46 https://www.hearingaidknow.com/comparison-of-nano-

There is evidently a bundle to know about this. I consider you made some good points in features also.

# lCmSrHAajvUH 2019/06/14 21:21 https://www.anobii.com/groups/01abb9cd96bab872e6/

Well I definitely liked reading it. This subject offered by you is very constructive for good planning.

# YGASVTWloT 2019/06/15 6:36 http://www.usefulenglish.net/story/477743/

Thanks a lot for the article.Really looking forward to read more. Really Great.

タイトル  
名前  
URL
コメント