<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;DU4MRH4_eyp7ImA9WhRUFU0.&quot;"><id>tag:blogger.com,1999:blog-4472331550180899195</id><updated>2012-01-25T21:43:05.043+05:30</updated><category term="Tools" /><category term="Model View ViewModel" /><category term="WPF and Silverlight" /><category term="MVVM" /><category term="Poll" /><title>Vish 4 Tech Byte.</title><subtitle type="html">Technology life and more.</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://mywpf-visu.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://mywpf-visu.blogspot.com/" /><author><name>Vish</name><uri>http://www.blogger.com/profile/07190836461714792800</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="31" src="http://4.bp.blogspot.com/_TITDXqy9uuo/THjlPNydltI/AAAAAAAABT0/XwRWNuyh7aw/S220/New.JPG" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>18</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/blogspot/rFJG" /><feedburner:info uri="blogspot/rfjg" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;D0INQX45fyp7ImA9WhZXFk8.&quot;"><id>tag:blogger.com,1999:blog-4472331550180899195.post-776569631372956971</id><published>2011-05-06T01:29:00.001+05:30</published><updated>2011-05-06T01:29:50.027+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-06T01:29:50.027+05:30</app:edited><title>Experiments with Windows Phone 7 Programming</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div style="text-align: justify;"&gt;Any idea what all are the basic skill sets required to make a Windows Phone 7 application? I had assumed rocket science until i met a friend of mine 2 days back. I am more of a .NET guy mostly into WPF, XAML, C#, SQL Server, XML etc along with the knowledge of some architectures like MVC and MVVM.&lt;/div&gt;&lt;br /&gt;
&lt;a href="http://3.bp.blogspot.com/-MuUmyf3ODm4/TcMBSeyp6qI/AAAAAAAABWk/P1_ZO20LrQQ/s1600/windows-phone-7-tether2.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://3.bp.blogspot.com/-MuUmyf3ODm4/TcMBSeyp6qI/AAAAAAAABWk/P1_ZO20LrQQ/s320/windows-phone-7-tether2.jpg" width="310" /&gt;&lt;/a&gt;So again what are the skill sets required to start off with WP7 app development?&lt;br /&gt;
&lt;br /&gt;
The underlying framework is .NET itself.&lt;br /&gt;
&lt;br /&gt;
&lt;div style="text-align: justify;"&gt;Okay, that's interesting and not so much hard to believe. Why will Microsoft think of anything else when they have a great framework available with them. But yeah development environment must be something alien?&lt;/div&gt;&lt;br /&gt;
&lt;div style="text-align: justify;"&gt;No, it's Visual Studio 2010 itself and they do have an express version if you cannot afford the licensed one.&lt;/div&gt;&lt;br /&gt;
&lt;div style="text-align: justify;"&gt;Oh wow this is something cool. And so the languages used will be greek and latin? Don't tell me it's C#!&lt;/div&gt;&lt;br /&gt;
Obviously it is C# (CLS compliant in the true sense) and XAML for your markup.&lt;br /&gt;
&lt;br /&gt;
And we can make awesome designs using Expression Blend?&lt;br /&gt;
&lt;br /&gt;
Perfect, my adventure with mobile apps begins now.&lt;br /&gt;
&lt;br /&gt;
&lt;div style="text-align: justify;"&gt;But wait, there is a catch. You need to have a developer profile created with Windows Phone store to actually test your applications in your device (HTC or any suitable) and even to deploy them. And the developer certificate comes at a cost. But that does not stop you from trying out an app in the simulator coming along with the developer package.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4472331550180899195-776569631372956971?l=mywpf-visu.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Q35jF0t8iR7Pax10Pi-zWQPpgXs/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Q35jF0t8iR7Pax10Pi-zWQPpgXs/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Q35jF0t8iR7Pax10Pi-zWQPpgXs/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Q35jF0t8iR7Pax10Pi-zWQPpgXs/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/rFJG/~4/9PsiGOqSSfA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://mywpf-visu.blogspot.com/feeds/776569631372956971/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4472331550180899195&amp;postID=776569631372956971&amp;isPopup=true" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4472331550180899195/posts/default/776569631372956971?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4472331550180899195/posts/default/776569631372956971?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rFJG/~3/9PsiGOqSSfA/experiments-with-windows-phone-7.html" title="Experiments with Windows Phone 7 Programming" /><author><name>Vish</name><uri>http://www.blogger.com/profile/07190836461714792800</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="31" src="http://4.bp.blogspot.com/_TITDXqy9uuo/THjlPNydltI/AAAAAAAABT0/XwRWNuyh7aw/S220/New.JPG" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-MuUmyf3ODm4/TcMBSeyp6qI/AAAAAAAABWk/P1_ZO20LrQQ/s72-c/windows-phone-7-tether2.jpg" height="72" width="72" /><thr:total>1</thr:total><feedburner:origLink>http://mywpf-visu.blogspot.com/2011/05/experiments-with-windows-phone-7.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUcERHw-cSp7ImA9WhZXFEQ.&quot;"><id>tag:blogger.com,1999:blog-4472331550180899195.post-1080223869951330132</id><published>2011-05-04T02:36:00.002+05:30</published><updated>2011-05-04T12:40:05.259+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-04T12:40:05.259+05:30</app:edited><title>Reflector is no more?</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;It's been long, not having enough appetite to search around for new tools or features available and to write about them as my serious concentration is moving towards devices and apps in the mobile world. But then thought of looking around what my buddies are doing with their blogs. One buddy had long stopped blogging even though he had a great sense of words and reading his blogs used to be fun. But lately i got to know that he is seriously into it and has a dedicated blog space for himself. Check out &lt;a href="http://semikolan.net/"&gt;http://semikolan.net&lt;/a&gt; if you like some fun reading&lt;br /&gt;
&lt;br /&gt;
Click, click and i was there wanting to see what he has to offer!!! The first offering itself was such an awful information about Reflector, the .NET tool which we still use with so much of passion (may sound a little exaggerated but still a great tool we always refer to), no more remaining as a free tool.&lt;br /&gt;
&lt;br /&gt;
My buddy has termed it "&lt;span style="font-size: small;"&gt;Death of Reflector – No more “Free” as in Free Beer". The statement may sound funny but there is an alarm ringing which tells you that whatever is free today may come for a price and it can be a big surprise as well. Just think when Google search takes the same route! This is kinda wild thought but still a possibility.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: small;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: small;"&gt;Okay, so the final nail in the coffin, the expiration date of the older free version of the Red Gate Reflector is going to be &lt;/span&gt;June 2011. Just be aware and prepare for alternatives. Check &lt;a href="http://semikolan.net/2011/04/21/death-of-reflector-no-more-free-as-in-free-beer/"&gt;this&lt;/a&gt; blog if you need to know more about alternatives.&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4472331550180899195-1080223869951330132?l=mywpf-visu.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/B4oqtGHgZ2yYLIrQ8YeaZHhdW5A/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/B4oqtGHgZ2yYLIrQ8YeaZHhdW5A/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/B4oqtGHgZ2yYLIrQ8YeaZHhdW5A/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/B4oqtGHgZ2yYLIrQ8YeaZHhdW5A/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/rFJG/~4/8Un7c8jLUE0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://mywpf-visu.blogspot.com/feeds/1080223869951330132/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4472331550180899195&amp;postID=1080223869951330132&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4472331550180899195/posts/default/1080223869951330132?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4472331550180899195/posts/default/1080223869951330132?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rFJG/~3/8Un7c8jLUE0/reflector-is-no-more.html" title="Reflector is no more?" /><author><name>Vish</name><uri>http://www.blogger.com/profile/07190836461714792800</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="31" src="http://4.bp.blogspot.com/_TITDXqy9uuo/THjlPNydltI/AAAAAAAABT0/XwRWNuyh7aw/S220/New.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://mywpf-visu.blogspot.com/2011/05/reflector-is-no-more.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Dk8MQng4fSp7ImA9WhZQGEQ.&quot;"><id>tag:blogger.com,1999:blog-4472331550180899195.post-3246231670951345074</id><published>2011-04-27T14:30:00.001+05:30</published><updated>2011-04-27T14:31:23.635+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-04-27T14:31:23.635+05:30</app:edited><title>Gadgets, mobile apps review blog</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Please have a look at my new blog which deals with reviews of mobile devices, apps, gadgets etc.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://iosfreaky.blogspot.com/"&gt;http://iosfreaky.blogspot.com/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Enjoy!!!&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4472331550180899195-3246231670951345074?l=mywpf-visu.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/J4ZAToME7-mLJpywYxmGViz2-NM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/J4ZAToME7-mLJpywYxmGViz2-NM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/J4ZAToME7-mLJpywYxmGViz2-NM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/J4ZAToME7-mLJpywYxmGViz2-NM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/rFJG/~4/G4u1Kc3Pbrg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://mywpf-visu.blogspot.com/feeds/3246231670951345074/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4472331550180899195&amp;postID=3246231670951345074&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4472331550180899195/posts/default/3246231670951345074?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4472331550180899195/posts/default/3246231670951345074?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rFJG/~3/G4u1Kc3Pbrg/gadgets-mobile-apps-review-blog.html" title="Gadgets, mobile apps review blog" /><author><name>Vish</name><uri>http://www.blogger.com/profile/07190836461714792800</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="31" src="http://4.bp.blogspot.com/_TITDXqy9uuo/THjlPNydltI/AAAAAAAABT0/XwRWNuyh7aw/S220/New.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://mywpf-visu.blogspot.com/2011/04/gadgets-mobile-apps-review-blog.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ak8ERnY4fSp7ImA9Wx9TFE8.&quot;"><id>tag:blogger.com,1999:blog-4472331550180899195.post-5969060818320653025</id><published>2010-11-22T17:54:00.001+05:30</published><updated>2010-11-22T17:56:47.835+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-11-22T17:56:47.835+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="MVVM" /><title>MVVM Training - "In the Box" by Karl Shifflett</title><content type="html">&lt;div style="font-family: Verdana,sans-serif;"&gt;Something interesting has come up called "&lt;span id="goog_989163744"&gt;&lt;/span&gt;&lt;span id="goog_989163751"&gt;&lt;/span&gt;&lt;a href="http://visualstudiogallery.msdn.microsoft.com/en-us/3ab5f02f-0c54-453c-b437-8e8d57eb9942"&gt;In the Box&lt;/a&gt;&lt;span id="goog_989163745"&gt;&lt;/span&gt;&lt;span id="goog_989163747"&gt;&lt;/span&gt;&lt;span id="goog_989163748"&gt;&lt;/span&gt;&lt;span id="goog_989163752"&gt;&lt;/span&gt;". This i guess is an MVVM training package shared by guru Karl Shifflett. &lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;Reviews are really encouraging -&amp;nbsp;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;"Great MVVM training and one stop reference. Simple and well laid out. I hope there will be future installments."&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;"Yup, I'm a big fan. I installed this on the advice of @shanselman and I  could not be any more impressed by the layout and the attention to  detail."&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;"This is great! Where was this 5 weeks ago when I was learning this the  long hard way? When I say long and hard, that means performing searches  and reading every blog and framwork (How's ocean v3?) that I could find.  Having it all in one place is something that I was thinking of creating  myself, but you have done it even better. Thanks!&lt;br /&gt;
&lt;br /&gt;
What would be  an extra bonus if you could get extra content from Julie Lerman and  Steve Bohlen on some advanced Entity Framework ideas, the people from  Microsoft All-In-One Code Framework to add edge case scenarios (I've  sent requests for such) and Ward Bell from IdeaBlade for (big!) time  saving ideas in MVVM design and debugging."&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;I am gonna really dig deep into it and see what's there in store, and gonna share my learning...until then....ciao &lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;/div&gt;&lt;div style="font-family: Verdana,sans-serif;"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4472331550180899195-5969060818320653025?l=mywpf-visu.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Y1GQY-pWRHs-ii3_PJRXrnAneRM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Y1GQY-pWRHs-ii3_PJRXrnAneRM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Y1GQY-pWRHs-ii3_PJRXrnAneRM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Y1GQY-pWRHs-ii3_PJRXrnAneRM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/rFJG/~4/VhdIgMNlvto" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://mywpf-visu.blogspot.com/feeds/5969060818320653025/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4472331550180899195&amp;postID=5969060818320653025&amp;isPopup=true" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4472331550180899195/posts/default/5969060818320653025?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4472331550180899195/posts/default/5969060818320653025?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rFJG/~3/VhdIgMNlvto/mvvm-training-in-box-by-karl-shifflett.html" title="MVVM Training - &quot;In the Box&quot; by Karl Shifflett" /><author><name>Vish</name><uri>http://www.blogger.com/profile/07190836461714792800</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="31" src="http://4.bp.blogspot.com/_TITDXqy9uuo/THjlPNydltI/AAAAAAAABT0/XwRWNuyh7aw/S220/New.JPG" /></author><thr:total>1</thr:total><feedburner:origLink>http://mywpf-visu.blogspot.com/2010/11/mvvm-training-in-box-by-karl-shifflett.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0cFQXs_cSp7ImA9WxFUEU8.&quot;"><id>tag:blogger.com,1999:blog-4472331550180899195.post-5312941997646629981</id><published>2010-06-21T17:20:00.000+05:30</published><updated>2010-06-21T17:20:10.549+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-06-21T17:20:10.549+05:30</app:edited><title>Something off Topic</title><content type="html">I felt like sharing something which does not fit in here :)&lt;br /&gt;
&lt;br /&gt;
I have started writing about my cooking experiences available at &lt;a href="http://myrecipes-visu.blogspot.com/"&gt;Avec Ratatouille&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Happy Reading.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4472331550180899195-5312941997646629981?l=mywpf-visu.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/yA0S1dvrP0HGxOVcj84EntdTQw8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/yA0S1dvrP0HGxOVcj84EntdTQw8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/yA0S1dvrP0HGxOVcj84EntdTQw8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/yA0S1dvrP0HGxOVcj84EntdTQw8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/rFJG/~4/N5f0bjnWSw8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://mywpf-visu.blogspot.com/feeds/5312941997646629981/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4472331550180899195&amp;postID=5312941997646629981&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4472331550180899195/posts/default/5312941997646629981?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4472331550180899195/posts/default/5312941997646629981?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rFJG/~3/N5f0bjnWSw8/something-off-topic.html" title="Something off Topic" /><author><name>Vish</name><uri>http://www.blogger.com/profile/07190836461714792800</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="31" src="http://4.bp.blogspot.com/_TITDXqy9uuo/THjlPNydltI/AAAAAAAABT0/XwRWNuyh7aw/S220/New.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://mywpf-visu.blogspot.com/2010/06/something-off-topic.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEIGRXozfSp7ImA9WxFVEU0.&quot;"><id>tag:blogger.com,1999:blog-4472331550180899195.post-8618237964976692792</id><published>2010-06-09T17:48:00.015+05:30</published><updated>2010-06-09T22:25:24.485+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-06-09T22:25:24.485+05:30</app:edited><title>VS 2010 Cool Features - Generate from Usage</title><content type="html">&lt;div style="font-family: Verdana, sans-serif; text-align: justify;"&gt;Microsoft guys were giving a demo of VS 2010 Ultimate edition last week and being a participant i had expected some cool features which i thought would add value to the developer community. Surprisingly the demo was more inclined towards how it's going to be productive for a complete project life cycle, be it Agile or CMMi practice, even though the Microsoft guy was insisting that it is a great productivity tool for a developer, much more than how it used to be before. Frustrated with the demo ending with no major take aways for me i ended up asking the guy what real productivity benefits he is claiming? What kind of built in profiler it has got and do you claim it to be better than Dev Partner or an Ants Profiler? How is it going help me in getting rid of licensed tools like Resharper or Coderush by giving at least some basic features for code refactoring and all? He looked perplexed and asked me "Which tool? C Sharper?".&lt;/div&gt;&lt;div align="left" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div align="left" style="font-family: Verdana, sans-serif;"&gt;&lt;span id="main" style="visibility: visible;"&gt;&lt;span id="search" style="visibility: visible;"&gt;&lt;i&gt;Ignorance is bliss - but then was this ignorance a way of expressing we don't care or was that limited to him? I decided to do a research.&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="left" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div align="left" style="font-family: Verdana, sans-serif;"&gt;&lt;b&gt;Generate from Usage&lt;/b&gt; is what i stumbled upon at first.&lt;/div&gt;&lt;div align="left" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div align="left" style="font-family: Verdana, sans-serif;"&gt;So what's this feature all about?&lt;/div&gt;&lt;div align="left" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="font-family: Verdana, sans-serif; text-align: justify;"&gt;MSDN Definition: "The Generate From Usage feature enables you to use classes and members before you define them. You can generate a stub for any class, constructor, method, property, field, or enum that you want to use but have not yet defined. You can generate new types and members without leaving your current location in code. This minimizes interruption to your workflow."&lt;/div&gt;&lt;div align="justify" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="font-family: Verdana, sans-serif; text-align: justify;"&gt;This feature was not new to me as i had been using the same available in Resharper and Coderush. But it's better off now as i may not have to rely too much on these tools which were coming for a price and i had just been using their evaluation versions and once expired i was done for good. And you know how addictive these tools can become once you start using it on a regular basis.&lt;/div&gt;&lt;div style="font-family: Verdana, sans-serif; text-align: justify;"&gt;&lt;/div&gt;&lt;div style="font-family: Verdana, sans-serif; text-align: justify;"&gt;So let's look deep down into these features by creating a console application called MovieDatabase.&lt;/div&gt;&lt;div align="left" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div align="left" style="font-family: Verdana, sans-serif;"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_TITDXqy9uuo/TA95h5I4gFI/AAAAAAAABPw/Seq6kohtMrA/s1600/snap2.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="264" src="http://1.bp.blogspot.com/_TITDXqy9uuo/TA95h5I4gFI/AAAAAAAABPw/Seq6kohtMrA/s640/snap2.bmp" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div align="left" style="font-family: Verdana, sans-serif;"&gt;&lt;div style="text-align: justify;"&gt;So you can see that i have tried to&amp;nbsp;create an object of MovieDatabase which is non existent with properties MovieCollection, which is a collection of Movie objects, and YearRange. Both Movie and MovieYearRange are also non existent types. So the above piece of code typically fits in the TDD kind of approach.&lt;/div&gt;&lt;br /&gt;
Whatever type which is visible as&amp;nbsp;red are the ones which needs to be generated. So let's look at how Generate from Usage works here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div align="left" style="font-family: Verdana, sans-serif;"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_TITDXqy9uuo/TA98FTOyayI/AAAAAAAABP4/ns37nufG434/s1600/snap3.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="264" src="http://1.bp.blogspot.com/_TITDXqy9uuo/TA98FTOyayI/AAAAAAAABP4/ns37nufG434/s640/snap3.bmp" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="font-family: Verdana, sans-serif; text-align: justify;"&gt;When you do a mouse hover over the different Types which is shown in red above, a prompt will be shown under&amp;nbsp;it. Thing to understand here is that the prompt will only occur under the Type which is the parent type, in this case the MovieDatabase Type. The prompt will allow you to generate the particular type that you have tried to define and the Type generation is not random, as i had mentioned before, in the sense that IDE will not allow any Random child Type (eg: Movie) to be generated before Parent type is created. So once you click on Generate class for 'MovieDatabase', the class will be generated without generating the associated Types, Movie and MovieYearRange.&lt;/div&gt;&lt;div align="left" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div align="left" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div align="left" class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_TITDXqy9uuo/TA994CImw9I/AAAAAAAABQA/esg1u4oqJfU/s1600/snap4.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="252" src="http://4.bp.blogspot.com/_TITDXqy9uuo/TA994CImw9I/AAAAAAAABQA/esg1u4oqJfU/s640/snap4.bmp" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="font-family: Verdana, sans-serif; text-align: justify;"&gt;So you can see that the MovieDatabase type is in blue now indicating that the class generation has happened and the generated class will look like as shown below.&lt;/div&gt;&lt;div align="left" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div align="left" class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_TITDXqy9uuo/TA9-fOsc28I/AAAAAAAABQI/ZePYb7I1euE/s1600/snap5.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="189" src="http://2.bp.blogspot.com/_TITDXqy9uuo/TA9-fOsc28I/AAAAAAAABQI/ZePYb7I1euE/s320/snap5.bmp" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div align="left" style="font-family: Verdana, sans-serif;"&gt;Now we are left with generating the properties and rest of the classes.&lt;/div&gt;&lt;div align="left" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div align="left" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div align="left" class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_TITDXqy9uuo/TA9_GmBegiI/AAAAAAAABQQ/GuVo1W3FXIM/s1600/snap6.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="262" src="http://2.bp.blogspot.com/_TITDXqy9uuo/TA9_GmBegiI/AAAAAAAABQQ/GuVo1W3FXIM/s640/snap6.bmp" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="font-family: Verdana, sans-serif; text-align: justify;"&gt;Once MovieDatabase class got generated, the prompt will start coming over the properties. So once you click on Generate property stub, the corresponding properties will be generated in MovieDatabase class. &lt;/div&gt;&lt;div align="left" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div align="left" class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_TITDXqy9uuo/TA-AA5NDrBI/AAAAAAAABQY/o2AbkKcXecg/s1600/snap7.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="262" src="http://4.bp.blogspot.com/_TITDXqy9uuo/TA-AA5NDrBI/AAAAAAAABQY/o2AbkKcXecg/s640/snap7.bmp" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div align="left" class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_TITDXqy9uuo/TA-BafamYxI/AAAAAAAABQg/_KsTmOXrRiY/s1600/snap8.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="248" src="http://1.bp.blogspot.com/_TITDXqy9uuo/TA-BafamYxI/AAAAAAAABQg/_KsTmOXrRiY/s640/snap8.bmp" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div align="left" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div align="left" class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_TITDXqy9uuo/TA-Blgfi3dI/AAAAAAAABQo/MfurcEhnfaU/s1600/snap9.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="252" src="http://2.bp.blogspot.com/_TITDXqy9uuo/TA-Blgfi3dI/AAAAAAAABQo/MfurcEhnfaU/s640/snap9.bmp" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div align="left" class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_TITDXqy9uuo/TA-BzCzjL3I/AAAAAAAABQw/twqohq7tqW4/s1600/snap10.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="212" src="http://1.bp.blogspot.com/_TITDXqy9uuo/TA-BzCzjL3I/AAAAAAAABQw/twqohq7tqW4/s640/snap10.bmp" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div align="left" class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_TITDXqy9uuo/TA-B8GIhUeI/AAAAAAAABQ4/AIie06qYmmk/s1600/snap11.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="188" src="http://3.bp.blogspot.com/_TITDXqy9uuo/TA-B8GIhUeI/AAAAAAAABQ4/AIie06qYmmk/s640/snap11.bmp" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div align="left" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="font-family: Verdana, sans-serif; text-align: justify;"&gt;Once you are done generating all the classed and properties, the generated classes will contain the associated types like shown in the below snapshots.&lt;/div&gt;&lt;div align="left" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div align="left" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div align="left" class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_TITDXqy9uuo/TA-CEavGJFI/AAAAAAAABRA/XOakdey8fwY/s1600/snap12.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="170" src="http://1.bp.blogspot.com/_TITDXqy9uuo/TA-CEavGJFI/AAAAAAAABRA/XOakdey8fwY/s320/snap12.bmp" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div align="left" class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;div align="left" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div align="left" class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_TITDXqy9uuo/TA-COLYfWmI/AAAAAAAABRI/uKoSRxvFKt8/s1600/snap13.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="172" src="http://1.bp.blogspot.com/_TITDXqy9uuo/TA-COLYfWmI/AAAAAAAABRI/uKoSRxvFKt8/s320/snap13.bmp" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div align="left" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div align="left" style="font-family: Verdana, sans-serif;"&gt;Now you can see that the MovieDatabase class has all the associated properties which i had defined earlier (MovieCollection and YearRange properties).&lt;/div&gt;&lt;div align="left" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div align="left" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div align="left" class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_TITDXqy9uuo/TA-CXRR4XAI/AAAAAAAABRQ/n35oHu6vBwA/s1600/snap14.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="192" src="http://3.bp.blogspot.com/_TITDXqy9uuo/TA-CXRR4XAI/AAAAAAAABRQ/n35oHu6vBwA/s640/snap14.bmp" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div align="left" class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span style="font-family: Verdana, sans-serif;"&gt;You see all in blue&amp;nbsp;meaning&amp;nbsp;good to go.&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;div align="left" class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_TITDXqy9uuo/TA-Cj6i0eGI/AAAAAAAABRY/5RQNaeappas/s1600/snap15.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="254" src="http://1.bp.blogspot.com/_TITDXqy9uuo/TA-Cj6i0eGI/AAAAAAAABRY/5RQNaeappas/s640/snap15.bmp" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div align="justify" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="font-family: Verdana, sans-serif; text-align: justify;"&gt;This is a cool feature which used to exist even in the older versions of the IDE, but now it has been enhanced to closely but not completely match with the different third party tools which i had mentioned before. Anyways I'm not going to get disappointed anymore once those refactoring tools expire, as i have something to have a feel of the same for some time until a new evaluation version of the tool is released. Point that i'm trying to make is Visual Studio IDE needs to look beyond than just copying the good features of the tools that's available. But when has Microsoft really Innovated?!!!&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4472331550180899195-8618237964976692792?l=mywpf-visu.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/FFIUtcwHWwvsNVrmLEtEELMu7KA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/FFIUtcwHWwvsNVrmLEtEELMu7KA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/FFIUtcwHWwvsNVrmLEtEELMu7KA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/FFIUtcwHWwvsNVrmLEtEELMu7KA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/rFJG/~4/kJkDu2Manwg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://mywpf-visu.blogspot.com/feeds/8618237964976692792/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4472331550180899195&amp;postID=8618237964976692792&amp;isPopup=true" title="5 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4472331550180899195/posts/default/8618237964976692792?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4472331550180899195/posts/default/8618237964976692792?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rFJG/~3/kJkDu2Manwg/vs-2010-cool-features-generate-from.html" title="VS 2010 Cool Features - Generate from Usage" /><author><name>Vish</name><uri>http://www.blogger.com/profile/07190836461714792800</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="31" src="http://4.bp.blogspot.com/_TITDXqy9uuo/THjlPNydltI/AAAAAAAABT0/XwRWNuyh7aw/S220/New.JPG" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_TITDXqy9uuo/TA95h5I4gFI/AAAAAAAABPw/Seq6kohtMrA/s72-c/snap2.bmp" height="72" width="72" /><thr:total>5</thr:total><feedburner:origLink>http://mywpf-visu.blogspot.com/2010/06/vs-2010-cool-features-generate-from.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkQGRXsyeyp7ImA9WxFWE0w.&quot;"><id>tag:blogger.com,1999:blog-4472331550180899195.post-7763283739258857644</id><published>2010-05-31T18:17:00.004+05:30</published><updated>2010-05-31T18:22:04.593+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-05-31T18:22:04.593+05:30</app:edited><title>Cool features of VS 2010 - Part 1</title><content type="html">This week i had the chance to evaluate the new version of .Net IDE, Visual Studio 2010, and as usual my expectation was more inclined towards the look and feel aspect that Microsoft normally incorporates. But surprisingly i came across one cool feature something mainly related to the Watch window, which in the past editors i felt were really irritating. So what i'm really talking is in terms with the debugging options improvement that has happened with the new IDE.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://2.bp.blogspot.com/_TITDXqy9uuo/TAOrgDG4FCI/AAAAAAAABPA/rlYClVdbFPQ/s1600/snap1.bmp" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="214" src="http://2.bp.blogspot.com/_TITDXqy9uuo/TAOrgDG4FCI/AAAAAAAABPA/rlYClVdbFPQ/s640/snap1.bmp" width="640" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is how a normal debug view in VS 2008 as well as in 2010 will look like.&lt;br /&gt;
&lt;br /&gt;
Now let's see what the improvement is and i guess you guys will appreciate it as soon as you see it. Let's checkout some snapshots.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_TITDXqy9uuo/TAOuByE0UsI/AAAAAAAABPg/MX6NOyFvcoc/s1600/snap2.bmp" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="214" src="http://1.bp.blogspot.com/_TITDXqy9uuo/TAOuByE0UsI/AAAAAAAABPg/MX6NOyFvcoc/s640/snap2.bmp" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;br /&gt;
Above snap shows you that the intellisense tip showing the value of the  field at the current iteration is pinned to the location (using the pin  and unpin options available).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_TITDXqy9uuo/TAOvBUkQTuI/AAAAAAAABPo/X0QfSRzsCnI/s1600/snap3.bmp" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="214" src="http://3.bp.blogspot.com/_TITDXqy9uuo/TAOvBUkQTuI/AAAAAAAABPo/X0QfSRzsCnI/s640/snap3.bmp" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now with the above snap it may be evident for you that the  intellisense  tip is still available showing the current iterated value  of the variable being used.&lt;br /&gt;
&lt;br /&gt;
So this is the improvement  i'm talking about. You don't need a Watch window taking up all the  available editor space and bugging you. Instead you can go for this cool  option of pinning your variable to be watched for. There is one more  improvement related to debugging also clubbed with the above one which  will follow in my coming blogs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href="file:///C:/Documents%20and%20Settings/e410294/My%20Documents/My%20Pictures/snap1.bmp"&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href="file:///C:/Documents%20and%20Settings/e410294/My%20Documents/My%20Pictures/snap1.bmp"&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4472331550180899195-7763283739258857644?l=mywpf-visu.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/WTFSr4L4IdW52bMsr2EE3_njP2c/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/WTFSr4L4IdW52bMsr2EE3_njP2c/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/WTFSr4L4IdW52bMsr2EE3_njP2c/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/WTFSr4L4IdW52bMsr2EE3_njP2c/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/rFJG/~4/oOqTVeoJ_0E" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://mywpf-visu.blogspot.com/feeds/7763283739258857644/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4472331550180899195&amp;postID=7763283739258857644&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4472331550180899195/posts/default/7763283739258857644?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4472331550180899195/posts/default/7763283739258857644?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rFJG/~3/oOqTVeoJ_0E/cool-features-of-vs-2010-part-1.html" title="Cool features of VS 2010 - Part 1" /><author><name>Vish</name><uri>http://www.blogger.com/profile/07190836461714792800</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="31" src="http://4.bp.blogspot.com/_TITDXqy9uuo/THjlPNydltI/AAAAAAAABT0/XwRWNuyh7aw/S220/New.JPG" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_TITDXqy9uuo/TAOrgDG4FCI/AAAAAAAABPA/rlYClVdbFPQ/s72-c/snap1.bmp" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://mywpf-visu.blogspot.com/2010/05/cool-features-of-vs-2010-part-1.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CU8ARHw5fCp7ImA9WxNaGUk.&quot;"><id>tag:blogger.com,1999:blog-4472331550180899195.post-7804814046250005656</id><published>2009-12-04T13:10:00.007+05:30</published><updated>2009-12-04T21:54:05.224+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-04T21:54:05.224+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="MVVM" /><title>Relay Command - How to Pass a Parameter?</title><content type="html">&lt;div style="text-align: justify;"&gt;Ever wondered what the param in RelayCommad does? May sound silly though but can't find many samples explaining the same.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Before that, if you are not aware what a Relay Command in MVVM is, you may have to check out what MVVM foundation is all about. Relay Command is actually a commanding manager kinda stuff available with MVVM Foundation (search for the same in codeplex, you will come to know if you don't know) which could reduce the redundancy of the number of commands that may get created in a ViewModel's perspective.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;A Relay Command implementation in general will look like&lt;br /&gt;&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;RelayCommand _openCommand&lt;br /&gt;public ICommand OpenCommand&lt;br /&gt;{&lt;br /&gt;get&lt;br /&gt;{&lt;br /&gt; if (_openCommand == null)&lt;br /&gt; {&lt;br /&gt;     _openCommand = new RelayCommand(param =&gt; this.Open,&lt;br /&gt;         param =&gt; this.CanOpen );&lt;br /&gt; }&lt;br /&gt; return _openCommand;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;So what's the param doing there?&lt;br /&gt;&lt;br /&gt;I initially thought it's just for the sake of the Lambda construct that we are having to write it. But then when i really came across instances where i had to pass a parameter to an Action or a Predicate, i knew param had something to say.&lt;br /&gt;&lt;br /&gt;Let's say i have a situation where in need to pass a parameter to the &lt;span style="font-weight: bold;"&gt;Open&lt;/span&gt; Action as well as to the &lt;span style="font-weight: bold;"&gt;CanOpen&lt;/span&gt; Predicate.&lt;br /&gt;&lt;span style="font-family:monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;RelayCommand _openCommand&lt;br /&gt;public ICommand OpenCommand&lt;br /&gt;{&lt;br /&gt;get&lt;br /&gt;{&lt;br /&gt;  if (_openCommand == null)&lt;br /&gt;  {&lt;br /&gt;      _openCommand = new RelayCommand(param =&gt; this.Open((string)param),&lt;br /&gt;          param =&gt; this.CanOpen((string)param) );&lt;br /&gt;  }&lt;br /&gt;  return _openCommand;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-family:monospace;"&gt;&lt;/span&gt;One of the ways of doing it would be to add a property (CommandParameter or something) in your ViewModel which you can bind with your controls CommandParameter.&lt;span style="font-family:monospace;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;public object CommandParameter { get; set; }&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;To make it more clear, let's think about an implementation where i need to open a file by passing the file path as the parameter. So the CanOpen predicate will function something like if i don't find the file to be opened in the defined path, i won't allow the OpenCommand to execute.&lt;br /&gt;So in my code the implementation will look something like,&lt;br /&gt;&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;viewModel.CommandParameter = strFilePath;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Xaml Binding will have the Command and CommandParameter part related to whatever control we are binding to and the predicate will look something like.&lt;br /&gt;&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;public bool CanOpen(string strFilePath)&lt;br /&gt;{&lt;br /&gt; //if i can't find the file, i should not try to open it.&lt;br /&gt; return File.Exists(strFilePath);&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;and similarly the Action  part implementation&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;public void Open(string strFilePath)&lt;br /&gt;{&lt;br /&gt;  //Open the file and i do whatever i want to do....&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;pretty neat in an environment where the path may be read dynamically from somewhere.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4472331550180899195-7804814046250005656?l=mywpf-visu.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/r3TEPpy34vFWA7EF7GHCRZJUGHg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/r3TEPpy34vFWA7EF7GHCRZJUGHg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/r3TEPpy34vFWA7EF7GHCRZJUGHg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/r3TEPpy34vFWA7EF7GHCRZJUGHg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/rFJG/~4/XjfbxjZakZg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://mywpf-visu.blogspot.com/feeds/7804814046250005656/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4472331550180899195&amp;postID=7804814046250005656&amp;isPopup=true" title="12 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4472331550180899195/posts/default/7804814046250005656?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4472331550180899195/posts/default/7804814046250005656?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rFJG/~3/XjfbxjZakZg/relay-command-how-to-pass-parameter.html" title="Relay Command - How to Pass a Parameter?" /><author><name>Vish</name><uri>http://www.blogger.com/profile/07190836461714792800</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="31" src="http://4.bp.blogspot.com/_TITDXqy9uuo/THjlPNydltI/AAAAAAAABT0/XwRWNuyh7aw/S220/New.JPG" /></author><thr:total>12</thr:total><feedburner:origLink>http://mywpf-visu.blogspot.com/2009/12/relay-command-how-to-pass-parameter.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D08NSXk_fCp7ImA9WxNaFkg.&quot;"><id>tag:blogger.com,1999:blog-4472331550180899195.post-8186381518429842181</id><published>2009-12-01T13:51:00.002+05:30</published><updated>2009-12-01T13:54:58.744+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-01T13:54:58.744+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="WPF and Silverlight" /><title>WPF Apps....Click Once Deploy...</title><content type="html">Check out this &lt;a href="http://www.vertigo.com/lab.aspx"&gt;Vertigo&lt;/a&gt; site where you will get a wealth of WPF and Silverlight samples.&lt;br /&gt;&lt;br /&gt;I found the &lt;a href="http://www.vertigo.com/familyshow.aspx"&gt;Family Show&lt;/a&gt; sample really interesting with some really good animation....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4472331550180899195-8186381518429842181?l=mywpf-visu.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/L9MXD96U9YP58349tXswQK5snL8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/L9MXD96U9YP58349tXswQK5snL8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/L9MXD96U9YP58349tXswQK5snL8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/L9MXD96U9YP58349tXswQK5snL8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/rFJG/~4/Zu1y3EdVh8M" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://mywpf-visu.blogspot.com/feeds/8186381518429842181/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4472331550180899195&amp;postID=8186381518429842181&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4472331550180899195/posts/default/8186381518429842181?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4472331550180899195/posts/default/8186381518429842181?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rFJG/~3/Zu1y3EdVh8M/wpf-appsclick-once-deploy.html" title="WPF Apps....Click Once Deploy..." /><author><name>Vish</name><uri>http://www.blogger.com/profile/07190836461714792800</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="31" src="http://4.bp.blogspot.com/_TITDXqy9uuo/THjlPNydltI/AAAAAAAABT0/XwRWNuyh7aw/S220/New.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://mywpf-visu.blogspot.com/2009/12/wpf-appsclick-once-deploy.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkEERH07cCp7ImA9WxNQEkQ.&quot;"><id>tag:blogger.com,1999:blog-4472331550180899195.post-1031797478302077900</id><published>2009-09-18T22:35:00.001+05:30</published><updated>2009-09-18T22:53:25.308+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-09-18T22:53:25.308+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="MVVM" /><title>Data Driven Display - Dynamic Loading</title><content type="html">&lt;div style="text-align: justify;"&gt;WPF comes with a clean approach when it comes to loading user controls dynamically. A Windows Application developer always had the vision for a "Data driven Model" where the data can decide what it needs to display to the user but he never had the platform to deliver it. With the advent of WPF, he can actually make the data render the User Interface the way it needs it to be like. This is happening because of one magic called &lt;span style="font-weight: bold;"&gt;DataTemplate&lt;/span&gt; whose use we have already seen in my earlier posts in TreeView implementation etc.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Let me explain it to you a little bit in more detail.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Suppose we have defined a Base Type called Animal and we inherit the Type to define a Cat, a Dog and a Man. Now i add all these Animal objects created to a ListView and i want the corresponding types added to the ListView to display the objects as Images of itself. So what we should do is to define the DataTemplate as show below.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&amp;lt;DataTemplate DataType={x:Type Cat}&amp;gt;&lt;br /&gt;&amp;lt;Image Source=CatImage.jpg/&amp;gt;&lt;br /&gt;&amp;lt;/DataTemplate&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;DataTemplate DataType={x:Type Dog}&amp;gt;&lt;br /&gt;&amp;lt;Image Source=DogImage.jpg/&amp;gt;&lt;br /&gt;&amp;lt;/DataTemplate&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;DataTemplate DataType={x:Type Man}&amp;gt;&lt;br /&gt;&amp;lt;Image Source=ManImage.jpg/&amp;gt;&lt;br /&gt;&amp;lt;/DataTemplate&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;The above piece of code is just a pointer as to what needs to be done to make the implementation work like data driven.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4472331550180899195-1031797478302077900?l=mywpf-visu.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/r0VImvCmYOkY2ZvKh1JMBi-DUL0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/r0VImvCmYOkY2ZvKh1JMBi-DUL0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/r0VImvCmYOkY2ZvKh1JMBi-DUL0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/r0VImvCmYOkY2ZvKh1JMBi-DUL0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/rFJG/~4/kiQOWC7LPiE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://mywpf-visu.blogspot.com/feeds/1031797478302077900/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4472331550180899195&amp;postID=1031797478302077900&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4472331550180899195/posts/default/1031797478302077900?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4472331550180899195/posts/default/1031797478302077900?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rFJG/~3/kiQOWC7LPiE/dynamic-user-control-display-using-data.html" title="Data Driven Display - Dynamic Loading" /><author><name>Vish</name><uri>http://www.blogger.com/profile/07190836461714792800</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="31" src="http://4.bp.blogspot.com/_TITDXqy9uuo/THjlPNydltI/AAAAAAAABT0/XwRWNuyh7aw/S220/New.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://mywpf-visu.blogspot.com/2009/09/dynamic-user-control-display-using-data.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0cNSH8-fCp7ImA9WxJaEkQ.&quot;"><id>tag:blogger.com,1999:blog-4472331550180899195.post-659490673376362198</id><published>2009-08-03T15:45:00.002+05:30</published><updated>2009-08-03T15:54:59.154+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-08-03T15:54:59.154+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Poll" /><title>Wpf is not Killing Winforms</title><content type="html">&lt;div style="text-align: justify;"&gt;The outcome of a poll that happened in my blog site which asked the readers "Is Wpf gonna kill Winforms?" is a clear and unanimous "NO". That's good news for Winforms enthusiasts.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4472331550180899195-659490673376362198?l=mywpf-visu.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/QWKDfk_f8yNJHHQgTp4B5TPviBc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/QWKDfk_f8yNJHHQgTp4B5TPviBc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/QWKDfk_f8yNJHHQgTp4B5TPviBc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/QWKDfk_f8yNJHHQgTp4B5TPviBc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/rFJG/~4/U5iCwakdTtc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://mywpf-visu.blogspot.com/feeds/659490673376362198/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4472331550180899195&amp;postID=659490673376362198&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4472331550180899195/posts/default/659490673376362198?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4472331550180899195/posts/default/659490673376362198?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rFJG/~3/U5iCwakdTtc/wpf-is-not-killing-winforms.html" title="Wpf is not Killing Winforms" /><author><name>Vish</name><uri>http://www.blogger.com/profile/07190836461714792800</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="31" src="http://4.bp.blogspot.com/_TITDXqy9uuo/THjlPNydltI/AAAAAAAABT0/XwRWNuyh7aw/S220/New.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://mywpf-visu.blogspot.com/2009/08/wpf-is-not-killing-winforms.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0ABRH49eCp7ImA9WxNTGEs.&quot;"><id>tag:blogger.com,1999:blog-4472331550180899195.post-8449019259067111904</id><published>2009-07-30T13:56:00.018+05:30</published><updated>2009-08-21T21:19:15.060+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-08-21T21:19:15.060+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Tools" /><title>Resharper - Tool is cool</title><content type="html">&lt;h3&gt;&lt;span&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 102, 0);"&gt;&lt;span class="Apple-style-span" style="text-decoration: underline;"&gt;What is Resharper?&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;Tools makes your life easier. It makes you stand apart from the rest of the crowd in the way you do your daily chore. That's what i feel. Resharper is such a tool (an addin for Visual Studio 2005/2008) which does things in a different way. It's available for evaluation (for 30 days) if you want to really test it out. &lt;div&gt;&lt;h3&gt;&lt;span class="Apple-style-span" style="color: rgb(255, 102, 0);"&gt;&lt;span class="Apple-style-span" style="text-decoration: underline;"&gt;What it does&lt;/span&gt;?&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;&lt;div style="text-align: justify;"&gt;As i told before it does things in a different way, in a smarter way. I mean it suggests you to do things better, the way you code. If i write a piece of C# code, it will prompt me to format the code in such a way that it gets optimized. So with this tool i need not bother about the way i'm writing the code, but just i need to concentrate on the logic and later with the suggested fixes applied, the code will look smarter.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Let me just show you some snapshots which will help you understand what i meant.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;The snapshot  below shows how resharper will prompt you to remove unused namespace directives from your code to make it more cleaner. So by just clicking on the red bulb prompt you can easily remove unused namespaces.&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;                                                 &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_TITDXqy9uuo/SopRhy91IEI/AAAAAAAAAUk/IIsaTuwcdcA/s1600-h/Unused.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 168px;" src="http://1.bp.blogspot.com/_TITDXqy9uuo/SopRhy91IEI/AAAAAAAAAUk/IIsaTuwcdcA/s400/Unused.JPG" alt="" id="BLOGGER_PHOTO_ID_5371195146651377730" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Now let's look at some other features.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_TITDXqy9uuo/SopS1u3cwmI/AAAAAAAAAUs/rkFRUnNNims/s1600-h/objectInit.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 212px;" src="http://3.bp.blogspot.com/_TITDXqy9uuo/SopS1u3cwmI/AAAAAAAAAUs/rkFRUnNNims/s400/objectInit.JPG" alt="" id="BLOGGER_PHOTO_ID_5371196588659884642" border="0" /&gt;&lt;/a&gt;&lt;div style="text-align: justify;"&gt;In the above picture, you can see how resharper is asking us to use the new feature of C# 3.0 which is called Object Initialization using which you can initialize class properties at the construction level itself. So on applying the change it screen will look as shown below.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_TITDXqy9uuo/SopUGYuOwHI/AAAAAAAAAU0/OZ7iSOhjTD4/s1600-h/ObjInitApplied.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 109px;" src="http://4.bp.blogspot.com/_TITDXqy9uuo/SopUGYuOwHI/AAAAAAAAAU0/OZ7iSOhjTD4/s400/ObjInitApplied.JPG" alt="" id="BLOGGER_PHOTO_ID_5371197974285041778" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;So now you can see the difference where the Header property has moved  beside the construction part of the CarViewModel object.&lt;br /&gt;&lt;br /&gt;I would like to wrap it up with two features which i'm really fond of which is renaming a file and moving a file from one namespace to another.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_TITDXqy9uuo/SopWiDVfSEI/AAAAAAAAAU8/i75bpejNc3o/s1600-h/MoveFile.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 209px;" src="http://4.bp.blogspot.com/_TITDXqy9uuo/SopWiDVfSEI/AAAAAAAAAU8/i75bpejNc3o/s400/MoveFile.JPG" alt="" id="BLOGGER_PHOTO_ID_5371200648603715650" border="0" /&gt;&lt;/a&gt;The above snapshot shows an instance where i had moved a class to a different namespace (From MenuViewModel namespace to MenuItemViewModelSample namespace). So once moved, resharper will prompt me to change the namespace of my class, in this case to MenuItemViewModelSample namespace.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_TITDXqy9uuo/SopZXiOQ-zI/AAAAAAAAAVE/SzZ_GQ5GWgY/s1600-h/RenameFile.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 220px;" src="http://3.bp.blogspot.com/_TITDXqy9uuo/SopZXiOQ-zI/AAAAAAAAAVE/SzZ_GQ5GWgY/s400/RenameFile.JPG" alt="" id="BLOGGER_PHOTO_ID_5371203766451239730" border="0" /&gt;&lt;/a&gt;Above case shows how reshaper will prompt you to rename a File to match the type name or the class name which you have modified. This is a cool feature because you don't need to go and rename the file whenever you are renaming your class and this prompt will remain as long as you don't apply the rename option given by resharper.&lt;br /&gt;&lt;br /&gt;to be continued......&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4472331550180899195-8449019259067111904?l=mywpf-visu.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/J3MBlVvIy5EDtstkZqir3r7OwSE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/J3MBlVvIy5EDtstkZqir3r7OwSE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/J3MBlVvIy5EDtstkZqir3r7OwSE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/J3MBlVvIy5EDtstkZqir3r7OwSE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/rFJG/~4/CN83wIbd9G8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://mywpf-visu.blogspot.com/feeds/8449019259067111904/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4472331550180899195&amp;postID=8449019259067111904&amp;isPopup=true" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4472331550180899195/posts/default/8449019259067111904?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4472331550180899195/posts/default/8449019259067111904?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rFJG/~3/CN83wIbd9G8/resharper-tool-is-cool.html" title="Resharper - Tool is cool" /><author><name>Vish</name><uri>http://www.blogger.com/profile/07190836461714792800</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="31" src="http://4.bp.blogspot.com/_TITDXqy9uuo/THjlPNydltI/AAAAAAAABT0/XwRWNuyh7aw/S220/New.JPG" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_TITDXqy9uuo/SopRhy91IEI/AAAAAAAAAUk/IIsaTuwcdcA/s72-c/Unused.JPG" height="72" width="72" /><thr:total>2</thr:total><feedburner:origLink>http://mywpf-visu.blogspot.com/2009/07/resharper-tool-is-cool.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DU8MQn44fSp7ImA9WxJaFU4.&quot;"><id>tag:blogger.com,1999:blog-4472331550180899195.post-88845937436377351</id><published>2009-07-24T14:53:00.016+05:30</published><updated>2009-08-06T11:21:23.035+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-08-06T11:21:23.035+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Model View ViewModel" /><title>Filter a TreeView at Multiple Levels using ICollectionView</title><content type="html">&lt;h3 style="COLOR: rgb(255,102,0); FONT-FAMILY: verdana"&gt;Background:&lt;/h3&gt;&lt;div style="TEXT-ALIGN: justify"&gt;This article is an extension to an article by &lt;a href="http://bea.stollnitz.com/blog/?p=31"&gt;Bea&lt;/a&gt; which talks about Filtering a collection using ICollectionView interface. This interface gives you the flexibility to Filter a collection even without touching the contents of the data source. This is a great feature when we think in terms of M-V-VM (separation of concern to be precise).&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="COLOR: rgb(255,102,0);font-size:130%;" &gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span style="FONT-WEIGHT: bold"&gt;The ICollectionView Interface:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div style="TEXT-ALIGN: justify"&gt;&lt;b&gt;ICollectionView&lt;/b&gt; interface is coming from the &lt;b&gt;System.ComponentModel&lt;/b&gt; namespace of Dotnet 3.5 framework. It enables in a Collection current record management (gives a feel of Currency Manager in Framework 2), Sorting, Filtering, Grouping etc.&lt;/div&gt;&lt;br /&gt;&lt;pre style="BORDER-RIGHT: rgb(153,153,153) 1px dashed; PADDING-RIGHT: 5px; BORDER-TOP: rgb(153,153,153) 1px dashed; PADDING-LEFT: 5px; FONT-SIZE: 12px; PADDING-BOTTOM: 5px; OVERFLOW: auto; BORDER-LEFT: rgb(153,153,153) 1px dashed; WIDTH: 100%; COLOR: rgb(0,0,0); LINE-HEIGHT: 14px; PADDING-TOP: 5px; BORDER-BOTTOM: rgb(153,153,153) 1px dashed; FONT-FAMILY: Andale Mono,Lucida Console,Monaco,fixed,monospace; BACKGROUND-COLOR: rgb(238,238,238)"&gt;&lt;code&gt;public interface ICollectionView : IEnumerable, INotifyCollectionChanged&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 style="FONT-WEIGHT: bold;font-family:verdana;" &gt;&lt;span class="Apple-style-span" style="COLOR: rgb(255,102,0);font-size:130%;" &gt;&lt;span class="Apple-style-span"&gt;How to use:&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;Let me explain it using a sample application whose screen shot looks as shown below. &lt;h2 style="TEXT-ALIGN: justify"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_TITDXqy9uuo/SnNf4GBR_fI/AAAAAAAAATk/ze0W3ZCBqBM/s1600-h/SampleFilterPic1.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5364736998421691890" style="FLOAT: left; MARGIN: 0pt 10px 10px 0pt; WIDTH: 400px; CURSOR: pointer; HEIGHT: 300px" alt="" src="http://3.bp.blogspot.com/_TITDXqy9uuo/SnNf4GBR_fI/AAAAAAAAATk/ze0W3ZCBqBM/s400/SampleFilterPic1.jpg" border="0" /&gt;&lt;/a&gt;&lt;/h2&gt;&lt;div style="TEXT-ALIGN: justify"&gt;The application loads the Data present in an xml in a TreeView. On Selecting any item in the TreeView the items details are displayed on the right side.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="TEXT-ALIGN: justify"&gt;As far as filtering is concerned, there are three Radio buttons available in the application, which will control items to be shown on the TreeView based on the option selected. So if Radio option "All Transmission" is selected, then the application will not filter any of the items available in the TreeView. If the other two options are selected (Manual Transmission and Automatic Transmission), then the filtering will happen correspondingly.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Let's see the piece of code which will enable Filtering in all the three cases.&lt;br /&gt;&lt;br /&gt;&lt;div style="TEXT-ALIGN: justify"&gt;The ViewModel structuring is like there's a LauncherViewModel which will instantiate all the other ViewModels along with their children items.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="TEXT-ALIGN: justify"&gt;We need to have three properties in the LauncherViewModel - IsAllTransmission, IsAutomaticTransmission and IsManualTransmission. There three Properties are bound to the IsChecked property of the Radio button.&lt;br /&gt;&lt;/div&gt;&lt;pre style="BORDER-RIGHT: rgb(153,153,153) 1px dashed; PADDING-RIGHT: 5px; BORDER-TOP: rgb(153,153,153) 1px dashed; PADDING-LEFT: 5px; FONT-SIZE: 12px; PADDING-BOTTOM: 5px; OVERFLOW: auto; BORDER-LEFT: rgb(153,153,153) 1px dashed; WIDTH: 100%; COLOR: rgb(0,0,0); LINE-HEIGHT: 14px; PADDING-TOP: 5px; BORDER-BOTTOM: rgb(153,153,153) 1px dashed; FONT-FAMILY: Andale Mono,Lucida Console,Monaco,fixed,monospace; BACKGROUND-COLOR: rgb(238,238,238)"&gt;&lt;code&gt;IsChecked="{Binding Path=IsAllTransmission, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"&lt;br /&gt;IsChecked="{Binding Path=IsAutoTransmission, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"&lt;br /&gt;IsChecked="{Binding Path=IsManualTransmission, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;The three filtering implementations will look something like:&lt;br /&gt;&lt;pre style="BORDER-RIGHT: rgb(153,153,153) 1px dashed; PADDING-RIGHT: 5px; BORDER-TOP: rgb(153,153,153) 1px dashed; PADDING-LEFT: 5px; FONT-SIZE: 12px; PADDING-BOTTOM: 5px; OVERFLOW: auto; BORDER-LEFT: rgb(153,153,153) 1px dashed; WIDTH: 100%; COLOR: rgb(0,0,0); LINE-HEIGHT: 14px; PADDING-TOP: 5px; BORDER-BOTTOM: rgb(153,153,153) 1px dashed; FONT-FAMILY: Andale Mono,Lucida Console,Monaco,fixed,monospace; BACKGROUND-COLOR: rgb(238,238,238)"&gt;&lt;code&gt;private bool isAllTransmission;&lt;br /&gt;public bool IsAllTransmission&lt;br /&gt;{&lt;br /&gt;   get { return isAllTransmission; }&lt;br /&gt;   set&lt;br /&gt;   {&lt;br /&gt;       isAllTransmission = value;&lt;br /&gt;       isAutoTransmission = !value;&lt;br /&gt;       isManualTransmission = !value;&lt;br /&gt;&lt;br /&gt;       ICollectionView carsDataSourceView =&lt;br /&gt;           CollectionViewSource.GetDefaultView(CarsCollection[0].ChildMenuItems);&lt;br /&gt;&lt;br /&gt;       carsDataSourceView.Filter = (carViewModel =&amp;gt;&lt;br /&gt;       {&lt;br /&gt;           ICollectionView carDataSourceView =&lt;br /&gt;               CollectionViewSource.GetDefaultView(&lt;br /&gt;                   ((CarViewModel)carViewModel).ChildMenuItems);&lt;br /&gt;&lt;br /&gt;           carDataSourceView.Filter =&lt;br /&gt;               (modelViewModel =&amp;gt; true);&lt;br /&gt;&lt;br /&gt;           return !carDataSourceView.IsEmpty;&lt;br /&gt;       });&lt;br /&gt;&lt;br /&gt;       NotifyOnPropertyChanged("isAllTransmission");&lt;br /&gt;       NotifyOnPropertyChanged("IsManualTransmission");&lt;br /&gt;       NotifyOnPropertyChanged("isAutoTransmission");&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;In the above case, as the filter is no filtering happening ("IsAllTransmission"), the Filter should return "true" in any case. That's the reason the Predicate to the Filter is returing true (modelViewModel =&gt; true).&lt;/p&gt;&lt;pre style="BORDER-RIGHT: rgb(153,153,153) 1px dashed; PADDING-RIGHT: 5px; BORDER-TOP: rgb(153,153,153) 1px dashed; PADDING-LEFT: 5px; FONT-SIZE: 12px; PADDING-BOTTOM: 5px; OVERFLOW: auto; BORDER-LEFT: rgb(153,153,153) 1px dashed; WIDTH: 100%; COLOR: rgb(0,0,0); LINE-HEIGHT: 14px; PADDING-TOP: 5px; BORDER-BOTTOM: rgb(153,153,153) 1px dashed; FONT-FAMILY: Andale Mono,Lucida Console,Monaco,fixed,monospace; BACKGROUND-COLOR: rgb(238,238,238)"&gt;&lt;code&gt;private bool isAutoTransmission;&lt;br /&gt;public bool IsAutoTransmission&lt;br /&gt;{&lt;br /&gt;    get { return isAutoTransmission; }&lt;br /&gt;    set&lt;br /&gt;    {&lt;br /&gt;        isAutoTransmission = value;&lt;br /&gt;        isManualTransmission = !value;&lt;br /&gt;        isAllTransmission = !value;&lt;br /&gt;&lt;br /&gt;        ICollectionView carsDataSourceView =&lt;br /&gt;            CollectionViewSource.GetDefaultView(CarsCollection[0].ChildMenuItems);&lt;br /&gt;&lt;br /&gt;        carsDataSourceView.Filter = (carViewModel =&amp;gt;&lt;br /&gt;                                         {&lt;br /&gt;                                             ICollectionView carDataSourceView =&lt;br /&gt;                                                 CollectionViewSource.GetDefaultView(&lt;br /&gt;                                                     ((CarViewModel)carViewModel).ChildMenuItems);&lt;br /&gt;&lt;br /&gt;                                             carDataSourceView.Filter =&lt;br /&gt;                                                 (modelViewModel =&amp;gt;&lt;br /&gt;                                                     ((ModelViewModel)modelViewModel).Transmission.&lt;br /&gt;                                                                        Equals(Transmission.Automatic));&lt;br /&gt;&lt;br /&gt;                                             return !carDataSourceView.IsEmpty;&lt;br /&gt;                                         });&lt;br /&gt;        NotifyOnPropertyChanged("isAutoTransmission");&lt;br /&gt;        NotifyOnPropertyChanged("IsManualTransmission");&lt;br /&gt;        NotifyOnPropertyChanged("isAllTransmission");&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;In the above case Filter is based on Auto Transmission. So the Filter predicate will look like &lt;span style="font-family:courier new;"&gt;modelViewModel =&gt; ((ModelViewModel) modelViewModel).Transmission.Equals(Transmission.Automatic)). Similarly the Manual Transmission will look as given below.&lt;/span&gt;&lt;pre style="BORDER-RIGHT: rgb(153,153,153) 1px dashed; PADDING-RIGHT: 5px; BORDER-TOP: rgb(153,153,153) 1px dashed; PADDING-LEFT: 5px; FONT-SIZE: 12px; PADDING-BOTTOM: 5px; OVERFLOW: auto; BORDER-LEFT: rgb(153,153,153) 1px dashed; WIDTH: 100%; COLOR: rgb(0,0,0); LINE-HEIGHT: 14px; PADDING-TOP: 5px; BORDER-BOTTOM: rgb(153,153,153) 1px dashed; FONT-FAMILY: Andale Mono,Lucida Console,Monaco,fixed,monospace; BACKGROUND-COLOR: rgb(238,238,238)"&gt;&lt;code&gt;private bool isManualTransmission;&lt;br /&gt; public bool IsManualTransmission&lt;br /&gt; {&lt;br /&gt;     get { return isManualTransmission; }&lt;br /&gt;     set&lt;br /&gt;     {&lt;br /&gt;         isManualTransmission = value;&lt;br /&gt;         IsAutoTransmission = !value;&lt;br /&gt;         isAllTransmission = !value;&lt;br /&gt;&lt;br /&gt;         ICollectionView carsDataSourceView =&lt;br /&gt;             CollectionViewSource.GetDefaultView(CarsCollection[0].ChildMenuItems);&lt;br /&gt;&lt;br /&gt;         carsDataSourceView.Filter = (carViewModel =&amp;gt;&lt;br /&gt;         {&lt;br /&gt;             ICollectionView carDataSourceView =&lt;br /&gt;                 CollectionViewSource.GetDefaultView(&lt;br /&gt;                     ((CarViewModel)carViewModel).ChildMenuItems);&lt;br /&gt;&lt;br /&gt;             carDataSourceView.Filter =&lt;br /&gt;                 (modelViewModel =&amp;gt;&lt;br /&gt;                     ((ModelViewModel)modelViewModel).Transmission.&lt;br /&gt;                                        Equals(Transmission.Manual));&lt;br /&gt;&lt;br /&gt;             return !carDataSourceView.IsEmpty;&lt;br /&gt;         });&lt;br /&gt;&lt;br /&gt;         NotifyOnPropertyChanged("IsManualTransmission");&lt;br /&gt;         NotifyOnPropertyChanged("isAllTransmission");&lt;br /&gt;         NotifyOnPropertyChanged("isAutoTransmission");&lt;br /&gt;     }&lt;br /&gt; }&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4472331550180899195-88845937436377351?l=mywpf-visu.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/oD6qlD6gaRBZqHAELoLrExWYANk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/oD6qlD6gaRBZqHAELoLrExWYANk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/oD6qlD6gaRBZqHAELoLrExWYANk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/oD6qlD6gaRBZqHAELoLrExWYANk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/rFJG/~4/_DwS_7sbMao" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://mywpf-visu.blogspot.com/feeds/88845937436377351/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4472331550180899195&amp;postID=88845937436377351&amp;isPopup=true" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4472331550180899195/posts/default/88845937436377351?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4472331550180899195/posts/default/88845937436377351?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rFJG/~3/_DwS_7sbMao/filter-treeview-at-multiple-levels.html" title="Filter a TreeView at Multiple Levels using ICollectionView" /><author><name>Vish</name><uri>http://www.blogger.com/profile/07190836461714792800</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="31" src="http://4.bp.blogspot.com/_TITDXqy9uuo/THjlPNydltI/AAAAAAAABT0/XwRWNuyh7aw/S220/New.JPG" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_TITDXqy9uuo/SnNf4GBR_fI/AAAAAAAAATk/ze0W3ZCBqBM/s72-c/SampleFilterPic1.jpg" height="72" width="72" /><thr:total>3</thr:total><feedburner:origLink>http://mywpf-visu.blogspot.com/2009/07/filter-treeview-at-multiple-levels.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUAFSH8yeyp7ImA9WxJbF0g.&quot;"><id>tag:blogger.com,1999:blog-4472331550180899195.post-6833653414097403324</id><published>2009-07-08T11:16:00.008+05:30</published><updated>2009-07-28T10:38:39.193+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-07-28T10:38:39.193+05:30</app:edited><title>Dirty Checking a ViewModel</title><content type="html">&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;p style="text-align: justify;"&gt;&lt;/p&gt;&lt;h2&gt;&lt;span class="Apple-style-span"   style="font-size:large;color:#FF6600;"&gt;The Issue&lt;/span&gt;&lt;/h2&gt;&lt;p&gt;&lt;/p&gt;&lt;p style="text-align: justify;"&gt;Recently i was searching for some articles hoping i'll get some answers related to dirty checks in a ViewModel (If a ViewModel's property value changes and then if you want to save the changes, set some dirty flag so as to alert the user about the unsaved changes before closing an application) as it's a common implementation that is used across Enterprise applications. But to my surprise i could find only one article which claimed dirty check is a cake walk in ViewModels as we just need to have a "IsDirty" property set to true wherever the Property Notification is happening. I felt like it was actually a simple and reliable solution.&lt;/p&gt;&lt;p style="text-align: justify;"&gt;But when i actually went ahead with the implementation i understood that it was not just enough. I needed a little bit more as my situation was different. My requirement included rejecting some changes if i clicked on close button of a screen where i might have entered some or lots of data. So in this situation, setting IsDirty to true when a property value is changing will actually make the dirty check incorrect once i reject those changes. Also Two Way Binding with values exchanged between the Model and the ViewModel and vice versa will not work here as i may have to reject the changes(&lt;span class="Apple-style-span"   style="  ;font-family:arial;font-size:13px;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;UpdateSourceTrigger="Explicit" seemed to be a solution but was not feasible at some point, i don't remember where&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"   style="  ;font-family:verdana;font-size:16px;"&gt;).&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;h2&gt;&lt;span class="Apple-style-span"   style="font-size:large;color:#FF6600;"&gt;My Solution&lt;/span&gt;&lt;/h2&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;p style="text-align: justify;"&gt;So in this situation we would require the ViewModel to behave like a DatSet or a DataTable or something which retains a RowState for each row and once a Row is edited it maintains a state like Modified, Added etc. So what i could think of for a ViewModel is to have a temporary BO for ViewModel which will actually retain property values which were existing before the change.Let's think of a ViewModel let us say PersonViewModel which has a prperert something like&lt;/p&gt;&lt;p style="text-align: justify;"&gt;&lt;span class="Apple-style-span"   style="  ;font-family:Consolas;font-size:12px;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre class="alt" style="color: black; background-color: rgb(244, 244, 244); margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; width: 1248px; "&gt;&lt;span class="lnum" style="color: rgb(96, 96, 96); "&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;   1:  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="kwrd" style="color: rgb(0, 0, 255); "&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;public&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="kwrd" style="color: rgb(0, 0, 255); "&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;string&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt; Name&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="color: black; background-color: rgb(255, 255, 255); margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; "&gt;&lt;span class="lnum" style="color: rgb(96, 96, 96); "&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;   2:  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="alt" style="color: black; background-color: rgb(244, 244, 244); margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; width: 1248px; "&gt;&lt;span class="lnum" style="color: rgb(96, 96, 96); "&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;   3:  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;      get&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="color: black; background-color: rgb(255, 255, 255); margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; "&gt;&lt;span class="lnum" style="color: rgb(96, 96, 96); "&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;   4:  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;       {&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="alt" style="color: black; background-color: rgb(244, 244, 244); margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; width: 1248px; "&gt;&lt;span class="lnum" style="color: rgb(96, 96, 96); "&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;   5:  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;           &lt;/span&gt;&lt;/span&gt;&lt;span class="kwrd" style="color: rgb(0, 0, 255); "&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;return&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt; _strName;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="color: black; background-color: rgb(255, 255, 255); margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; "&gt;&lt;span class="lnum" style="color: rgb(96, 96, 96); "&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;   6:  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;       }&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="alt" style="color: black; background-color: rgb(244, 244, 244); margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; width: 1248px; "&gt;&lt;span class="lnum" style="color: rgb(96, 96, 96); "&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;   7:  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;       set&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="color: black; background-color: rgb(255, 255, 255); margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; "&gt;&lt;span class="lnum" style="color: rgb(96, 96, 96); "&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;   8:  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;       {&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="alt" style="color: black; background-color: rgb(244, 244, 244); margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; width: 1248px; "&gt;&lt;span class="lnum" style="color: rgb(96, 96, 96); "&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;   9:  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;            tempPersonBo.Name = _strName; &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="color: black; background-color: rgb(255, 255, 255); margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; "&gt;&lt;span class="lnum" style="color: rgb(96, 96, 96); "&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;  10:  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;            _strName = &lt;/span&gt;&lt;/span&gt;&lt;span class="kwrd" style="color: rgb(0, 0, 255); "&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;value&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;; &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="alt" style="color: black; background-color: rgb(244, 244, 244); margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; width: 1248px; "&gt;&lt;span class="lnum" style="color: rgb(96, 96, 96); "&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;  11:  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;            OnNotify(&lt;/span&gt;&lt;/span&gt;&lt;span class="str" style="color: rgb(0, 96, 128); "&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;"Name"&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="color: black; background-color: rgb(255, 255, 255); margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; "&gt;&lt;span class="lnum" style="color: rgb(96, 96, 96); "&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;  12:  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;       }&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="alt" style="color: black; background-color: rgb(244, 244, 244); margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; width: 1248px; "&gt;&lt;span class="lnum" style="color: rgb(96, 96, 96); "&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;  13:  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p style="text-align: justify;"&gt;A Temporary Business Object tempPersonBo is maintained which will retain the value of the property before the changes happening. We need to have two methods which will handle Rejecting and Applying the changes if we are saying "Close" or "OK" to a screen after entering all or some details. Lets call it &lt;span class="Apple-style-span"  style="color:#FFFFCC;"&gt;ApplyChangesToViewModel&lt;/span&gt; and &lt;span class="Apple-style-span"  style="color:#FFFFCC;"&gt;RejectChangesToViewModel&lt;/span&gt;.&lt;/p&gt;&lt;p style="text-align: justify;"&gt;&lt;span class="Apple-style-span"   style="  ;font-family:Consolas;font-size:12px;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre class="alt" style="color: black; background-color: rgb(244, 244, 244); margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; width: 1264px; "&gt;&lt;span class="lnum" style="color: rgb(96, 96, 96); "&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;   1:  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="kwrd" style="color: rgb(0, 0, 255); "&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;private&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="kwrd" style="color: rgb(0, 0, 255); "&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;void&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt; ApplyChangesToViewModel()&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="color: black; background-color: rgb(255, 255, 255); margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; "&gt;&lt;span class="lnum" style="color: rgb(96, 96, 96); "&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;   2:  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="alt" style="color: black; background-color: rgb(244, 244, 244); margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; width: 1264px; "&gt;&lt;span class="lnum" style="color: rgb(96, 96, 96); "&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;   3:  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;      tempPersonBo.Name= Name;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="color: black; background-color: rgb(255, 255, 255); margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; "&gt;&lt;span class="lnum" style="color: rgb(96, 96, 96); "&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;   4:  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="alt" style="color: black; background-color: rgb(244, 244, 244); margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; width: 1264px; "&gt;&lt;span class="lnum" style="color: rgb(96, 96, 96); "&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;   5:  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="color: black; background-color: rgb(255, 255, 255); margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; "&gt;&lt;span class="lnum" style="color: rgb(96, 96, 96); "&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;   6:  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="kwrd" style="color: rgb(0, 0, 255); "&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;private&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="kwrd" style="color: rgb(0, 0, 255); "&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;void&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt; RejectChangesToViewModel()&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="alt" style="color: black; background-color: rgb(244, 244, 244); margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; width: 1264px; "&gt;&lt;span class="lnum" style="color: rgb(96, 96, 96); "&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;   7:  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="color: black; background-color: rgb(255, 255, 255); margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; "&gt;&lt;span class="lnum" style="color: rgb(96, 96, 96); "&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;   8:  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;      Name = tempPersonBo.Name;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="alt" style="color: black; background-color: rgb(244, 244, 244); margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; width: 1264px; "&gt;&lt;span class="lnum" style="color: rgb(96, 96, 96); "&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;   9:  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p style="text-align: justify;"&gt;We need two more methods which will retrieve the Model and ViewModel values. Let's have a method say &lt;span class="Apple-style-span"  style="color:#FFFFCC;"&gt;"RetrieveModelValues"&lt;/span&gt; which should be called before we serialize the Business Object &lt;span class="Apple-style-span"  style="color:#FFFFCC;"&gt;PersonBO&lt;/span&gt;. Also we need to have a &lt;span class="Apple-style-span"  style="color:#FFFFCC;"&gt;"RetrieveViewModelValues"&lt;/span&gt; which we need to call when we are loading a screen.&lt;/p&gt;&lt;p style="text-align: justify;"&gt;&lt;span class="Apple-style-span"   style="  ;font-family:Consolas;font-size:12px;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre class="alt" style="color: black; background-color: rgb(244, 244, 244); margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; width: 1264px; "&gt;&lt;span class="lnum" style="color: rgb(96, 96, 96); "&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;   1:  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="kwrd" style="color: rgb(0, 0, 255); "&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;private&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="kwrd" style="color: rgb(0, 0, 255); "&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;void&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; RetrieveModelValues()&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="color: black; background-color: rgb(255, 255, 255); margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; "&gt;&lt;span class="lnum" style="color: rgb(96, 96, 96); "&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;   2:  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="alt" style="color: black; background-color: rgb(244, 244, 244); margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; width: 1264px; "&gt;&lt;span class="lnum" style="color: rgb(96, 96, 96); "&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;   3:  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;      objPersonBo.Name= Name;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="color: black; background-color: rgb(255, 255, 255); margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; "&gt;&lt;span class="lnum" style="color: rgb(96, 96, 96); "&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;   4:  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="alt" style="color: black; background-color: rgb(244, 244, 244); margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; width: 1264px; "&gt;&lt;span class="lnum" style="color: rgb(96, 96, 96); "&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;   5:  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="color: black; background-color: rgb(255, 255, 255); margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; "&gt;&lt;span class="lnum" style="color: rgb(96, 96, 96); "&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;   6:  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="kwrd" style="color: rgb(0, 0, 255); "&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;private&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="kwrd" style="color: rgb(0, 0, 255); "&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;void&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; RetrieveViewModelValues()&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="alt" style="color: black; background-color: rgb(244, 244, 244); margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; width: 1264px; "&gt;&lt;span class="lnum" style="color: rgb(96, 96, 96); "&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;   7:  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="color: black; background-color: rgb(255, 255, 255); margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; "&gt;&lt;span class="lnum" style="color: rgb(96, 96, 96); "&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;   8:  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;      Name = objPersonBo.Name;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="alt" style="color: black; background-color: rgb(244, 244, 244); margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; width: 1264px; "&gt;&lt;span class="lnum" style="color: rgb(96, 96, 96); "&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;   9:  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p style="text-align: justify;"&gt;where &lt;span class="Apple-style-span" style="white-space: pre; "&gt;&lt;span class="Apple-style-span"  style="color:#FFFFCC;"&gt;objPersonBo&lt;/span&gt; is the Business Object associated with the ViewModel.&lt;/span&gt;&lt;/p&gt;&lt;p style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="white-space: pre; "&gt;&lt;span class="Apple-style-span" style="white-space: normal; "&gt;Now to have a dirty check done on the ViewModel, we need to have a method,  say &lt;span class="Apple-style-span"  style="color:#FFFFCC;"&gt;"CheckDirty"&lt;/span&gt; which will do the job.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="text-align: justify;"&gt;&lt;span class="Apple-style-span"   style="  ;font-family:Consolas;font-size:12px;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre class="alt" style="color: black; background-color: rgb(244, 244, 244); margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; width: 1264px; "&gt;&lt;span class="lnum" style="color: rgb(96, 96, 96); "&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;   1:  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="kwrd" style="color: rgb(0, 0, 255); "&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;private&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="kwrd" style="color: rgb(0, 0, 255); "&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;bool&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt; CheckDirty()&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="color: black; background-color: rgb(255, 255, 255); margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; "&gt;&lt;span class="lnum" style="color: rgb(96, 96, 96); "&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;   2:  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="alt" style="color: black; background-color: rgb(244, 244, 244); margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; width: 1264px; "&gt;&lt;span class="lnum" style="color: rgb(96, 96, 96); "&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;   3:  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span class="kwrd" style="color: rgb(0, 0, 255); "&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;return&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt; !Name.Equals(objPersonBo.Name);&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="color: black; background-color: rgb(255, 255, 255); margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; "&gt;&lt;span class="lnum" style="color: rgb(96, 96, 96); "&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;   4:  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p style="text-align: justify;"&gt;This article is an attempt to solve a dirty issue with ViewModel when it comes to handling the dirty conditions with accepting and rejecting changes. Hopefully this will trigger in coming with a a different set of ideas related to this which will give us a more reliable solution to the problem.&lt;/p&gt;&lt;p style="text-align: justify;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4472331550180899195-6833653414097403324?l=mywpf-visu.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/_658X3jPquBycIIYEGhvGFCKXok/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_658X3jPquBycIIYEGhvGFCKXok/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/_658X3jPquBycIIYEGhvGFCKXok/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_658X3jPquBycIIYEGhvGFCKXok/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/rFJG/~4/C0aCEN9Cz0U" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://mywpf-visu.blogspot.com/feeds/6833653414097403324/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4472331550180899195&amp;postID=6833653414097403324&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4472331550180899195/posts/default/6833653414097403324?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4472331550180899195/posts/default/6833653414097403324?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rFJG/~3/C0aCEN9Cz0U/dirty-checking-viewmodel.html" title="Dirty Checking a ViewModel" /><author><name>Vish</name><uri>http://www.blogger.com/profile/07190836461714792800</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="31" src="http://4.bp.blogspot.com/_TITDXqy9uuo/THjlPNydltI/AAAAAAAABT0/XwRWNuyh7aw/S220/New.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://mywpf-visu.blogspot.com/2009/07/dirty-checking-viewmodel.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0EBQns_eyp7ImA9WxJbGEg.&quot;"><id>tag:blogger.com,1999:blog-4472331550180899195.post-8844977518399962524</id><published>2009-06-23T16:05:00.013+05:30</published><updated>2009-07-29T12:44:13.543+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-07-29T12:44:13.543+05:30</app:edited><title>Remove Focus from a Separator and MenuItem in wpf</title><content type="html">&lt;p  style="text-align: justify;font-family:verdana;"&gt;&lt;span style="font-size:100%;"&gt;This post is related to the problem i had reported in my article related to WPF Menus. A bound MenuItem associated with a command, if disabled (CanExecute of ICommand checks whether a command can be Invoked or not. If cannot be invoked, it'll disable the control, in our case should disable the MenuItem) or a Separator should not be a Focusable item. But instead what i could notice was that both the controls were actually looking like available for selection even if disabled.&lt;/span&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:verdana;"&gt;Still i'm not able to conclusively say what the reason for the problem is but atleast i have a workaround. Also somewhere i read that it's not a good practice if we use an Item control in a DataTemplate. So the workaround was based on a brilliant article by &lt;/span&gt;&lt;a style="font-family: verdana;" href="http://bea.stollnitz.com/blog/?p=23"&gt;Bea Stollnitz&lt;/a&gt;&lt;span style="font-family:verdana;"&gt;  which explained about using a StyleSelector class to choose a style for a DataType passed.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:verdana;"&gt;Taking help from the same article, i modified my code to get the style specific to a Separator and also for a MenuItem.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:verdana;"&gt;For the functionality to work, i created a a CustomStyleSelector class which inherits from the StyleSelector class. So the binding to this class will be like&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;public class CustomStyleSelector : StyleSelector&lt;br /&gt;{&lt;br /&gt;  public override Style SelectStyle(object item, DependencyObject container)&lt;br /&gt;  {&lt;br /&gt;        if (item is SeparatorViewModel)&lt;br /&gt;        {&lt;br /&gt;            return (Style ((FrameworkElement)container).FindResource("separatorStyle");&lt;br /&gt;        }&lt;br /&gt;        if(item is MenuItemViewModel)&lt;br /&gt;        {&lt;br /&gt;           return (Style ((FrameworkElement)container).FindResource("menuStyle");&lt;br /&gt;        }&lt;br /&gt;        return null;&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;span id="ctl00_ContentPlaceHolder1_output"&gt;&lt;div class="csharpcode"&gt;&lt;pre class="alt" style="text-align: justify;"&gt;&lt;span class="Apple-style-span"   style="  white-space: normal; font-family:Georgia;font-size:16px;"&gt;The thing to notice here is that the "menuStyle" needs to have two parts, say when it's an&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/span&gt;&lt;div style="text-align: justify;"&gt;enabled item let us have a style called "EnabledMenuStyle" which will have MenuItem property "StaysOpenOnClick="false". Similarly if the MenuItem is a disabled one (We are not setting the IsEnabled="false" or anything but the commands does it for us) let's have a Style called "disabledMenuStyle" for which "StaysOpenOnClick="true". So these styles will actually enable us to do the workaround required.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;The complete code along with the article will be available for download from codeproject pretty soon.&lt;/div&gt;&lt;span class="lnum"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4472331550180899195-8844977518399962524?l=mywpf-visu.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/kSmQHdk-xYYt-1uD6j0q_tXHnVs/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/kSmQHdk-xYYt-1uD6j0q_tXHnVs/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/kSmQHdk-xYYt-1uD6j0q_tXHnVs/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/kSmQHdk-xYYt-1uD6j0q_tXHnVs/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/rFJG/~4/Eaok4EA7XU0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://mywpf-visu.blogspot.com/feeds/8844977518399962524/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4472331550180899195&amp;postID=8844977518399962524&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4472331550180899195/posts/default/8844977518399962524?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4472331550180899195/posts/default/8844977518399962524?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rFJG/~3/Eaok4EA7XU0/remove-focus-from-separator-and.html" title="Remove Focus from a Separator and MenuItem in wpf" /><author><name>Vish</name><uri>http://www.blogger.com/profile/07190836461714792800</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="31" src="http://4.bp.blogspot.com/_TITDXqy9uuo/THjlPNydltI/AAAAAAAABT0/XwRWNuyh7aw/S220/New.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://mywpf-visu.blogspot.com/2009/06/remove-focus-from-separator-and.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkYNQnkzeCp7ImA9WxJbGEw.&quot;"><id>tag:blogger.com,1999:blog-4472331550180899195.post-5221934880190356608</id><published>2009-06-19T10:06:00.005+05:30</published><updated>2009-07-29T01:13:13.780+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-07-29T01:13:13.780+05:30</app:edited><title>Fun with XDocument, Lambda and Linq.</title><content type="html">&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;Applying Linq on XDocument is really fun stuff. The conventional querying of an XmlDocument relies on XPath and retrieving a XmlNodeList becomes really dirty as it'll fetch you all the xml nodes coming under a particular node. But with Linq over an XDocument, the querying becomes much more easier(We can use simpler queries similar to sql queries or use built in functions)&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span class="Apple-style-span"  style="font-family:'Tahoma';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'Tahoma';"&gt;&lt;div   style="border-width: 0px; margin: 0px; padding: 3px; width: auto; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; font-size-adjust: none; font-stretch: normal; text-align: left;font-family:Georgia,serif;font-size:100%;"&gt;&lt;div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;Let's have a look at the xml which we'll use to query using Linq.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 14px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;&lt;br /&gt;&amp;lt;T20Teams Title="T20Teams"&amp;gt;&lt;br /&gt;&amp;lt;Teams&amp;gt;&lt;br /&gt;&amp;lt;Team TeamName="India"&amp;gt;&lt;br /&gt;&amp;lt;Coach FirstName="Gary" LastName="Kirsten"/&amp;gt;&lt;br /&gt;&amp;lt;Players&amp;gt;&lt;br /&gt;&amp;lt;Player FirstName="Gautam" LastName="Gambir" Age="35" Average="55"/&amp;gt;&lt;br /&gt;&amp;lt;Player FirstName="Sachin" LastName="Tendulkar" Age="35" Average="55"/&amp;gt;&lt;br /&gt;&amp;lt;Player FirstName="Virender" LastName="Sehwag" Age="28" Average="55"/&amp;gt;&lt;br /&gt;&amp;lt;Player FirstName="Suresh" LastName="Raina" Age="21" Average="30"/&amp;gt;&lt;br /&gt;&amp;lt;Player FirstName="Yuvray" LastName="Singh" Age="28" Average="35"/&amp;gt;&lt;br /&gt;&amp;lt;Player FirstName="Mahendra Singh" LastName="Dhoni" Age="28" Average="40"/&amp;gt;&lt;br /&gt;&amp;lt;Player FirstName="Yusuf" LastName="Patan" Age="28" Average="30"/&amp;gt;&lt;br /&gt;&amp;lt;Player FirstName="Irfan" LastName="Patan" Age="29" Average="25"/&amp;gt;&lt;br /&gt;&amp;lt;Player FirstName="Harbhajan" LastName="Singh" Age="22" Average="25"/&amp;gt;&lt;br /&gt;&amp;lt;Player FirstName="R P" LastName="Singh" Age="23" Average="10"/&amp;gt;&lt;br /&gt;&amp;lt;Player FirstName="Ashish" LastName="Nehra" Age="35" Average="55"/&amp;gt;&lt;br /&gt;&amp;lt;/Players&amp;gt;&lt;br /&gt;&amp;lt;/Team&amp;gt;&lt;br /&gt;&amp;lt;Team TeamName="New Zealand"&amp;gt;&lt;br /&gt;&amp;lt;Coach FirstName="John" LastName="Bracewell"/&amp;gt;&lt;br /&gt;&amp;lt;Players&amp;gt;&lt;br /&gt;&amp;lt;Player FirstName="Brendan" LastName="McCullam" Age="30" Average="55"/&amp;gt;&lt;br /&gt;&amp;lt;Player FirstName="A J" LastName="Redmond" Age="35" Average="55"/&amp;gt;&lt;br /&gt;&amp;lt;Player FirstName="Jessy" LastName="Ryder" Age="28" Average="55"/&amp;gt;&lt;br /&gt;&amp;lt;Player FirstName="Ross" LastName="Taylor" Age="21" Average="30"/&amp;gt;&lt;br /&gt;&amp;lt;Player FirstName="Scott" LastName="Styris" Age="28" Average="35"/&amp;gt;&lt;br /&gt;&amp;lt;Player FirstName="T" LastName="Southee" Age="28" Average="40"/&amp;gt;&lt;br /&gt;&amp;lt;Player FirstName="G" LastName="Hopkins" Age="28" Average="30"/&amp;gt;&lt;br /&gt;&amp;lt;Player FirstName="M" LastName="Gillespie" Age="29" Average="25"/&amp;gt;&lt;br /&gt;&amp;lt;Player FirstName="T" LastName="Fulton" Age="22" Average="25"/&amp;gt;&lt;br /&gt;&amp;lt;Player FirstName="Ian" LastName="Butler" Age="23" Average="10"/&amp;gt;&lt;br /&gt;&amp;lt;Player FirstName="N" LastName="McCullam" Age="35" Average="55"/&amp;gt;&lt;br /&gt;&amp;lt;/Players&amp;gt;&lt;br /&gt;&amp;lt;/Team&amp;gt;&lt;br /&gt;&amp;lt;/Teams&amp;gt;&lt;br /&gt;&amp;lt;/T20Teams&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;span class="Apple-style-span"  style="font-family:'Tahoma';"&gt;&lt;pre class="alt"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/span&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;Now loading the xml into an XDocument would look something like&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span class="Apple-style-span"  style="font-family:'Tahoma';"&gt;&lt;pre class="alt"&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 14px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;XDocument xT20TeamsDoc     =XDocument.Load("..//Debug//TeamsXml//T20Teams.xml");&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/pre&gt;&lt;/span&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;The xml is added to the solution and it's properties like Build Action is set to Content and&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;Copy To Output Directory is set to Copy always. This will help in refering the xml in the&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;relative path&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 14px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;"..//Debug//TeamsXml//T20Teams.xml"&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div style="text-align: justify;"&gt;Now let's consider the same ViewModels used in my previous post related to T20Teams. Lets try replacing the Business Objects and directly use the XDocument to supply values to the ViewModel objects.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Here i have a Twenty20TeamsViewModel which accepts an XElement as a parameter.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 14px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;Twenty20TeamsViewModel viewModel =&lt;br /&gt;             new Twenty20TeamsViewModel(xT20TeamsDoc.Element("T20Teams"));&lt;br /&gt;&lt;br /&gt;viewModel.Header = xT20TeamsDoc.Element("T20Teams").Attribute("Title").Value;&lt;br /&gt;&lt;br /&gt;Twenty20TeamsViewModel viewModel =&lt;br /&gt;             new Twenty20TeamsViewModel(xT20TeamsDoc.Element("T20Teams"));&lt;br /&gt;&lt;br /&gt;viewModel.Header = xT20TeamsDoc.Element("T20Teams").Attribute("Title").Value;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div style="text-align: justify;"&gt;So we have the teams header ready to be shown. Now is when we will add the child elements which the teams to the main viewmodel, the Twenty20TeamsViewModel. This can be done by using the below piece of code.&lt;br /&gt;&lt;/div&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 14px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;   XElement _xT20TeamsElement = xT20TeamsDoc.Element("T20Teams");&lt;br /&gt;&lt;br /&gt;_xT20TeamsElement.Element("Teams").Elements("Team").ToList().ForEach(&lt;br /&gt;           team =&amp;gt;&lt;br /&gt;           {&lt;br /&gt;               TeamViewModel teamViewModel = new TeamViewModel(this, team);    &lt;br /&gt;               teamViewModel.Header = team.Attribute("TeamName").Value;    &lt;br /&gt;&lt;br /&gt;               ChildMenuItems.Add(teamViewModel);&lt;br /&gt;           });&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div style="text-align: justify;"&gt;Here the TeamViewModel is accepting a parentViewModel and an XElement as parameters.&lt;br /&gt;&lt;br /&gt;Now if you want to selectively do a querying, then a combination as shown below would help.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 14px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;_xT20TeamsElement.Element("Teams").&lt;br /&gt;  Elements("Team").Where(&lt;br /&gt;              reqTeam =&amp;gt;&lt;br /&gt;                  reqTeam.Attribute("TeamName").Value.Equals("India")).ToList().&lt;br /&gt;                  ForEach(team =&amp;gt;&lt;br /&gt;                         {&lt;br /&gt;                            TeamViewModel teamViewModel =&lt;br /&gt;                                new TeamViewModel(this, team);&lt;br /&gt;                            teamViewModel.Header =&lt;br /&gt;                       &lt;br /&gt;                            team.Attribute("TeamName").Value;&lt;br /&gt;                       &lt;br /&gt;                            ChildMenuItems.Add(teamViewModel);&lt;br /&gt;                         }));&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div style="text-align: justify;"&gt;If you are new to Lambda expressions, then a basic explanation related to the difference between the Inbuilt functions "Where" and "ForEach" needs to be explained a little bit here.The "Where" function is expecting a predicate which is like a conditional expression. This conditional expression we are constructing courtesy the Lambda expression which is a new feature in C# 3.0. Whoever is aware of the tedious anonymous methods will appreciate the ease with which we can use a Lambda expression as a substitute. Let's dig into the below expression a little deeper.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 14px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;reqTeam =&amp;gt; reqTeam.Attribute("TeamName").Value.Equals("India").&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div style="text-align: justify;"&gt;reqTeam is an XElement which can be considered to be passed to a method which is having the statement which checks whether the XElement's "TeamName" attribute is having the value "India" or not. If the expression is true then the "Where" function will return all the XElement's which has "TeamName" attribute value as "India" (In this case it is only one team).&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4472331550180899195-5221934880190356608?l=mywpf-visu.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/2ifnsPDmhMsSsLQkao009qQOU7c/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/2ifnsPDmhMsSsLQkao009qQOU7c/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/2ifnsPDmhMsSsLQkao009qQOU7c/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/2ifnsPDmhMsSsLQkao009qQOU7c/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/rFJG/~4/a1k59juyfW8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://mywpf-visu.blogspot.com/feeds/5221934880190356608/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4472331550180899195&amp;postID=5221934880190356608&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4472331550180899195/posts/default/5221934880190356608?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4472331550180899195/posts/default/5221934880190356608?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rFJG/~3/a1k59juyfW8/fun-with-xdocument-lambda-and-linq.html" title="Fun with XDocument, Lambda and Linq." /><author><name>Vish</name><uri>http://www.blogger.com/profile/07190836461714792800</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="31" src="http://4.bp.blogspot.com/_TITDXqy9uuo/THjlPNydltI/AAAAAAAABT0/XwRWNuyh7aw/S220/New.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://mywpf-visu.blogspot.com/2009/06/fun-with-xdocument-lambda-and-linq.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Dk4BR3w7cSp7ImA9WxJWEEo.&quot;"><id>tag:blogger.com,1999:blog-4472331550180899195.post-3493980025796928212</id><published>2009-06-15T19:32:00.000+05:30</published><updated>2009-06-15T19:39:16.209+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-06-15T19:39:16.209+05:30</app:edited><title>Problem with Disabled MenuItems and Separator</title><content type="html">There's a strange problem related to MenuItems that i had faced while creating the sample application provided for &lt;a href="http://www.codeproject.com/KB/WPF/WpfMenuViewModel.aspx"&gt;http://www.codeproject.com/KB/WPF/WpfMenuViewModel.aspx&lt;/a&gt; is that the Menu items even if they are disabled, were closing on clicking on it. Another funny thing is that the Separator item was also a focussable object even if its Focussable property is set to false. Seems like it is a problem realted to DataTemplates. &lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If i'm not using a DataTemplate or any template, the problems are not occuring (Diasbled menu item will not close and also Separator is not a focussable object) . I reckon it's a common related problem.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I'm still trying to figure out a way to overcome this drawback. Share your thoughts if you are finding any solution to this strange thing.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4472331550180899195-3493980025796928212?l=mywpf-visu.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/PNQ_gDKqURRz3gT2rwkZJRDNRmw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/PNQ_gDKqURRz3gT2rwkZJRDNRmw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/PNQ_gDKqURRz3gT2rwkZJRDNRmw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/PNQ_gDKqURRz3gT2rwkZJRDNRmw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/rFJG/~4/1JKz8qu4e-8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://mywpf-visu.blogspot.com/feeds/3493980025796928212/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4472331550180899195&amp;postID=3493980025796928212&amp;isPopup=true" title="5 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4472331550180899195/posts/default/3493980025796928212?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4472331550180899195/posts/default/3493980025796928212?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rFJG/~3/1JKz8qu4e-8/problem-with-disabled-menuitems-and.html" title="Problem with Disabled MenuItems and Separator" /><author><name>Vish</name><uri>http://www.blogger.com/profile/07190836461714792800</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="31" src="http://4.bp.blogspot.com/_TITDXqy9uuo/THjlPNydltI/AAAAAAAABT0/XwRWNuyh7aw/S220/New.JPG" /></author><thr:total>5</thr:total><feedburner:origLink>http://mywpf-visu.blogspot.com/2009/06/problem-with-disabled-menuitems-and.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEQFR3g-fSp7ImA9WxJXGUQ.&quot;"><id>tag:blogger.com,1999:blog-4472331550180899195.post-284309660753241089</id><published>2009-06-14T21:39:00.000+05:30</published><updated>2009-06-14T21:48:36.655+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-06-14T21:48:36.655+05:30</app:edited><title>Wpf Menu using ViewModel</title><content type="html">&lt;code&gt;&lt;span style="font-family:arial;"&gt;&lt;span style="font-weight: bold;"&gt;If you are keen follower of wpf and mvvm then my article on an implementation based on wpf may be of help. This implementation is aiming at binding a wpf menu and uses HierarchicalDataTemplate effectively.&lt;br /&gt;&lt;br /&gt;You can find the article &lt;a href="http://www.codeproject.com/KB/WPF/WpfMenuViewModel.aspx?fid=1542190"&gt;here&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4472331550180899195-284309660753241089?l=mywpf-visu.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/LNzUhKnb2HPMRtpdHWnIGTdLRos/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/LNzUhKnb2HPMRtpdHWnIGTdLRos/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/LNzUhKnb2HPMRtpdHWnIGTdLRos/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/LNzUhKnb2HPMRtpdHWnIGTdLRos/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/rFJG/~4/5bcixBj_k9Y" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://mywpf-visu.blogspot.com/feeds/284309660753241089/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4472331550180899195&amp;postID=284309660753241089&amp;isPopup=true" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4472331550180899195/posts/default/284309660753241089?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4472331550180899195/posts/default/284309660753241089?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rFJG/~3/5bcixBj_k9Y/wpf-menu-using-viewmodel.html" title="Wpf Menu using ViewModel" /><author><name>Vish</name><uri>http://www.blogger.com/profile/07190836461714792800</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="31" src="http://4.bp.blogspot.com/_TITDXqy9uuo/THjlPNydltI/AAAAAAAABT0/XwRWNuyh7aw/S220/New.JPG" /></author><thr:total>1</thr:total><feedburner:origLink>http://mywpf-visu.blogspot.com/2009/06/wpf-menu-using-viewmodel.html</feedburner:origLink></entry></feed>

