VS2010 C# WPF - cannot use Properties window RRS feed

  • Question

  • I recently downloaded VS 2010 and have been using C# with WinForms trouble-free.

    Today I tried a first stab at a WPF application and immediately hit a fundamental problem.

    As an example, I create a new WPF project and add a label (or any control).  If I now go to the Properties window to set, say the textual content of the label, immediately I touch anything in the Properties window, even just the scroll buttons or try to change from alphabetic to categorized view, the properties all vanish and the Design window reports System.Argument Exception,  An item with the same key has already been added.

    I get exactly the same result whatever control I add, and if I reload the Designer window, or quit and reload C#.

    I also tried opening a VS 2008 simple Hello project and converted that to 2010.  It converted OK and would build and run without problem, but again if I touched the Properties window ... same result as above.

    Any idea what is going on, please?  I'm suspecting a corrupt installation, but don't want to repeat that rather lengthy operation unnecessarily!

    Bill Hardwick

    PS    In case it helps shed any light (it doesn't for me), I can make changes to the form using the XAML mark-up, it's jsut the Properties window that seems inoperable.

    • Moved by Jackie-Sun Wednesday, August 10, 2011 5:14 AM WPF related (From:Visual C# General)
    Monday, August 8, 2011 10:15 AM

All replies

  • Click exactly with the "<Label" and check the property window
    Muthu Krishnan.R Use only what you need, Reduce global warming
    Monday, August 8, 2011 11:09 AM
  • Thanks Muthu, but I'm afraid it doesn't help.

    I can successfully select the label by clicking on it in the Design window or clicking on the "<Label tag in the XAML window.  In both cases the Properties window reflects the correct control and the properties you can see are as you would expect.  However, immediately I touch anything in the Properties window, I get the error reported above.

    Monday, August 8, 2011 11:16 AM
  • Can you send me entire screenshot
    Muthu Krishnan.R Use only what you need, Reduce global warming
    Monday, August 8, 2011 11:31 AM
  • Sorry it's so long, but here is a shot of the window with the control selected



    ... and here (with a lot of pasting to get around the 2 images only restriction) is what happened as soon as I clicked the button in the Properties window just to change from an Alphabetic list of properties to a Categorized one (same happens if I move the scroll bar, select any property, whatever):


    I hope this helps you more than it did me!  Thanks again.


    Monday, August 8, 2011 12:09 PM
  • I move it to Visual Studio WPF Designer Forum for better support.


    Good day,

    Jackie Sun [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, August 10, 2011 5:15 AM
  • Thanks Jackie - sadly I'm not getting any further responses though.

    A further thought occurred to me this morning.  I've just tried the same thing in Visual Basic and get exactly the same result: create a new WPF project, add a button, click on the button to change to categorized rather than alphabetic properties (or any other active control in the Properties window) and immediately the same error message appears.

    I am now convinced this is due to a corrupt installation.  Given that it is happening in both C# and VB, can anyone suggest what is the minimum uninstall/download cycle I need to go through to remove this error - or better still, is there a Repair tool somewhere that will sort it out for me?

    Friday, August 12, 2011 7:22 AM
  • Hello Bill,

    I was wondering if you ever found a solution to this issue.  I am having this exact same problem and haven't been able to find a solution on the web.  The only work around to this that I have figured out is to modify properties directly in the XAML.  Which is fine but I am not yet proficient with XAML and need the designer for most of my stuff.

    Thanks for your help


    • Edited by QueensPawn Tuesday, November 27, 2012 4:23 PM
    Tuesday, November 27, 2012 4:19 PM