I hav created a lib which reads an XAML file and generates a HUD for a game. So, now anyone can use WPF projects in visual studio to design and create a simple HUD. After that the XAML file is loaded to my lib and the HUD is created using directX. Thats the basic idea of it.
Now I want to let users create the XAML file using our own GUI editor project, without creating WPF projects and copy pasting XAML files from those WPF projects for implementing the HUD. So users must be able to,
How to do this?
I was thinking if I can do this using Visual Studio SDK, but could not find any info on creating a visual GUI editor using it. Currently I have VS2008 and VS2010.
If this is not possible or feasible, I think I should consider about creating our own HUD designing software. A completely new application. Any suggestions and info on this is also welcome.
A somewhat similar question I found : Using the visual studio wpf editor to create an gui not for windows gui
-- EDIT --
I found some hints of doing this by experimenting,
Presentation Core
, Presentation Framework
and Windows Base
to Referencesx:Class="bla bla.."
attribute from the window tag. )This thing can be used as the project template prototype. But I would also like to control what is shown on the ToolBox at the time that user is editing this project. I also want to add the file type XAML to "Add New Item" window so that it will add a new xaml file to the project which has the following code
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
>
</Window>
Found a Solution :) Ensure to have .Net Framework 3.0 or above installed. ( don't need to have C# compilers installed. )
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
>
</Window>
p.s.
Just in case you are not familiar with WPF, remember to add a Grid tag inside this window tag. Otherwise you cannot add any rectangles or other things and edit them correctly.