Posted by Julien on February 13th, 2007
Today I added drag&drop support. Now you can simply drop a logon file and it will be added to the list of logons. I also added support for logonxp format. It only took me 20 minutes from start to finish, and now logonxp files can be imported and loaded.
I had to modify the interface a bit to add capabilities support. Basically it’s a flag that the dll sets to inform the app what kind of operations it can do. The operations available are:
- Register (register and un-register the file format)
- Load (load a logon from a folder)
- Save (save a logon to a folder)
- Import (import a compressed logon file)
- Export (export a logon to a compressed file)
For example, the logonxp dll supports loading, importing and registering.
I also worked a bit on resource replacement. Basically, as you can have HighDPI images and normal images, if one variant is available and not the other, I automatically use the one provided for both scenarios. The same is true for backgrounds. You can provide several resolutions and it will automatically choose the closest match for other resolutions. The function that does it for backgrounds is kind of limited right now and need a bit of testing but that will do it for the time being.
Posted by Julien on February 13th, 2007
Not much visual work done yesterday, at least not as much as I would have wanted. I added an error background (shown when the file linked in the logon configuration doesn’t exist). I also corrected the footer (now with a correctly aligned Apply button). Finally, I added some elements to the logon preview: the user name and tile.

It’s actually the later that took me quite a lot of time. Somehow, there doesn’t seems to be a public API to programmatically get the user picture. Well, after a bit of tracing I found an exported function in shell32.dll that does just that. The only problem is that it’s not documented…
After quite a long time in the debugger, I finally had something working. Nothing surprising on the way it works, but my relative inexperience with pure win32 programming prevented me to to “get it” much sooner. And I still don’t know what one of the parameters is for. I’ll figure it out later (maybe).
On the backend side, I reorganized the class to apply an existing logon, consolidating it with the one that managed logon resources. I finally added file security & token management (I took a MS sample that nicely encapsulate token & privilege management, and added a class to take care of file access modification).
Posted by Julien on February 12th, 2007
The LogonSwitcher format supports a few elements about the logon. You can add a version, a copyright year, and an URL (both target and text to show). There is also optional support for a author logo.
Here you can see that I corrected the URL part. It was showing wrong on the last version. Turns out you have to have a textblock inside an url inside another textblock for binding to work. Otherwise, it doesn’t work right. Go figure !
I took the time to add custom selection and mouseover overlay on the logons. It’s very subtle, but I think it looks great
Not a lot of background work. Background replacement works, but not other UI elements yet. Crappy restriction on resource updating when linked with mui resources files.
Posted by Julien on February 11th, 2007
After playing with BitmapEffects a bit, it turns out it’s deadly slow when moving elements with effects applied. The panel I was using was animated on resizing and it slows down the app to a crawl every time it moves…

For WPF version 1, Microsoft hasn’t made BitmapEffects hardware accelerated, so every elements with effects applied goes back to software rendering. Not an option with animated controls, I tell you !
So the animated panel is gone, and I’m now using a simple UniformGrid. It looks so much better with a white glow for text and a dark glow for the background.
You can see that I added UI elements to the logon preview. It doesn’t look exactly like the real thing because some of the bitmaps are actually stretched and I’m not supporting that right now. The search box is now correctly aligned on the right.
On the backend size, I updated the class responsible for extracting default logon UI elements. I’m now duping almost every UI elements shown on the screen (plus a few misc. things such as the startup sound).
Posted by Julien on February 10th, 2007
After almost a week of work, it’s starting to look a bit better. I didn’t work a lot on the UI so it’s still kind of messy. It’s still using an animated control as the panel to host logons, but I’m probably going to get rid of it for performance reasons (more on that in next post).
I worked on the backend for most of the week. I now have a nice plugin interface that allow FileSupport dlls to be added to support new file formats. I have rudimentary support for logonvista files, as well as it’s own file format.
Although the LogonSwitcher file format support much more than logonvista at the moment (backgrounds as well as others UI elements), it actually took a lot less time to build thank to XML serialization
I tried to make things as flexible as possible, so that I can add new UI elements without having to update every class. Hopefully it will work without too much special cases
Note: I know the logonvista is copyrighted by Stardock and they don’t allow other people to use it. I made the FileSupport dll for my one use and I don’t intend to ever distribute it.
Posted by Julien on February 5th, 2007
Last week, I started working on a new application to lean WPF. Learning XAML proved to be slightly harder than I imagined. Mainly because there is no “right” way to do things. So I’ve been rewriting it almost every day, every time a little bit better than before
Here is what it looked liked after a few hours:

A little bit of customization later:
There is still a lot of work to do. I’m just starting to work on the backend. Hopefully I’ll be able to reuse some of the things I did two years ago when working on my .Net SDK for ObjectDock.