Archive for January, 2008

Kaxaml Source Now Available on CodePlex

Wednesday, January 23rd, 2008

It’s up there now.  Check out http://www.codeplex.com/Kaxaml.  I have to admit that it takes some guts to throw your source out there for the world to see, but I’ll refrain from more caveats or apologies.  Plus, regardless of what you think, Visual Studio thought the code was just fine.  So there.  Greens across the board (I’m assuming green means good and you should too).

codecomplexity

I’m more than happy for you to use the source in whatever way suits you for your personal edification.  If you want to use the source commercially, please let me know.  I’m also happy to oblige most commercial uses, but I’d like to know how it’s being used ahead of time

Also, if you have time to make changes and think they are check-in worthy, let me know.  Let’s take a look.  I’d love community participation here, but for now I’m going to retain control over the project. 

Oh, one more thing.  Unfortunately I probably don’t have time to explain a lot of decisions I made in the source.  If you really get stuck, ping me and I’ll at least try to get you unblocked, but I can’t make a lot of "support" promises here.  I do love hearing from people who are using Kaxaml, but I’m a busy guy like you so exercise your best judgement before sending questions along.  Also, as I’ve mentioned before, Kaxaml was written an hour at a time on airplanes and late at night when I couldn’t sleep.  It can be a little "get’r'done" at times, so proceed cautiously.  There’s some good code in there too of course…so good luck and happy sourcing.

"Sometimes people sing because they’re happy it’s morning time."

Wednesday, January 9th, 2008

Observation from my three year old while watching Beauty and the Beast this morning.

The New Iteration

Monday, January 7th, 2008

Just noticed that I was getting some traffic to the older version of Kaxaml from a whitepaper on windowsclient.net and this reminded me of a long overdue plug.  Karsten and Jaime did a really thorough job putting together an excellent document about developer / designer workflow in WPF and Silverlight.  This is the right place to start if you’re thinking about engaging a team on these technologies, especially if its a team that involves both creative and technical folks. 

Someone is going to argue with me about this, but I haven’t been able to find good literature about how to organize this kind of team using any technology, let alone WPF/Silverlight.  So this is a real boost.  Now feel free to argue with me because I’d really love to read your counter examples.

If you’re going to skim, make sure you read the sections about XAML and then the best practices for developers and designers.  And after you do that, go back and read the rest and you’ll realize that I tricked you into reading like 80% of the document.  Maybe I should teach high school.

Incidentally, Karsten and Jaime are the perfect pair to write this document.  Both are passionate about WPF, both are super sharp guys who get the technology and have practice helping people succeed with it, and one is definitely approaching things from a creative angle and the other from a technical.  I’ll let you guess who is who.

Snapshot Plugin

Friday, January 4th, 2008

The snapshot plugin is kind of broken in the shipping version of Kaxaml.  Here’s the deal.  I found a list minute bug right before "shipping" the rest of Kaxaml that involved losing the undo stack in the editor when you changed tabs.  The fix for this was semi-catastrophic in that I went from reusing the same Editor / Frame for every tab (and just switching out the content) to creating a new Editor and Frame for each tab. 

Apparently,I didn’t put the pieces back together as well as I thought because the Snapshot plugin doesn’t have a reference to the current Frame’s content (it only knows about the first one).  Expect a Kaxaml 1.01 that roles up fixes to these kinds of things soon…

Source for Kaxaml

Friday, January 4th, 2008

I’ve had a bunch of requests for Kaxaml source.  To be honest, I’ve developed most of Kaxaml 30 minutes at a time over the past couple of years and so it’s lacking some continuity.  Some of the source is kind of a mess and kind of "get’r'done".  I realize that’s a lame reason to not share though, so I’ll get it up on Codeplex soon.  I’ll be traveling for the next couple of days and then back to work so it’s probably going to be a week or so before I have time to get things setup.  Thanks to those who asked about it!

Kaxaml 1.0 is Finally Done

Thursday, January 3rd, 2008

Get it at www.kaxaml.com, or go straight to the download here.

kaxaml

So, it’s finally done.  Done is never as done as you want it to be, so make sure you let me know if you find bugs. But it’s done enough.  What a great feeling!  I’ve been working on this version on and off since MIX and something like 70% of was done on a plane or in an airport.  The other 30% has been done over the holidays.  And that’s the kind of commitment I have to my New Year’s resolutions.  I knocked out the first one in two days.  I also intend to do 23 solid days of exercise starting tomorrow.

So there’s a lot of new stuff in this release.  I’ve been working on it for long enough now that I don’t actually think I could tell you everything that has changed.  So, in lieu of a complete change log, here are my top ten favorite new features (from the included readme):

1. Intellisense / code completion
This has the most requested feature by far.  I ended up writing this from scratch even though the text editor I’ve been using (see #2) already supported it because I didn’t like the UI (see #3). The Intellisense is based on an XSD so it will be roughly equivalent to the support you get in VS2005. Right now it only supports WPF (no Silverlight) but the plumbing is all there for a future update.

2. A better editor
I can’t take most of the credit for this one because I’m hosting the editor from the SharpDevelop project and I got a lot of cool stuff (syntax highlighting, line numbers, automatic indenting, node collapsing, tab to space translation, etc.) for free.  A big thanks to SharpDevelop community for making all of this stuff easy.

3. New UI
The New UI definitely in the spirit of original Kaxaml, but (hopefully) cleaner and nicer.  I played with some other ideas (like a floating plugin bar, resizeable plugins, etc.) but I really like the simplicity of the current model and didn’t want to abandon it.  Visually, I purposely kept it dark and flat so that whatever content you’re working on is the thing that pops.  Unfortuately, I ended up removing the full screen view and the ability to swap the code editor up to the top.  These are not tough features to add, I just wanted to get this out the door.  Expect them in future updates.

4. Better Snippets
Two new things here: first, you can right click on a snippet now and edit it in a popup snippet code editor.  Second (and this is kind of a hidden feature), you can assign each snippet a shortcut and then access it from a drop down in the code editor. The hidden part is the shortcut key: it’s Alt-Down.  Right now, there is no other way to access that. 

By the way, the snippets file format hasn’t changed so you can hang on to you original snippets.  Hopefully, you backed up your copy.  The old installer didn’t automatically keep it around for you.  The file is in the Program Files folder and it’s called KaxamlSnippets.xml.

5. Tabs
This one is pretty self explanatory.  You can open up more than one file now.  Also, if you hover over the tabs you can see a preview.  Ctrl+T will open a new tab.  Ctrl+W will close one.  There are some shortcomings still with tabs and hopefull I can fix these in a futuer version.  First, there’s no tab overflow.  If you run out of room, you’ll need to close some tabs to see the ones at the end.  Second, I don’t detect multipe instances of Kaxaml so double clicking a file will always create a new instance.

6. A better color picker (and color sync)
I rewrote the color picker.  It’s bigger now and you can tweak the individual RGBA or HSBA values.  Also, your palette of saved colors gets saved now.  The coolest feature, however, is the ability to synchronize the color you choose in the color picker with your selected text in the editor.  To use this, select a color and then choose the "plug"; button in the color picker (it’s the top button, above copy and save).  This makes it really easy to fine tune or tweak colors even when you’re hand-coding your XAML.

7. Zoom
This was definitely lacking in previous versions.  Now you can zoom in our on your content.  In my prerelease use of Kaxaml, zooming has turned out to be most surprisingly useful feature for me.  The shortcut keys are the same as those in Blend (and most other design tools).  Ctrl+= will zoom in (think Ctrl++) and Ctrl+- will zoom out.  Ctrl+1 returns to 100%. 

8. New plugins
New plugins are: XamlScrubber (it formats your XAML and removes unnecessary properties that are commonly inserted by Blend) and Snapshot (it lets you save an image of your content).  The ColorPicker is also a proper plugin. 

So far the actual API exposed for plugin authors is kind of spotty.  I’ve been adding stuff as I need it to build the plugins I want to build.  No one has ever contacted me about writing their own plugins, but if you happen to embark on this path let me know and I will happily expose new APIs for you.

9. Silverlight support
Kind of anyway.  Right now it’s just a big hack.  I do some preprocessing on the XAML so that I can parse Silverlight XAML as WPF XAML.  The hack really just involves switching out the Silverlight namespace with the WPF namespace.  That said, the plumbing to someday have right support for Silverlight is all there.  This will be the next thing I work on: real support for Silverlight xaml.

10. Better file management
There were some bugs with the file management in previous versions.  Sometimes you thought you had saved a file but hadn’t.  Worse, sometimes you had saved a file you didn’t mean to (and overwritten a previous version).  That’s (hopefully) cleared up now.  Also, you can drag a file into app and it will open.  There’s also kind of a quirky feature (but one that is super useful for me) that allows you to drag or paste an image and it will copy the image into a predefined directory and then generate some XAML for you.

Well, that’s the top ten.  Coming soon are better support for Silverlight, a font chooser plugin and some more cleanup.  I’m going to take a break for a while and move on to some other attic projects.  So for now, happy XAMLing.