Corrina Barber's Control Skins
Corrina Barber has given us four very nice control skin sets:
I decided to give these a shot with full intent to try to extend one of them with some ideas of my own. I had some problems, some of which Corrina has resolved on her site and some that I double-checked with her via email and thought I would detail these in case anyone was trying to do this as well.
Problems in general use
First off, Corrina is delivering zip files containing some combination of App.xaml, Page.xaml, Page.xaml.cs, and Page.xaml.vb
This is all good, but because they were taken from her working demos, they contain some code that you probably want to get rid of, specifically that in Page.xaml, there is a dSrc namespace referenced and associated "peepsList" and "customerList".
All of this can be removed with the only problem being that there's no data displayed.
Corrina addresses this herself quite nicely in response to some comments on the first control set
She also gives some great links out to other people such as Jose Fajardo and Scott Morrison. Be sure to aggregate and read all those posts not only to help with the data issue at hand, but also with the control skinning in general.
Next up is an issue that I thought maybe I had foisted on myself. App.xaml is throwing a bunch of identical errors:
The type 'Color' does not support direct content.
and these are pointing to lines of xaml that look like this:<Color x:Key="DefaultColor">"#FF000000"</Color>
If I have App.xaml open on the desktop in VS2008, I get the error when I compile. If I close the file, right-click my solution, and select "Rebuild Solution", it will build without the error.
I've discussed this with Corrina, and that's the same solution she had. Any other work-arounds here, please let me know!
My next thing to try was to open the project in Blend 2.5 March 2008 Preview, and see exactly how Corrina pulled off the magic of skinning the controls.
I opened the project alright, but when I try to open App.xaml, Blend takes strong exception to something and puts up a big "Invalid XAML" box... yikes ... haven't seen THAT before :)
In the Results area, there are a bunch of identical errors that all read:The TypeConverter for "DoubleCollection" does not support converting from a string.
Looking to see where these are coming from in the xaml, I find it is complaining about Path definitions containing properties similar to this:StrokeDashArray="1 2"
In our email exchange, Corrina suggested removing those property declarations while modifying the xaml, and then putting them back after.
So there you have it... how to get the skins up and running and how to go about looking at them to modify as well.
From my background of skinning win32 desktop applications, this is exactly what I was looking for and any little weirdness along the way is fine with me as long as we know what it is.
I hope to have something more to show for my troubles as time goes on, so Stay in the 'Light