Monthly Archives: December 2013

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 🙂



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!

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.



Atiende al FlowDocumentPageViewer sin barrita de herramientas!



    <ControlTemplate TargetType=”{x:Type FlowDocumentPageViewer}”>



FlowDocumentPageViewer.IsMasterPage=”True” />