WPF Creation versus Visual Studio Creation - wpf

I created a form in WPF and it looked great. When I opened it in Visual Studio 2010, it look alot different than what I created.
Any ideas why this would happen? Should I ignore how it shows up in VS? This makes me wonder if either is how the user will actually see it.
Any suggestions?
Thanks again!
Eroc

The Visual Studio view of your WPF form is the designer view. Designer views of WPF forms, or really any other design of a UI component, will often differ in dislpay vs. the actual running component. Some of these differences are intentional to make design easier and some are just limitations of not having the WPF element actually running in a program (lack of certain runtime data bindings for example).
I wouldn't worry about it unless it starts looking incorrect when running.

Related

Exporting contents of Visual Studio Designer view to an image

I'm designing a UI in WPF and want to be able to share the progress with a client. I could run the program and take a screenshot (Snipping Tool, etc.) or do the same with the results in the designer window. However, ideally I would like to avoid those manual steps (e.g. running the program, scaling the designer window to fit the entire UI, selecting the proper screen area to capture), because the designer has already rendered the UI for me. I'm wondering if there exists a more convenient way to export what is already rendered for me in the Visual Studio 2015 XAML designer window directly to a high quality image. I couldn't find (by looking through VS and search engines) an obvious way to do it, but perhaps someone knows of a way (or plugin/extension)?

XAML designer in visual studio cannot display anything

Why is it that every time I open a user control or anything a little more complicated than simple markup, Visual studio is unable to display it in the designer? Sometimes I have a form where there are several elements, but all the designer displays is a rectangle? How does one work on more complicated pages with XAML?
If you use Binding in XAML, VS designer invokes the binded object as a compiled manner like part of your program being executed. At this time, if the binded object does not prepare any fake data programatically which gives null in general, VS designer is failed to render UI because it is treated as NullReferenceException during rendering process.
Those fake data is called design-time data in XAML.
To prepare design-time fake data for UI, please check this link: https://stackoverflow.com/a/11561369/361100
In my experience, Visual Studio's designer is almost completely useless for anything more complicated than the simplest designs. Have you tried using Blend? It actually works (most of the time.)

When to use Blend for a WPF developer?

I'm a WPF developer and use VS Pro 2012 everyday for UI adjusting and coding. I installed Blend for Visual Studio but I never used it (just launched it by accident several times).
I'm afraid that I missed something by not using Blend. If I did miss something, what is it then?
Blend lets you design WPF UI, create controls and determine their behaviors visually (by UI), and Visual studio lets you do that programatically.
There is nothing you can do in blend, that you can't do in visual studio.
It is a tool for people who are less comfortable using code, and more comfortable using a cool UI to create custom controls and behaviors and design thier UI
In Visual Studio 2012 and later, the WPF UI designer is Blend; it's actually loaded in the background and accessed through out-of-process COM interfaces. This is part of the reason its behavior can be a bit bizarre at times, why you get messages about being able to edit the XAML while the design surface is loading.
If you're used to VS form builders you're going to be fine with Visual Studio.

Strange Design Problems With Infragistics Controls

I'm working on an existing WinForms application and I am having some weird issues with Infragistics controls in a WinForms app.
When I open a form or usercontrol in the project that has Infragistics controls on it, it looks like
this http://sdrv.ms/S7gvmS
I cannot access any of the controls in the design surface. Clicking does nothing. And, all of the controls appear in the lower area.
So I created a new test solution and dropped some Infragisstics controls on and got this http://sdrv.ms/SRdo2y
Anyone know what's going on?
When I've run in to similar issues before it's tended to be a license or version problem, the Infragistics libraries contain code stopping them working at design-time if a valid license isn't installed. To resolve this, I'd first recommend deleting all of the *.licx files in your solution. These can be easily corrupted especially if you're using source control and should be regenerated correctly when you go in at design time. If that fails, then I'd try uninstalling and reinstalling Infragistics ensuring the version installed matches those of your projects' reference.
P.S. Realise this is far too late to help the original poster but hopefully will help people coming across similar issues in the future.
This happens when Visual Studio cannot find the Design assembly. The components refer to a designer and if Visual Studio cannot find the designer, it makes the assumption that the object is a component instead of a control and places it in the system tray.
Typically, this indicates that something when wrong with your installation of the components, so the usual solution is to re-install.

visual studio 2008 IDE not displaying UI control properties

When I return from debug mode, my visual studio 2008 environment takes a really long time to display the properties of a UI control (e.g. text box) I click on.
why does this happen? Is there a hotfix or update for this from microsoft?
Thanks for any help in advance.
Subbu
If you are using WPF, then this might be normal :) VS doesn't have a very quick WPF UI designer. Get Expression Blend, its designed for such things. If you're using WinForms, I'm not sure. I've often felt slowdowns when using 3rd party WinForms controls, such as Telerik or DevComponent's DotNetBar, but it is because references to these controls bring in huge DLL's of which you often only use a small portion of. It leads to bloat, which can slow down a UI designer. Hope this helps.

Resources