Introducing VisualDesigner, my library for developing visual designers in .NET

Hi friends! I’m developing a personal project just for fun. Its goal is to serve as a starting point to make any visual designer with the best user interaction possible. Drag operations, resize, grouping, snapping, copy&paste…

The code is really abstract, decoupled and following the best software engineering principles I know to make it pure Clean Code. In fact, I have made a big effort to include almost all the code in a Portable Class Library (PCL).

For the moment, it supports basic drag (move), resize, multi-selection and SNAPPING!

I hope you go there and try it. I think it’s really interesting. The main application is WPF demo application, but the main functionality is almost totally platform-agnostic.

The project site in GitHub is this:

Feel free to collaborate or suggest anything. Maybe we can learn a lot sharing thoughts or even code 🙂


Os presento mi biblioteca Glass Design para desarrollar diseñadores gráficos en .NET.

De momento no hace mucho, pero lo que hace, lo hace bien 🙂

El código fuente está disponible en GitHub.

Nada mejor que ir y ver el código. Estoy intentando hacerlo lo más limpio posible y siguiendo todos los principios y buenas prácticas que conozco de Ingeniería del Software.

Realmente, el código hablar por sí mismo, aunque explicaré en los próximos días más detalladamente cómo funciona, aunque son demasiadas clases como para desmenuzarlas una por una, sí que haré una descripción de las diversas partes de la biblioteca y de la aplicación de prueba.

Sí diré que la solución está en formato de Visual Studio 2013 (always updated!)

No dudéis en echarle un ojo 😉

Transform any vector format to XAML (DrawingBrush or VisualBrush)

  1. Get InkScape, it’s free!
  2. Export you vector format to XAML to a file: exported.xaml
  3. Go to Microsoft Blend (part of Visual Studio). It was called Expression Blend before VS 2012.
  4. Create a test project (WPF Project, for example) that supports XAML
  5. Open the exported file in XAML and a text editor. Copy the code.
  6. Go back to Blend and in a blank Window (the default Window that is created, for example) and paste the code inside a Panel (like <Grid></Grid>). You will paste a <ViewBox> with lots of things inside.
  7. Your vector graphic appears in the Design screen. Click it.
  8. Choose the menu Tools->Make Brush Resource. Choose VisualBrush or DrawingBrush (I normally select DrawingBrush).
  9. Go the the Resources tab and you will see the new resource that has been created
  10. Copy the code of the resource clicking it, then “View Source”.
  11. Paste it in your project! (a Resource Dictionary should be a good idea!).

Enjoy 😀

How to make Visual Studio copy a file from a folder in the project to the Output Folder!

How to make Visual Studio copy a file from a folder in the project to the Output Folder!

The answer is in Stack Overflow 😉

NOTICE. The answer told you to put OutputPath, but I used OutDir

Modify the CSPROJ adding this snippet:

    <AvailableItemName Include="RootContent">
  <Target Name="AfterBuild">
    <Message Text="Copiando bibliotecas nativas a carpeta de salida" />
    <Copy DestinationFolder="$(OutDir)" SourceFiles="@(RootContent)" SkipUnchangedFiles="true" />

Go the to Solution Explorer and go to the properties of the file you want to copy to the output folder (usually \bin). Set the Build Action to RootContent.


Informar de un error al usuario: Se acabaron tus quebraderos de cabeza con ErrorTemplate

Informar de un error al usuario: Se acabaron tus quebraderos de cabeza con ErrorTemplate

Brillante, boy. Dale y verás que la ErrorTemplate incluso puede tener un ToolTip freshhhquísimo con el que el usuario podrá acojonarse viendo sus errores favoritos con un bello marco rojo, for instance!