locked
Visual Studio 2012 WPF / WinForms RRS feed

  • Question

  • Hi, I have been building C# WinForms programs for a good few years now and consider myself fairly skilled at this. However I have now taken on a project that requires a lot of 'custom' controls - these are mainly standard controls but with a different visual appearance, such as gradients etc... I know I can do this in WinForms but it has typically been a pain, and producing lots of unwanted flicker etc... so I thought it was an ideal WPF project.

    I haven't done much WPF stuff before but it seems pretty straight forward, except the design environment seems so slow. Opening a new project can take a few minutes, dragging stuff from the toolbox (for example an image) to the form can take a while before it appears, and longer to see its properties. Copy & pasting seems to take forever. Pretty much everything is slow! It's unusable - but starting a WinForms project is absolutely fine!

    What's going on!?

    Friday, September 19, 2014 1:32 PM

Answers

  • Hi Microhid84,

    For the unwanted flicker in WinForm project, I think that it is related the project itself rather than VS, so I suggest consulting your issue on Windows Forms general forum: http://social.msdn.microsoft.com/Forums/windows/en-US/home?forum=winforms Windows Forms experts can provide you better support. Also you can provide a simple repro to Wyck who is willing to help you fix it, Wyck is really friendly and helped many people in MSDN forums.

    For the slow performance in WPF project, as Wyck said, I don’t find WPF to be so slow on my side, maybe it is related to the VS environment on your machine.

    Please reboot your PC and run VS admin then work with WPF project.

    I also recommend resetting your VS settings through Tools->Import and Export settings->Reset all settings->…. And run VS under safe mode using devenv.exe /safemode(http://msdn.microsoft.com/en-us/library/ms241278(v=vs.110).aspx ) to avoid the impact from some third-party VSPackages.

    If the issue will disappear under safe mode, you need to disable those third-party VSPackages from Visual Studio Tools->Extensions and Updates.

    In addition, please make sure you have enough memory on your machine and check the CPU and Memory usage of Visual Studio process in Task Manager to see whether they are very high and check what processed are consuming high CPU and Memory.

    Best regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Proposed as answer by Amanda Zhu Thursday, September 25, 2014 1:51 AM
    • Marked as answer by Amanda Zhu Monday, September 29, 2014 1:41 AM
    Monday, September 22, 2014 10:13 AM

All replies

  • Set DoubleBuffer to true and you should get no flicker.
    Friday, September 19, 2014 2:25 PM
  • Yeah have done all of that, it still flickers... my main question is really why WPF is slow at design time?
    Friday, September 19, 2014 2:54 PM
  • I understand that you're asking about WPF and that I'm focussing on something different from what you want.  So please forgive me, but I'm interested in this flickering because I think can help you with that.  You're doing something wrong if it flickers.  Maybe you can post a simple repro for a flickering control and I'll fix it for you.

    If you're following all the rules and you still get flickering in WinForms, then I have no reason to believe you won't still get flickering when you go to WPF.  

    ...unless what you describe as "unwanted flicker etc..." is not what I understand it to be.

    Regardless...I don't find WPF to be that slow.  Are you on a laptop?  Do you have a reasonable GPU?

    Friday, September 19, 2014 5:27 PM
  • Hi Microhid84,

    For the unwanted flicker in WinForm project, I think that it is related the project itself rather than VS, so I suggest consulting your issue on Windows Forms general forum: http://social.msdn.microsoft.com/Forums/windows/en-US/home?forum=winforms Windows Forms experts can provide you better support. Also you can provide a simple repro to Wyck who is willing to help you fix it, Wyck is really friendly and helped many people in MSDN forums.

    For the slow performance in WPF project, as Wyck said, I don’t find WPF to be so slow on my side, maybe it is related to the VS environment on your machine.

    Please reboot your PC and run VS admin then work with WPF project.

    I also recommend resetting your VS settings through Tools->Import and Export settings->Reset all settings->…. And run VS under safe mode using devenv.exe /safemode(http://msdn.microsoft.com/en-us/library/ms241278(v=vs.110).aspx ) to avoid the impact from some third-party VSPackages.

    If the issue will disappear under safe mode, you need to disable those third-party VSPackages from Visual Studio Tools->Extensions and Updates.

    In addition, please make sure you have enough memory on your machine and check the CPU and Memory usage of Visual Studio process in Task Manager to see whether they are very high and check what processed are consuming high CPU and Memory.

    Best regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Proposed as answer by Amanda Zhu Thursday, September 25, 2014 1:51 AM
    • Marked as answer by Amanda Zhu Monday, September 29, 2014 1:41 AM
    Monday, September 22, 2014 10:13 AM