Thinking about this the other day made me decide to make my own tool for this. I sad down, thought about my process of using technical content and I came up with how I felt the flow should be. Here is what I figured will work the best for me:
- Copy some code from Visual Studio
- Click a button in my tool / press some short-cut key combination
- Paste the result in whatever
Thinking about that some more, I decided to scrap that last bit and add a small step to the flow:
- Copy some code from Visual Studio
- Choose a target if necessary
- Click a button in my tool / press some short-cut key combination
- Paste the result in whatever
As I'm experienced in buildin Silverlight 2.0 applications I decided to use WPF as my technology. This allows me to access the clipboard and it has better keyboard support then Silverlight. Also, having to open a web application, has been one of the causes that using some of the existing tools takes to much effort.
I've been playing around with WPF and the clipboard and found out that VS (at least 2008) copies it's content to the clipboard using the RTF format. This drew me towards the RichTextBox control, so I placed one in my window and pasted the content into it and it looked great. I studied the documentation on the underlying FlowDocument technology and decided to run with it.
Now I've already built code to convert RTF to a FlowDocument instance (without the RichTextBox control, obviously) and then to XML, which will allow me to build several XSLT templates on top of that XML, which I can then apply to the XML to get to the end result.
Next steps will be:
- Test this with XAML
- Build templates for C# and XAML to convert to HTML (and maybe XAML?)
- Brush up the user interface
- Build a setup
- Release Beta 1
If you have any question, suggestions or comments, you know the drill (that means, leave them below).
No comments:
Post a Comment