WPF designtime code - wpf

Does anybody know any pointers to knowledgebase for how to write design-time experience (i.e. VisualStudio 2008 design time) for WPF controls please?
There are loads of references for creating the design-time code for Windows Forms controls, but hardly any for WPF ones.
I have googled a lot for this, but with no good results.
Please help.

See the series at http://blogs.msdn.com/jnak/archive/2007/08/16/adding-menuactions-think-designerverbs-to-cider-s-right-click-contextmenu.aspx

Related

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.

Convert Silverlight App to WPF

I need to convert a Silverlight App to WPF (to finally run it on Microsoft Surface 1.0).
I didn't write the original solution and it is quite big. I've never worked with Silverlight and I'm just a little bit familiar with WPF.
Can you offer some advice on completing this project?
Here's my current plan (high level view):
Recreate all Silverlight projects in WPF (User Control in Silverlight = WPF User Control Library ?)
References are not the same so I'll need to make some changes ... I think :)
Hope all controls are compatible with WPF ...
Have I missed something big? Is something wrong? Incomplete?
I'm open to all your suggestions and advice!
Any development tips ?
I recently converted a Silverlight app to WPF. You can find my notes on how I did it here:
http://robertsmyth.blogspot.com.au/2011/12/migrating-from-silverlight-to-wpf.html
Hope it helps you.
"User Control in Silverlight = WPF User Control Library ?" Not exactly.
which version of silverlight do you use? Most difficult issue I have faced while porting WPF to Silverlight was with converters. Silverlight 4.0 or lower doesn't support Ancestor RelativeSource Binding. But supported in Silverlight 5!
Hope this link will help you. WPF and Silverlight 2 Compatibility

First dabble in WPF using VS2010 and Expression

I am looking at using WPF for the GUI side of an upcoming project.
I know I have a huge decision to make on WPF vs. Win forms, but before I can make that decision I want to have a play around with a few simple WPF programs.
I have read a few posts online that say Visual Studio (2008 at the time of the post) lacked somewhat in editing the XAML and they recommended using MS Expression?
Questions are:-
I have VS2010, Has this fixed the lacklustre XAML editing present in VS2008?
Which product in Expression studio is used instead to edit the XAML?
Is the idea that you build the code side of the WPF in VS and Build up the XAML in Expression the copy the generated XAML into VS?
Any suggestions/tips on combining Expression and VS2010 would be appreciated.
Kind Regards
Ash
VS2010 has a much better enviroment for supporting XAML compared to VS2008 (in VS2008 it really was not the greatest experience) - so it would be possible to play around with some basic projects straight in VS2010...
Expression Blend really shows it power when you get into animations and transitions etc (Expression Blend to me would be the starting space in the Expression suite once you had covered the basics in VS2010).
The approach I would take is to get basic exposure in a tool/ide you are used to like VS2010, and then go through some of the Blend examples/tutorials that are available off the Expression Website to then take it to the next level.
The things that got me sold on WPF/Silverlight were databinding, separation of concerns using the MVVM pattern and commanding... it just seemed easier than what I was achieving in the winforms arena and cleaner... but it took a while before I was sold on it just because I was used to the winforms way of things and was trying to do WPF but with a Winforms approach.
For basic projects you could build the code and XAML all directly in VS2010. In fact for someone learning XAML for the first time who comes from a code centric perspective, coding XAML directly in VS2010 might be beneficial so that you get used to the basic syntax before you work in a tool like Expression Blend where that can be hidden from the developer.
use VS2010, it has much better intellisense support for XAML (and better support for large solutions >50 projects).
also you dont copy over files between Expression blend and VS2010, both open the same solution work on the same solution (Blend now has support for source contorl as well), you can flip to show the C# in Blend and vice versa in VS2010

WPF Creation versus Visual Studio Creation

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.

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