I have been writing software since I was a kid. My dad got me started with QBASIC, and I never stopped telling computers what to do since then.

In addition to being a software geek, I’m also a music geek. I’ve been playing classical piano since I was five, and studied music composition in college. I’m a firm believer that the thought processes involved with writing & performing music are very similar to the processes of designing & writing software.

I worked at Infragistics for a couple of years, and learned a lot about user interface programming from the masters at the WinForms Dev Lab in Long Island. When I saw WPF for the first time in late 2005, I knew that it was the future of UI development on Windows. I’ve been exploring WPF ever since, and love it more every day.

I post articles to the CodeProject in my spare time. You can view my list of articles here.


132 Responses to About

  1. Tim Sneath says:

    So Josh, I just wanted to find out if you’ve ever thought about interviewing for Microsoft? We’ve got open positions for WPF and WPF/E evangelists right now. Let me know if this is something you’re interested in, and we can chat further…


  2. Tor Langlo says:

    Hi Josh,

    I just read about your resignment from your prior company. You and I had a couple of “cyber-exchanges” a while ago in these two threads (http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1025073&SiteID=1 and http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1000523&SiteID=1).

    In case you are looking for job/work opportunities, plase take a look at our website (http://www.kodasoftware.com). I am trying to assemble a small team of WPF developers for current and future projects.

    Obviously, I can’t compete with Microsoft , but you never know, bigger isn’t always better… 🙂


  3. Rafael Munoz says:

    Regarding the Microsoft MVP Award Program

    Dear Josh,

    My name is Rafael M. Munoz. I’m a member of the Microsoft® Most Valuable Professional (MVP) team as a Community MVP relationship liaison (also known as “MVP Lead”) for Visual C#, Visual J#, Developer Security, Client Application Development and Windows Networking. I would love to talk to you about the MVP Program and your contributions to the Client Application Development technical communities (WinFX, Windows Forms, WPF) over the past year.

    MVPs are recognized by Microsoft for their voluntary participation in offline and online technical communities. If you are not familiar with the MVP program you can learn more by visiting our web site at: http://mvp.support.microsoft.com. Our web site includes a Frequently Asked Questions (FAQ) section, http://mvp.support.microsoft.com/mvpfaqs, which provides answers to questions commonly asked about the MVP program and also provides a lot of good information describing the program.

    Please contact me directly at [removed] and I look forward to talking to you further about the program.

    Rafael M. Munoz

  4. SteveD says:

    Hi Josh,

    I’d like to talk to you about what you are doing with WPF. Please send me an email with your current address.

    All the best,

  5. Guru says:

    Hi Josh,

    I liked your DragCanvas sample very much.

    I want your help. 🙂
    Do you have any document on Custom conrol that will explain How to Write custom control along with their properties,Methods and Events.If possible can u share this with me. 🙂

    Thanks in advanced… 🙂

  6. Matthew Lebo says:

    Hey josh, 3 things…

    First its nice to meet you, and thanks for posting help to me on the Avalon MSDN forums.

    Second I have another question about that example of a nested listview in a listview as treeview items and couldn’t find any better way to get a hold of you directly. Basically I’m happy with the workaround you came up with but I would like to make it so that there is a listview for every item in the MAIN table but only 1 listview that holds all the data for the details table. I can’t get this to work because the listview is created for every single detail item since its part of a DataTemplate, any suggestions?

    Third, you have inspired me to start a blog as well and I have linked to you. I will be uploading some of my own WPF stuff soon and you can be sure i’ll be joining that XBAP contest. (matthewlebo.wordpress.com)


  7. Jason Beres says:

    Hi Josh,

    Awesome idea on the WPF contest!

    I want to up the ante even more for the winners … Infragistics will donate some killer WPF software if you’ll accept. We have 6 great controls coming out in V1 – you can get the skinny on each one of them here:


    Shoot me an email on jasonb@infragistics.com and let’s try to make this happen,

    Great to see how things are going so awesome on your end,


  8. Gideon says:

    Hi, I found the project you made about the draggable canvas on code project.
    Few questions if you don’t mind?
    1. I placed your code inside a Usercontrol created in VS 2005
    Then I used the custom control inside another project. But once I tried to place
    controls such as a rectangle inside the custom control like this:

    Only the rectangle would display and not the dragcanvas.

    2. Lastly, attributes like the background color couldn’t be set in tne custom control such as:

    I guess it’s obvious that it would recognise this as a an attribute since it’s a custom control, but I don’t know how to create these attributes either?

    So, I’d appreciate if you could give some help on this:)

  9. vRITHNER says:

    Hi Josh,

    I would love to send you a question by mail but I can’t find your email address:
    Can you give me one ?



  10. Josh Smith says:


    You should post your WPF questions to the WPF Forum: http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=119&SiteID=1


  11. Kevin says:

    Hi Josh,

    I saw a post of yours in the MSDN forums, and wanted to ask you about the NYTimes reader. I really like the network/treeview control used in the topic explorer. Is that something you guys built, or is it an available control. I also see a similar one used in the Wikipedia Explorer.



  12. Josh Smith says:


    That control is available in Kevin Moore’s Bag-o-Tricks. It is called the Graph. Here’s the link: http://wpf.netfx3.com/files/folders/controls/entry8196.aspx


  13. Kevin says:

    Thanks very much Josh!



  14. Josh Smith says:

    *** NOTE ***

    Please do NOT post programming questions here. They will be DELETED.

    If you have a question about WPF, post it to the WPF Forum: http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=119&SiteID=1


  15. Katie Meenan says:

    Hey Josh,

    Is there any way we can post jobs on your site for your readers? (I guess that’s what I’m doing here anyway.) We’re a software consulting company in Manhattan looking for smart WPF developers.

    Check it out here: http://www.lab49.com/careers


  16. Alex Nesterov says:

    Dear Josh,

    We are starting a russian developer community and want to provide our members with russian translations of the articles from your blog and CodeProject. Could you be so kind to give the permission to us? All copyright notes and links are preserved. Thanks!

    Best Regards,
    Alex Nesterov

  17. Josh Smith says:


    Yes, feel free to translate my articles and blog posts if you want to. I appreciate the interest in my work. Please notify me when you have posted some translations of my material online. I would like to see what they look like in Russian.


  18. Patrick says:

    Hey Josh,

    Wow, I didn’t know you worked at Infragistics. I’m using that library from 2005 so you probably wrote some of the controls I’m using! That’s cool!

    Anyway – I actually had a question for you. I found a reference on another webpage to a blog post you wrote at your old blog in August 2006, called ‘”Specializing the Selected Item’s Data Template.” I am trying to do exactly that, but the blog now comes up 404. Any chance of you reposting that here so I can figure out how you did that? I can’t seem to get this to work for the life of me.

    Thanks again for all your help!! I don’t know where I’d be without your work.. stumbling around in the dark, I’d guess..

  19. Josh Smith says:


    I dug up that demo app and wrote a quick post about it: https://joshsmithonwpf.wordpress.com/2007/07/30/customizing-the-selected-item-in-a-listbox/

    The reason why my old blog posts no longer exist is because my previous employer deleted my blog when I left. I still can’t understand why they did that, but such is life.


  20. Hello Josh!

    How are you doing? My name is Becky Cohen and I manage the Northern NJ .NET User Group which takes place every 2nd Tuesday of every month at SetFocus in Parsippany, NJ (about 30 minutes outside of NYC). I am constantly on the look out for potential speakers and presenters for our User Group and I noticed that you are scheduled to speak at the NYC User Group this month.

    I was wondering if you would be interested in speaking for our User Group sometime in the near future? We usually have a great turnout – about 50 attendees – to each meeting and it is a great way to network and meet other people interested in the programming industry. Please get back in touch with me at rcohen@setfocus.com and let me know. I would love to speak with you further about a possible speaking opportunity!

    Thank you very much!

  21. marlon says:

    Hi Josh,

    you post great article and good posts of the wpf msdn forum… keep it up….

    why don’t we open a google group together….

    if you want send me on marlongrech@gmail.com

  22. Chris Hambleton says:

    Hi Josh – great blog – I’m learning a lot from it!

    I have a question about cascading selection controls – what’s the best/preferred way to do this in WPF? The example is a user makes a selection in a combobox, which causes another combobox to be automatically re-populated based upon the previous selection.



  23. Chris Hambleton says:

    Oops – sorry about the programming question – I didn’t see the “don’t post programming questions here!” until after i had already posted the msg. I found the solution quickly in the WPF forums… 🙂


  24. Ron Tomich says:


    We’re looking to get the word out about our upcoming title, “WPF in Action” (by Arlen Feldman and Maxx Daymon) and your name came up. If you are interested, we’d like to make available to you a free copy of the Early Access version of this book for your review. Please let me know if you would like to receive this free PDF download and I’ll set it up. Currently chapters 1-8 are available.

    Also, if you would like to receive a free copy of the paper book when it ships (Dec-Jan est.) please reply with your shipping address and I’ll get that in place as well.


    — Ron Tomich
    Director, Sales & Marketing
    Manning Publications

  25. neeraj says:

    hi this is neeraj here.can u have ur mail address.i want to talk to u regarding a win application.plz help

  26. ian kujawa says:

    Hello Josh, your work is great and would like any help you can give:

    Wanted to know if anyone knew of a way to edit xml files from within blend…

    Basically I created a blend project and databinded a treeview item with a string from an xml file, made the template a textbox, so the user can edit, but I need to know how those changes in the blend project (text edit) can be saved to the xml file? basically save the changes and validate the xml file.

    Brennon from expressionsblend.com responded to my prevoius post from: http://msdn2.microsoft.com/en-us/library/ms754356.aspx

    which was great, but I am having trouble updating my xml file,

    Basically the situation is, I have an xml file that controls a separate app and you edit the xml file and the xml settings control the app and the apps UI.

    I am trying to build an xml editor within blend. I want to import the xml file (+xml) then data bind a tree view item and define the template (each xml string) as a textbox so the user can edit that specific xml value. Then when they are done editing they can save the blend project and the settings will overwrite the xml file on their machine.

    any help would be great…thanks again

  27. Josh Smith says:


    I don’t answer tech questions on this messageboard. You should post that question to the WPF Forum instead. Thanks


  28. […] in client app development, with a focus on WPF.  As well as being an MVP, Josh is a big blogger on WPF, speaks regularly about WPF at conferences and community events, and he’s published a ton of […]

  29. Lauren Milan says:

    We are seeing an increasing number of requests for Silverlight and WPF candidates. I’d love to connect with you regarding your contacts, and perhaps discuss the various opportunities we have available. FILTER, located in Seattle WA, is one of the primary providers of digital talent (from graphic design to development) to Microsoft and hundreds of companies along the west coast. I’ve had great luck connecting with experts like yourself, and look forward to hearing from you soon.

    Warm regards,

    D 206.709.4934
    T 206.568.8000
    F 206.568.8001

    1505 5TH AVE, SUITE 600, SEATTLE, WA 98101. MORE INFO TO COME…

    “Recognizing the need is the primary condition of design.”

  30. Richard Mintz says:

    Hi Josh,

    I am new to WPF and have created a custom control that takes forever to render when many of them are added to a wrap panel. I would very much appreciate your help if you could spare a moment.


    Richard Mintz

  31. Gary Bennion says:

    Hi Josh,
    I am a PHP developer working with JS and AJAX. I have recently been offered a job working as a WPF designer. This is quite a big career change for me so I have started looking into your industry more and have been suprised at the lack of WPF jobs out there (UK based)… is this because the technology is still relatively new so not all companies have started using it? Basically I was hoping you could tell me what your opinion of where WPF is heading?

    Gary Bennion

  32. Josh Smith says:


    I think WPF is taking a long time to gain traction, but I have definitely seen it being adopted more and more. Considering the large impact Silverlight will have on the industry once it becomes more feature-complete, I think WPF will be boosted in popularity because of the close parody between the two platforms.


  33. Gary Bennion says:

    Thanks Josh – definate food for thought

  34. Matt says:


    Any chance you ask your employers to fix this blatant bug? Seems a very low response community in comparison to Xceed etc..

  35. bendewey says:


    I’m just starting up my blog. I’d love you support http://bendewey.wordpress.com. Please stay tuned for more.

  36. Jan Swenson says:

    Thank you for providing a quick overview of your passion for advanced GUI development concepts with WPF. I tracked your profile down through searching my network in Linked IN. I was wondering if you could help. I have a client that is looking for a WPF expert to help them create there next generation algorithmic Portfolio trading application. all development will be done in WPF. As I saw your distaste of mundane financial services clients. This is a very exciting company working on the bleeding edge of technology. they see themselves as a Software development company that builds financial software for trading.

    I was hoping to see if you or someone you know would be interested in this type of role. it is very long term and extremely stable. please shoot me an email if you would like to speak about this, or if you know someone, I can pay very large referral fees if you are not interested, but one of your colleagues are 🙂
    Jan Swenson
    SilverSearch Inc

  37. Josh Smith says:


    I know Rich Altamura. He and I already went down this path.


  38. A.V.Ebrahimi says:


    Is there anyway to set a font (or any other style) to all children of a panel (e.g. StackPanel) at once?


  39. Tim Dawson says:

    Josh, please contact me. I’d be happy to have my company donate a couple of licenses for our WPF controls as prizes to the competition you’re running.

  40. Josh Smith says:

    Sorry Tim. Your company is a competitor with Infragstics, my employer. That would be a bad move on my part. Thanks anyways, though!


  41. Tim Dawson says:

    Ah, I had not realised that all your community contributions were paid for by Infragistics. Competition aside, it’s rather sad that because of this, other WPF control vendors are not able to donate prizes to any community competitions you run.

    Again I’d encourage you to contact me to discuss issues like this further; it’s rather irritating there’s no means to contact you on this website other than a public forum.

  42. Josh Smith says:


    I’m not going to risk putting myself in an undesirable situation at work so that you can advertise your product in my competition.


  43. Tim Dawson says:


    I know; we established that three messages ago and my offer of prizes for your competition is withdrawn. Still, as a fellow MVP and expert in WPF it would be good to get in touch with you, so this is why I am urging you to contact me, or provide a means of contact better than this ridiculous public forum.


  44. Jason R says:


    We’re working on various in-vehicle projects with a US auto maker and are seeking your expertise. Our entire solution is .NET based and we’re looking to take it to the next level with WPF.

    Please contact me when you have a moment.


  45. mitra says:

    I must write a program with WWF, I have some problems,
    can you help me please?
    Warm regards

  46. Abdolhosein V. Ebrahimi says:

    Hi Josh:

    Is there anyway to customize application at runtime, for example change colors and font…


    I would like to retrieve style name of control, via code.
    Then I would like to change the retrived style in code again and save style to disk for later runs.

    I need this to give customization feature to my end users.

    Thanks and Regards

  47. Nicholas says:

    Hi Josh,

    I read your article “Customize Data Display with Data Binding and WPF” on published on July on msdn magazine but we cannot diplay some figures. (Figure 1, Figure 2…)

    Thanks and Regards,

  48. Josh Smith says:

    Hi Nicholas,

    Thanks for the heads up. Unfortunately, I am not able to adjust that article, since it is owned by MSDN Mag. I’ll check in with them.


  49. Patrick Lindsey says:


    Just a quick note on your Stretch a Expander Header (way back in Feb 2006). A xaml only solution to change the HorizontalAlignment of the ContentPresenter from Left to Stretch is listed below. The key to the solution is the Binding in the DockPanel which uses Mode=OneWayToSource. And Bea Costa said she couldn’t think of any use for OenWayToSource, sheesh, hehehe 🙂 BTW, I really enjoy your blogs…

    Best Regards
    Patrick Lindsey

  50. Andre says:

    Hi Josh,
    If you create part in your blog like question/answer you can make its more popular.
    And I have first question for this part 🙂
    There are many troubles with dictionaryresources if you want to use them not only in straight forward maneer. For example try to make generic.xaml theme with 2 merged dictionaries “Global.xaml” and “Control.xaml” and try to use resource from first dictionary in second one. Can you explain what I’m doing wrong and how can I solve this problem?

  51. Lloyd says:


    As I was wondering about posting or not my 1st article to CodePoject I posted a preview link to my blog in the Lounge:

    As it’s about WPF Marc (Clifton) had a few comments:
    – it’s interesting 😀
    – maybe you should ask Josh if you really need to do what you did in this project?

    So could you give some feedback?
    Basically I’m trying to replace zillion of IValueConverter class with a single ScriptConverter.
    What do you think of my post?


  52. Josh Smith says:


    Cool idea, though it’s been done before, or at least something equivalent has been done. Here’s some links:



    I think you should still write the article, though. It is always good to see another approach.


  53. Lloyd says:

    I so love WPFIX…. I have to try it tomorrow night (it’s past bed time, I just got up to add some touch to my blog..)

    In fact I have to try both…

    Now I’m a bit disheartened for my article, but I guess I could use my (future, ahum) article as an occasion to mention them

    the good thing is, now I know about those projects, thanks! 😀

  54. Lloyd says:

    Hi Josh,

    I studied those articles, particularly the one with Lambda expression as it was the one most appealing to me.

    1st it is a very interesting extension and I would add it in my tool box.

    2nd it would not solve my problem, in fact you will get a token undefined “Brushes”, and I don’t see how to fix it as those Dynamic class from MS are all so complex and I don’t really want to extends them.

    Hower, building on this markup extension idea to generate converters, I made my own with the ScriptConverter.
    In the end you can use an expression such as:

    I’m going to update my blog and CodeProject article with this new information (later this week).

    Do you have any idea on how to modify the article?
    I am thinking of adding a few section at the bottom, but I fear people might miss out on these very interesting development…

  55. Lloyd says:

    I mean an expression such as (< > escaped):
    <TextBlock Text=”{Binding}”
    Background=”{Binding Converter={local:Script ‘if(value%2==0) Brushes.Red; else Brushes.Green;’, {x:Type Brushes}}}”/>

  56. Josh Smith says:

    Unless the article has been edited by CP, if you’re logged in, there should be a Modify link at the top of the article. Click that and you can edit the article.

  57. Lloyd says:

    Hi Josh,
    Here is a more interesting / up to date version:
    Which include a comparison with the LambdaExtension (and some other idea from it).

    I cannot modify my article page anymore (on codeproject) but I submitted an updated HTML to them as they said in their welcoming article.

    I hope you’ll enjoy the updated article!
    And thanks for your input as well.

    Cheers, Lloyd

  58. Brandi says:


    I have a position coming open in Raleigh NC for someone with programming and analysis skills on WPF. Do you think you might be interested or know of anyone who might be?

    I’d love to chat more.


  59. Kaveh says:

    Dear Mr.Smith,

    I am a fan of your WPF and ViewModel blogs, specially the ones related to the TreeView control … I’va been able to develop a nice looking Organization Chart for our corporation thanks to your advices and blog posts and I’d be more than happy to send you some of the snapshots I’ve taken.

    Also, now that I’ve finished this aforementioned project, I’ve been assigned a much more adventurous one demanding an even more complicated TreeView layout with multiple levels of horizontal and vertical child nodes for each parent node in a way that I’m really hesitant if it is possible at all to do it via TreeView. So I was wondering if I could possibly contact you somehow and share the snapshots as well as a draft of my problematic TreeView layout to see if you could kindly impart me with your advices 🙂



  60. BW says:

    Your writings have been invaluable in helping me get introduced to WPF (among other things). Your MV-ViewModel based approach is something we’re starting to use with real success in our projects. Thank you for this great service you provide to so many of us geeks!

  61. Josh Smith says:

    Thanks a lot, BW. I really appreciate that!!

  62. Sal Tenorio says:

    Hey Josh,

    First of all thanks for all the work you are doing here and on your iJoshSmith blog (your turning into the dark side got me thinking about looking into it myself but without giving up to my truthful roots).

    Anyway, I wanted to ask a quick question. I am planning on using your MVVM Foundation classes for a silverlight project (and perhaps even on Windows phone 7) and wanted to ask if you would have any comments about it. I have not taken a deep look at the implementation yet so was hoping you could tell me if there are any caveats or something to beware of.

    Thank you and please keep it up, and remember, it is never late to come back to the Jedi order. 🙂


  63. Maybe you can give me some suggestions. We were seeing a memory leak in our WPF 3.5 app on XP. We found two updates that addressed the issue, one being KB967634. But (a) i’m not sure KB967634 can be distributed legally in our installer and (b) KB967634 causes XP’s Windows Updates to get stuck in a loop.

    What I am looking for is sanctioned updates that include the fixes in KB967634, KB981107, etc.

    The details on KB967634 refer to:
    presentationcore.dll v3.0.6920.4000
    wpfgfx_v0300.dll v3.0.6920.4000
    Can I assume that any versions of the DLLs that are greater will also contain the needed fix, or no?

    I tried searching for KB967634 and for presentationcore.dll, but have not found the needed information.


  64. navid says:

    hello sir
    i had a question about your wpf canvas control.
    i used some code to load my user controls dynamically but when i add it to the your canvas it gets error. and i searched a found it reason , it is an error because i have two or more object with one property. the error is :
    “Specified Visual is already a child of another Visual or the root of a CompositionTarget”

    please help me about solve it.
    thanks alot navid

  65. jojo says:

    Hi dear Josh
    I have an urgent question , I’m a biginner at Dot.net and I’m working on a wPF project using the MvvM light toolkit , I don’t seem to unserstand how to make my data base manipulable, I used to work on J2ee so I still got that idea of transforming my relational data base mapped to objects where each table becomes a class ( a .cs file) ( all into the model folder because it’s an mvvm design pattern ) so i tried Ado.net entity framework but all the classes were in one file as partial classes , so I don’t know what to do , actually i start to lose my stratgy of thinking so please help me am totally clueless !

  66. ml says:


    Just looking for a quick answer (if possible) here…I am developing a line-of-business risk analysis app which will also be accessed via an extranet by external clients. I am debating between a Silverlight/WCF-RIA app and an HTML4/JQuery/Knockout.js app. My current skill set is definitely around Silverlight/wPF. Performance is a concern. Any quick thoughts on this?

  67. rafeie says:

    Dear Josh

    I read your amazing article about ‘Custom TreeView Layout in WPF’ at the CodeProject. You mentioned there that:

    “Unfortunately there is no supported way to programmatically set the selected item in a TreeView. The TreeView’s SelectedItem property does not have a setter. As a result, I could not customize the keyboard navigation for the TreeView…”

    I worked around this problem and fortunately succeeded. As an appreciation, I’d like to give it to you. Please e-mail me if you want it.


  68. Ali says:

    Hi josh
    I have question about some windows API techniques, it seems this place only for WPF question, can i have you’r email or other place to ask my question?


  69. mrvishrut says:

    Hi Josh, I have a question.

    My task is to create custom panel based canvas that will interact in design time (possible using PlacementAdapter and ParentAdapter abstract classes) and handle size/position of standard controls like TextBox or Label when such a control become child of the custom panel.

    I am looking for looking into PlacementAdapter and ParentAdapter classes examples.

    Any help is welcome in advance.

  70. Daniel Wiebe says:


    I was wondering if it was ok to use your code samples that you have on this site in a commercial application. I don’t see any license mentioned on your site for the code samples in your blog, so I have to ask. (my understanding, which could be flawed, is that if you don’t put a license on your code, then it is copyrighted by default and cannot be used without permission)


  71. Josh Smith says:


    Feel free to use the code, but if anything goes wrong and the code needs to be fixed or damage is done, I claim no responsibility. Use the code as-is.


  72. Daniel Wiebe says:


    Thank you! Much appreciated.


  73. Meg says:

    How do I get the treeview selecteditem to be displayed in another form?
    Fx. from your sample on customer/orders/orderdetails…
    is it possible to click one item from the ordetails, and display it on another form or grid etc. Let’s say if I want to click on “Glue” only and want to get the details on quantity on another form/grid displayed along “Glue”. Would you please help me?

    Thank you

  74. Valeria says:

    Hi Josh!
    I’m an italian .net developer.
    I’d like to ask you a technical question about drag&drop with listbox. Which is the best way, if it is not a problem, to contact you? Thank you so much


  75. Andreas says:

    thank you so much for all the effort you put into your articles

  76. Jared says:

    Hi Josh,

    For quite a number of years, I have been developing desktop applications using Winforms/MVP. When I switched to WPF/MVVM, I did find it a total turn around as far as development perspective is concerned. Perhaps one of the current hurdles I’m working on right now is the correct implementation of Modal Forms in WPF while maintaining pure MVVM implementation. I have seen a couple of articles online – most are using the code behind on the view/form – which should not be in MVVM. I appreciate you pointing me to the right direction here.

    you can email me

  77. lynda spiegel says:

    Josh – do you know any .NET developers with at least a year’s experience with iOS? I have a full time opening. Please contact Lynda Spiegel spiegwrite@gmail.com. Thanks

  78. MJ says:


    I have some C#/VB/Powerbuilder background and am wanting to move into WPF/Silverlight development. From your point of view, how is the market and future need for these technologies ? You seem to be doing okay. Thanks!

  79. Josh Smith says:


    That’s a tough question. It’s pretty widely known that Microsoft doesn’t consider WPF or Silverlight to be platforms worthy of much support and new features, and are on the retirement track. With that said, WPF and SL aren’t going anywhere anytime soon, and a lot of companies have systems that rely on those platforms for the presentation layer. So, you be the judge. Really…the whole Microsoft development world is topsy turvy these days, no one really knows what to expect. Windows 8 and WinRT with JavaScript and HTML5 support is a massive curveball for most front end MSFT devs. That’s part of the reason why I am now an iOS developer. 😉


  80. WPF Developer says:

    I would appreciate getting your feedback on what you think of this? Perhaps, it could help make WPF programming easier or more approachable for those who still may be resisting?:

  81. Abdulaziz says:

    Dear Josh
    our company are going its design pattern to MVVM

    we want to have some courses and get better knowledge related to mvvm and prism

    so please provide us with training courses that you better know
    or if you can provide training for us.

    regards and many thanks

  82. Abdulaziz says:

    Dear Josh
    our company are going to move its design pattern to MVVM

    we want to have some courses and get better knowledge related to mvvm and prism

    so please provide us with training courses that you better know
    or if you can provide us with a training session.

    let me know your answer.

    regards and many thanks

  83. Josh Smith says:

    Sorry Abdulaziz, I don’t do training. I’m not sure which companies provide good MVVM training, but I assume PluralSight would be a place to start.

  84. aaa says:


    Debug WPF like normal .NET application – it possible it? I mean, automatically jump to the offending code line. Why doesn’t this work with WPF? Answer would be greatly appreciated!

  85. AbdulAziz says:

    Dear Josh
    I would like to ask, I am using Linq to SQl in DAL, so is it possible to use auto-generated methods provided automatically by .dbml class in MVVM?

    also, can you provide me the a complete example of CRUD operations in MVVM using linq-to-sql , C#

    regards and many thanks

  86. Rafat Sarosh says:

    Just want to say thank you! I am greatly benefited by your contribution to blogs/codeproject.com etc. Keep it up.

  87. Andy Evans says:


    Thanks for the great samples you have provided. I have seen that you have said on the page to individuals that it’s OK for them to use the code samples that you have on this site in a commercial application with no restriction other than that the code is as-is and you have no responsibility if anything goes wrong. I have been asked to inquire specifically about confirming the same permission for use by my company, Philips (officially Koninklijke Philips Electronics N.V.).


  88. Josh Smith says:

    Andy, yes the same applies to your company.


  89. vjbk says:


    Can I provide a link to this site in one of my blogs that I am planning to post pretty soon?


  90. Josh Smith says:

    Sure thing, vjbk.

  91. Fred Zimmerman says:


    I tried to send you email on running source code (project) generating error message from 2009 MSDN article on MVVM.
    It got bounced back to me with invalid email address (from article).

    Fred Zimmerman (Reston, VA)

  92. Nik says:

    Hi Josh,

    I came across one of your articles on CodeProject.com, specifically the one entitled “Creating an Internationalized Wizard in WPF”. It has given me a good understanding for the ideas behind a wizard, however I have hit a stumbling block. I can’t seem to grasp how I can take the sample you provided and modify it. What I am trying to build is a wizard to entering default configuration information. One screen that requests username/password and the second step that asks for some default file locations. How can I utilise the ideas of your Wizard approach for fields that require user input rather than selecting of options?

    Many thanks for any help you can provide,


  93. Adam says:

    Hi Josh. I’m reviewing WPF using MVVM and found your article about it. Wondering if you know of any link to a conversion from this 2008 to 2010. It seems a chore to convert this while I am unable to find a copy of VB 2008 Express and I try to build this from your code in VB 2010 Express. Please. Some help? Thanks man. ~ Adam

  94. Steven says:

    Hi Josh… I came across your article “WPF Apps With The Model-View-ViewModel Design Pattern”. I’ve been struggling to get my application written using WPF, SQLite in the MVVM pattern. I found your article very useful, but am stuck on the
    “// In a real application, the data would come from an external source,
    // but for this demo let’s keep things simple and use a resource file.”

    … I’m looking to interface it to an SQLite database. Could you give me some pointers on what to change?
    Regards Steven

  95. Nice work bro. I love cracking. Pls upload installer.

  96. […] clearly seems to be an unwanted behavior, probably an issue. Josh Smith in his blog, explained a solution for this problem. But it is not so straightforward. Instead of […]

  97. Doug says:

    Josh. Hi. I’m a recruiter with a question. I need to test some candidates on their skill level with Winforms. We subscribe to Brainbench, but Brainbench doesn’t have a test for Winforms (or WPF and WCF either). Do you know if any testing services out there that provide tests on these subjects?

    Doug Balch

  98. Steve Newbery says:

    Hi Josh, I’m learning WPF and found your legendary article ‘WPF Apps With The Model-View-ViewModel Design Pattern’ in the Feb 2009 edition of MSDN Mag, but the link to the source code no longer works … would you happen to know where I can get it? I’ve scoured the internet with no luck so far. Many thanks Steve

  99. Hi Josh, I’m writing an article for MSDN Magazine that’s about Commands and WPF (with an interesting twist) – it has been accepted – would you be able to act as a reviewer?

  100. Josh Smith says:

    Congrats Tarquin! Thanks for asking, but I’m no longer a viable tech reviewer for WPF articles. It’s been years since I last cracked open Visual Studio or wrote XAML.

  101. What!!! I thought you were coding guru supreme. No doubt you’ve moved on to bigger and better things. Thanks anyway.

  102. Manoharan says:

    How to open and close popup window from parent in WPF using MVVM?

    Please see my below code,tell me the solution for issue.

    I create separate model,view,viewmodel for child usercontrol and parent usercontrol.

    I try to open the popup window from parent window.I create separate view,viewmodel for child usercontrol and used inside the popup control of parent usercontrol.

    I am getting issue and also how to close the popup window from the button click of child usercontrol.

    I am getting this below issue:
    A first chance exception of type ‘System.Windows.Markup.XamlParseException’ occurred in PresentationFramework.dll

    Additional information: ‘No matching constructor found on type ‘parentchild.View. ParentView.’. You can use the Arguments or FactoryMethod directives to construct this type.’ Line number ‘9’ and line position ’10’.

    If there is a handler for this exception, the program may be safely continued.

    Here I am using WPF using MVVM pattern with Prism Framework.



    public partial class parentView : UserControl
    public parentView(ParentViewModel parentViewModel)
    this.DataContext = parentViewModel;


    public class ParentViewModel : INotifyPropertyChanged
    private readonly IEventAggregator eventAggregator;

    private RumModel currenrumModel;

    private string resultMessage;

    private bool _popupIsOpen;

    public RumViewModel(IEventAggregator eventAggregator)
    currenrumModel = new RumModel();

    this.tosscardCommand = new DelegateCommand(this.Execute, this.CanExecute);

    if (eventAggregator == null) throw new ArgumentNullException(“eventAggregator”);
    this.eventAggregator = eventAggregator;

    public bool IsPopupIsOpen
    get { return _popupIsOpen; }
    _popupIsOpen = value;
    public RumModel currentRum
    return currenrumModel;
    currenrumModel = value;
    public bool tossButtonEnabled
    get { return this.currenrumModel.tossButtonIsEnabled; }
    this.currenrumModel.tossButtonIsEnabled = value;
    public Visibility popupVisibility
    get { return this.currenrumModel.popupVisibility; }
    this.currenrumModel.popupVisibility = value;
    #region commands
    public ICommand tosscardCommand { get; private set; }
    public ICommand cancelGameCommand { get; private set; }

    private bool CanExecute(object arg)
    return true;


    private void Execute(object arg)
    popupVisibility = Visibility.Visible;
    IsPopupIsOpen = true;
    eventAggregator.GetEvent().Subscribe(PopupAction, ThreadOption.UIThread);

    private void PopupAction(bool popup)
    IsPopupIsOpen = popup;
    private void RaiseCanExecuteChanged()
    DelegateCommand tosscommand = tosscardCommand as DelegateCommand;

    #region INotifyPropertyChanged Members

    public event PropertyChangedEventHandler PropertyChanged;

    private void NotifyPropertyChanged(string propertyName)
    if (this.PropertyChanged != null)
    this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));



    public partial class ChildWindowView : UserControl
    public ChildWindowView(ChildWindowView child)

    this.DataContext = child;


    public class ChildWindowViewModel : INotifyPropertyChanged, IInteractionRequestAware
    private ChildWindowModel currentChildWindow;
    private readonly IEventAggregator eventAggregator;
    private IService service;

    public ChildWindowViewModel(IEventAggregator eventAggregator,IService service)
    currentChildWindow = new ChildWindowModel();
    this.eventAggregator = eventAggregator;
    this.service = service;

    this.SubmitCommand = new DelegateCommand(this.OnSubmit, this.CanSubmit);
    private void RaiseCanExecuteChanged()
    DelegateCommand command = SubmitCommand as DelegateCommand;

    public ChildWindowModel currentTimer
    return currentTimer;
    currentTimer = value;

    public string setTimer
    get { return this.currentChildWindow.setTimer; }
    if (this.currentChildWindow.setTimer != value)
    this.currentChildWindow.setTimer = value;
    public string errMessage
    get { return this.currentChildWindow.errMessage; }
    if (this.currentChildWindow.errMessage != value)
    this.currentChildWindow.errMessage = value;
    public ICommand SubmitCommand { get; private set; }

    private bool CanSubmit(object arg)
    return true;

    private void OnSubmit(object arg)


    if (string.IsNullOrEmpty(setTimer))
    this.errMessage = “Please enter Rescheduler Timer value”;

    if (this.FinishInteraction != null)

    catch (Exception ex)
    throw ex;
    public Action FinishInteraction { get; set; }
    public INotification Notification { get; set; }

    #region INotifyPropertyChanged Members

    public event PropertyChangedEventHandler PropertyChanged;

    private void NotifyPropertyChanged(string propertyName)
    if (this.PropertyChanged != null)
    this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));


  103. Vijay says:

    The constructor of the view (child and parent in your case) needs to have a default empty constructor with InitializeComponent in it. In your case both the views don’t have the default constructor and hence the issue.

    There are other ways to assign the DataContext of the view to the view model. If you use the Dependency Injection it will be easier to create these view models on the fly and assign the data context of the view to the view model.

    Looking at your code, looks like you are using Prism’s IEventAggregator, isn’t that right? If so, then you can use Export attributes on your view model and inject them into the Views by using the overridden constructor with the ImportingConstructor attribute on your view.

    Hope this helps. Let me know if you need anything.

  104. Richard Fencel says:

    I have posted on Codeplex a WPF utility that shows an app’s MVVM architecture in a tree-structured layout and also reports in real-time all data binding updates. If interested, you can download it at coderay.codeplex.com.

  105. […] About | josh smith on wpf Description: So josh, i just wanted to find out if you’ve ever thought about interviewing for microsoft? we’ve got open positions for wpf and wpf/e evangelists right now.. Post Title : About | josh smith on wpf Source : joshsmithonwpf.wordpress.com Read More : About | josh smith on wpf […]

  106. […] About | Josh Smith on WPF> So josh, i just wanted to find out if you’ve ever thought about interviewing for microsoft? we’ve got open positions for wpf and wpf/e evangelists right now.. Source : About | josh smith on wpf […]

  107. Alam Khan says:

    Hi Josh i need your help on “Dragging Elements in a Canvas” i had implemented your code and its working fine, but i need to add few more things with this code, can you please help me out with the same, its very urgent.
    1) The controls should not overlap each other when dragged.
    2) Resizing with ResizingAdorner

    I am very new to wpf, xaml, c# please help me out. i am looking for solution since last 10-15 days.

  108. Hi Josh,

    There is a problem (may be not i am not sure) in RelayCommand. Whenever i use a method which has byte[] parameter, it is not called by messenger (ui dispatcher has gone). It is ok other type parameters. I have tested on mvvm light 4.2 and 5.1.1

    ********** this area is inside of some method which is executed from some task method *************
    byte[] array = new byte[] { 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20 };
    RelayCommand okCommand3 = new RelayCommand(() => deneme(array));

    **** this is helper method which generates viewmodel and send relaycommand******

    var confirmMessage = SimpleIoc.Default.GetInstance();
    confirmMessage.Info = message;
    confirmMessage.OkCommand = okCommand;

    DispatcherHelper.UIDispatcher.BeginInvoke(new ThreadStart(() =>

    ********** Here is the actual method should be called **************

    private void deneme(byte[] a)

  109. There are some typos. But it does not matter. Problem is about parameter type (byte[])


    okCommand3 should be okCommand

    SimpleIoc.Default.GetInstance(); should be SimpleIoc.Default.GetInstance();

  110. var confirmMessage = SimpleIoc.Default.GetInstance˂confirmMessageViewModel˃();

  111. I found the reason. The reason is the variable which i passes to method inside RelayCommand. It should be about weak references.

  112. Filippo Riccio says:

    Hi Josh Smith,

    I hope that you can help me with my WPF Project.

    I created a WPF application by using MVVM pattern design. The main view contains a tabcontrol and each item has a different View / ViewModel.

    In one of These ViewModel I implemented the IDataErrorInfo Interface to validate properties. The Validation works as I can see when I fix breakpoints, but the error Messages do not appear on the Screen if the properties are not valid at the beginning.

    To reproduce the error Messages I Need to choose correct values at the beginning and after that the error Messages appear.

    Moreover, What is very strange is that I have no Problem if I use only one view and not different views for any item.

    Have you some suggestions? If you Need I can send you the Code.

    Thank you very much in advance.

  113. Dear Josh,

    I have been asked to write a book about WPF and I feel that it wouldn’t be complete without mentioning the RelayCommand that I believe you created. Would you be kind enough to give me permission to display the source code for it, along with an attribution to your good self of course?

    Many thanks and kind regards,

    Sheridan Yuen

  114. Josh Smith says:

    Sheridan, sure you can use that class in your book. Thanks for asking.

  115. jerry ding says:

    Hi Josh,

    I am a project manager with mechanical background. Programmers in my team have very different idesa about how to implement MVVM for our new software UI design. The discussion getting hot so I asked them to put the discussion into a document that I can go out find Guru opinions for them. Can you help us on that. We are open for consulting fee and etc.

    Best Regards,


  116. Stefan Bohn says:

    Hi Josh,

    I just started to work with C#, WPF and MVVM.

    I like your 2009 article on MSDN Magazine (https://joshsmithonwpf.wordpress.com/2009/01/27/my-mvvm-article-in-msdn-magazine/), but sadly the source code is not available anymore.

    Can you give me a hint, where to download the source code nowadays?


  117. Sergey says:

    Hi, Josh,

    Thank you very much for your work on MVVMlight. Can you please help with one question: I am working on MVVMlight based iOS/Android application, and getting error “Method ‘GalaSoft.MvvmLight.Command.RelayCommand..ctor’ not found.” (MissingMemberExtension) in Android version, iOS version works fine :-). Can you please let me know what can be a reason or this. I’ve tried reinstalled packages.


  118. Konstantin says:

    Dear Josh,

    I would like to join the request for source code of your MSDN Magazine article from 2009. I have hard times on realization of tabbed UI for application. I think, it would help me a lot.

    Thank you.

  119. Teodoro Marinucci says:

    Dear Josh,
    I must confess that I’m not a guru of C#, so, with your sample “TreeViewWithViewModelDemo” I’m lost !
    You fill the list of the regions by a
    return new Region[]
    new Region(“Northeast”),
    new Region(“Midwest”)
    but … what if the number of regions (derived from a database) varies?
    More: the name of each region is a string:
    while (rdr.Read())
    str = rdr[“name”].ToString();
    How can I start to work with this ?

  120. Mat says:

    Hi Josh,

    do you think you could upload the example application for your amazing article “WPF Apps With The Model-View-ViewModel Design Pattern” of the MSDN Magazine? It seems that the magazine’s archive no longer holds older code samples. Maybe you still have it somewhere on your disk 🙂

    It would be really great to see your code and relate it to the article!

  121. Hi, Josh. I al learning MVVM and saw your nice article in the Microsoft magazine ( Feb. 2009) Thee source is no longer available? could you e-mail it to me? johannesv@reutech.co.za

  122. Gerhard Kreuzer says:

    Hi Josh,
    you wrote the article ‘WPF Apps With The Model-View-ViewModel Design Pattern’ back in 2009 (January). Is the source of the sample app available for playing around?

    Thanks a lot.

    With best regards


  123. Prince says:

    Hello Josh,
    I’m trying to conclude a little investigation on whether you’re a computer or not :). This link argues that you are not,
    (https://msdn.microsoft.com/en-us/magazine/dd419663.aspx). Beautiful post from 2009! Great work so far!

    Please just like the last few comments have requested, please provide a source file for that topic is it’s still available.

    Thanks a lot.

  124. Josh Smith says:

    I don’t have the source code. Please contact MSDN to see if they have it.

  125. Beatrix says:

    Hi Josh,
    I’ve just found this really useful code:

    My only problem is I’ve changed the source list to a LINQ result, and no idea why it won’t refresh as I type. I had to modify a lot in the code, but since I am not a programmer, just a hobbist, I have no idea how the TextSearchFilter is connected to the items in the textbox.
    that databinding won’t work for me. I’d appreciate if you could help, this is not for commercial use, just 4 fun.
    However I’ll try the code with a shorter list and debug… maybe…

    Thank you,

  126. Amanda says:

    Dear Josh,

    This is not a request for debugging assistance.

    I’m an Australian reader of your Advanced MVVM, purchased recently on Amazon (Australia). There was a hard copy available (my preferred way to work with programming texts – ironic, I know…), but you had noted that version is not sold by you.

    To ensure you receive the royalties, I purchased the eBook and now I wish to print parts of it.

    It is discouraging to find Amazon DRM is completely blocking this option. Did you know this is would be the case? I have provided my email on the off chance that another version of the book is available through you.

    Good luck ^_^

  127. Clement Chi says:

    Do you happen to have the source code for “Patterns – WPF Apps With The Model-View-ViewModel Design Pattern” published by MSDN in February 2009. Microsoft appear to have removed it from the MSDN site ?

    Clement Chi

  128. Mike says:

    Hi Josh,
    I’m following along with your Data and WPF article, but am stuck at the section “Working with Collection Views” (https://msdn.microsoft.com/magazine/cc700358).

    I tried to apply this concept to the list of FullNames from the previous examples (which I set to variable “names”).

    I added the following XAML:

    I also added a button, which on click, should print out whatever last name I have selected:
    ICollectionView view = CollectionViewSource.GetDefaultView(names);
    FullName selectedName = view.CurrentItem as FullName;
    //print selectedName.LastName

    However, regardless of my selection, it always prints the value in names[0].LastName. Anything stand out to you as being wrong here?

    Thank you,

  129. Mike says:

    Should have seen that coming with the tags… here’s an outline of the XAML:
    ListBox IsSynchronizedWithCurrentItem=”True”
    TextBlock Text=”{Binding LastName}”

  130. Brad says:

    Hey john, we were recently found a .exe file with the name BubbleBurst.exe


    which seems thats a game that you have written, we are wondering what protector have you used to pack this program since its really obfuscated, we just want to know what is the name of the protector/packer that you have used because its matching with some of our yara rules for suspicious packers?


  131. Roger Schlueter says:

    Josh, what tool did you use to draw the charts in the famous MVVM article? I’d like to create similar charts to document so of my work.

    Thanks in advance.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: