Building Visual studio like application, need inputs - wpf

I am working on a Visual studio like application i.e. have a toolbox, an editor and property grid similar to VS.
User can drag and drop the controls(custom and third party) to the editor window and perform operations like resize, move, align, group etc.; Properties of that control needs to be displayed in property grid and user can update them from there.
As per my current understanding I will have to extend the Canvas to create my own editor and and Interface for controls which it supports; Each supported control will have to implement this interface so that it can be placed in our editor.
Something similar to this - http://www.codeproject.com/KB/WPF/WPFDiagramDesigner_Part4.aspx
Looking forward for any kind of help, comment or links.

If WPF is a requirement, wait for the VS2010 release and use the Visual Studio Shell in either isolated mode or integrated mode. Otherwise you can use the Visual Studio 2008 Shell isolated or integrated.
You'll get the docking support, addin model, editors with highlight and much more almost for free that way.

Finally, I used the Diagram designer approch to build my application. Although, I had to create my custom property grid which was painful.
Recently I came across following post which suggests that .Net DesignSurface can be used for building this kind of application -
How to create an UI Designer utility?

I have been working on a generic framework Wide to create VS like applications.
Update: Here is the CodeProject article on how to use the framework.
Wide comes with two modules and various out of the box functions:
Core module (Required)
Used for customizable splash screen
Used for Menus (supports regular menus with icon, checkable menus)
Used for Toolbar (menu view model can be reused for toolbars)
Multiple toolbars can be added to the IDE (check demo)
Themes (VS2010, VS2012 Light theme and no theme)
ThemeManager to add/remove themes
Used for Statusbar (in development)
Open file service with participatory handlers (could be based on extension or even file contents)
Save and restore layout along with opening documents
Logger module (For the logging tool)

Related

Toolbar Icons usage in Visual Studio 2010 Express

I am porting a Linux Mono/GTK application to MS.NET/WPF. The application uses a toolbar, which I could have sworn VS had built in support for adding icons to through the WYSIWYG designer.
However, firstly, in the "Items" property, the add button is greyed out. I did some research and found that I could add <Button></Button> tags directly to the XAML, however, I still couldn't figure out how to add icons. I'd like to use the default Windows icons.
I then found that you had to add <Image></Image> tags to create typical icon based toolbar items, however, I didn't know where to find the default windows icons.
I read on a different stack exchange post that they are available in C:\Program Files\Microsoft Visual Studio 10.0\Common7\VS2010ImageLibrary\1033\VS2010ImageLibrary.zip
However, I am stuck with VS Express edition, and according to the MSDN website this archive doesn't exist in VSE.
My question is this: is there any way to use the default Windows icons?
Also, is it possible I've missed something? How do most people handle toolbars?
All the system icons are not saved in the same place. They are spread across multiple dlls.
List of Windows 7 icons stored in imageres.dll is one such place. You can google for other stuff.
One you have the dll from which you want to create the WPF Image you can use Imaging.CreateBitmapSourceFromHIcon function after using LoadIcon

How can I make a WPF custom control automatically appear in the Visual studio toolbox?

If I create a WPF user control, it appears automatically in the Visual Studio toolbox.
Is there a way to make other controls appear automatically in the Visual Studio toolbox?
Conversely, is there a way to hide a user control from the toolbox?
You can right click on the toolbox and select Choose Items... Then from there you will get a dialog that allows you to select which controls to show or hide.
Per comment below if you are trying to figure out how to do this for a Third Party that you are providing your control to check out this MSDN article that describes packaging your control:
http://msdn.microsoft.com/en-us/library/ms165358.aspx
Auto population is described here (at the end), but to summarize you can add DesignTimeVisible(false) to your UserControl to prevent it from being added to the Toolbox.
Your controls should be added just like your UserControls, assuming they meet the requirements at the end of the link above, which are:
To appear in the Auto-Population
Toolbox process a type must derive
from FrameworkElement and:
Are public and have a default public or internal constructor or are
internal and have either a default
public or internal constructor
Types deriving from Window or Page are ignored
FrameworkElements in other .exe projects are ignore
Internal classes will only be displayed when the active designer is
for an item in the same project
Friend Assemblies are not taken into account for Toolbox
Auto-Population
If you are building reusable controls (where your end-users will simply add a reference to your assembly), then you'd need to tell Visual Studio that it should load your controls into the Toolbox. There is a tutorial for WinForms controls on doing this here, but the concepts are the same. A VSIX installer tutorial can be found here.
A lot of the resources out there are for older versions of Visual Studio, but again the same concepts should apply. You simply need to update version information where appropriate.

WPF application with context sensitive toolbar

I want to design an application much like Visual studio where the toolbars are context sensitive to the workspace area and their are common toolbars which have context sensitive functionality like cut, copy, paste (for these I can have application commands), comment selected (custom commands).
I want to keep the workspace unaware of toolbar controls.
I tried using custom routed commands but it only works on parents in the visual tree (bubble routing strategy) however my toolbar and workspace are on the same level in the shell.
Are their specific patterns (I am sure there must be) for designing such an application in WPF?
I implemented a simple version of what you described, where a toolbar had options that were context sensitive and were simply shown or hidden. The application used the MVVM pattern, so my toolbar had a view model. I leverage the message bus (sometimes called event aggregator) to publish messages which the toolbar's view model could react to.

How to create a control like Solution Explorer in Visual Studio?

I want to create control that seems and works like the Solution Explorer of Visual Studio.
I mean not the functionality of solution explorer, the control should be seems like that control. That means, server explorer, toolbox, error List,... All these controls will pop-out when we put mouse and pop-in when we leave. We can lock and unlock those controls also.
So can anyone help me, to get the solution for this problem.
Thanks!!!!!!!!!!!
I am assuming you are using C#/VB.NET for development. The dockpanel suite will provide a docking framework for an application. Basically in terms of dockpanel, it is the forms which can be docked on the application using drag and drop like visual studio.
So create a treeview control in the form and dock it to the parent. You can populate the treeview control based on file directories or any specific needs of your project. Please note in dockpanel you create a form by not inheriting from Form class but from DockContent class. Documentation will give you more insight of how to create applications. It has a good example along with the source code in which it simulates the all the visual studio panes. It also provides and option to save the position of various docks which can act as a user preference. For eg, you may like to position solution explorer on left side whereas i may want it on right side. this get stored in a conf file which gets read next time when you start the application.
Incase you using MFC, then visual studio 2008 SP1 provides you with docking framwork and within that use the treeview control.
XAML also provides a docking framework. But i am not sure, you need to verify.
Win32 API does not have any native docking framework.

Custom silverlight user controls do not appear in Blend Assets tab

I've created a control in blend (xaml and code behind), saved it, and rebuilt the entire project. Now, not only does this new control not appear in the Assets tab in blend, none of the other user controls i've created appear either. I've rebuilt several times, blown away the obj and bin directories and rebuilt again, to no avail. How do I get my user controls to appear in the Assets pane so I can use them in my project?
thanks
Blend: 3.0.1927.0
VS: 9.0.30729.4108 QFE
.NET: 3.5 SP1
Sweeney,
I don't have the specifics of your install environment or applications installed, but using what I have, I can create a custom user control in blend and compile, pull it from my assets library, and put it on my page. Here are my specs, maybe you can check to see if you're running a different version or such:
Microsoft Expression Blend 2 Service Pack 1 - Version 2.1.1760.0
Microsoft Visual Studio 2008 - Version 9.0.30729.1 SP
Microsoft .NET Framework - Version 3.5 SP1
Here is what I did to create my custom control:
Open Blend.
Create new project (File > New Project..., Then named my Silverlight 2 Application, and clicked OK.)
Create new UserControl (File > New Item..., Then named my UserControl, and clicked OK.)
Create something like a colored background and text so that the control can be seen.
Build the application.
Add my custom control to the Page.xaml file from the Asset Library. (This may be where you got tripped up, please see below).
Size my new control.
Final product:
Screen Shot http://img163.imageshack.us/img163/7554/finalproduct.jpg
Accessing Custom Controls in Asset Library
Click the Asset Library icon (left side by default): Asset Library http://img43.imageshack.us/img43/2198/assetlibrary.jpg
Click the Custom Controls tab (top of Asset Library window): Custom Controls http://img5.imageshack.us/img5/8915/clickcustomcontrols.jpg
Select your custom control: Custom Control http://img693.imageshack.us/img693/1684/customcontrol.jpg
Place them on your page to your hearts content.
I hope this helps you,
Thanks!

Resources