Thursday, May 22, 2008

I always planned on writing work related stuff

Bonus personal info for friends/family - we got a frog, and I discovered I dislike crickets :). I was thankful we had a dustbuster to take care of them.

Two things in working with WPF that took me a while to figure out.

First, I had a bug where _'s were going missing in a button's label. I'd read about the keyboard accelerator stuff, but it didn't occur to me because I was putting a directory name in there. Quick fix was to make a converter:

public class NoMnemonicConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
return ((string)value).Replace("_", "__");
}

public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
return ((string)value).Replace("__", "_");
}
}

Second, I was trying to put some of my common controls and some I'd borrowed from others into a single library. My generic ResourceDictionary just would not get recognized. I googled and grepped until my eyes fell out, then I found this segment to put into the library's AssemblyInfo.cs:


[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]


What a relief!

Wednesday, March 26, 2008

Oh where oh where has my little dog gone

Boohoo, somehow the front door blew open and Kevin Trevino ran away. Dex was out and about too, but made his way home. Puts a real damper on the day. Had to put "afraid of cameras" on the lost flyer because I don't have any pictures.

Math Is Cool

Emma is going to be participating in a Math Is Cool competition this Friday and is really looking forward to it. She loves her NWC Math Team tshirt. I guess there is a "big rivalry" between Northwest Christian and St. George's. She's been working really hard on it, so here's praying she takes her time and remembers all the tricks and formulas.