Note that there are some explanatory texts on larger screens.

plurals
  1. POCreating a basic interactive GUI editor that generates XAML
    text
    copied!<p>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.</p> <p>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,</p> <ul> <li>Open Visual Studio and create new project of project type (project template) "Easy HUD Designer" project</li> <li>design the HUD using the visual GUI editor.</li> <li>Build the project so that it generates an XAML file. (or the XAML could be generated/modified while the GUI is edited, just like in WPF projects)</li> </ul> <p>How to do this?</p> <p>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.</p> <p>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.</p> <p>A somewhat similar question I found : <a href="https://stackoverflow.com/questions/8243363/using-the-visual-studio-wpf-editor-to-create-an-gui-not-for-windows-gui">Using the visual studio wpf editor to create an gui not for windows gui</a></p> <p>-- EDIT --</p> <p>I found some hints of doing this by experimenting,</p> <ul> <li>Create Empty C# project</li> <li>Add <code>Presentation Core</code>, <code>Presentation Framework</code> and <code>Windows Base</code> to References</li> <li>Set project type to library ( so that building the project will not give build errors )</li> <li>Add XAML files. ( i copied an XAML file and removed the <code>x:Class="bla bla.."</code> attribute from the window tag. )</li> </ul> <p>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 "<em>Add New Item</em>" window so that it will add a new xaml file to the project which has the following code</p> <pre><code>&lt;Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" &gt; &lt;/Window&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload