January 2008 - Posts
Got an exception being thrown with only its name being displayed in the output window?
Want to catch that exception? Just click on Debug -> Exceptions (Ctrl D, E) and check the exception you want to catch whenever it's thrown:
Now the debugger will catch any exception of that type, regardless of whether it was handled or not.
Dependency Properties and Routed Events are special WPF mechanisms that can be used in place of the CLR's normal Properties and Events, since they are more powerful, although less typed. You can even define a dependency property or routed event without a matching property or event and one can access the property's value or attach to the event using simple code.
However, it seems that what you can do in code, you can't do in XAML. For instance, I have a control named Test, that has a property named MyProperty. If I decide against exposing it as a CLR property (maybe it only has meaning when used in WPF's markup), I can still use this line to set it:
The above line compiles, runs and I'm a happy camper. However, try to get the following XAML to compile:
<local:Test x:Name="test" MyProperty="10" />
You'll get: error MC3072: The property 'MyProperty' does not exist in XML namespace [...]
So what this means is that without CLR properties exposing them, you can't use dependency properties in XAML (the same is true for events and routed events).
It strikes me as odd that WPF's XAML compiler can't handle its own mechanism without requiring you to add more, unnecessary code.
I don't use GMail as my primary address, but it's a very useful service. It's lean, fast (if you use the old UI) and it's portable (duh).
My first GMail account was for my personal use, to get notifications about comments to my blog, etc. As I found GMail to be more and more useful, I opened a couple more accounts, to isolate my private life (and GMail account) from my business life. As GMail allows you to send email using a different 'From' field and also reply to each incoming email with the address you sent it from, you can simply direct your GMail Notifier at the main account and forget about managing the others. The problems began once I opened an account under an alias, rather than my under my real name.
GMail Talk (or GTalk) allows anyone who knows your email address to talk to you. That's very nice in theory, but suppose you don't want the person you're mailing using an alias to know who you are. Once that person has you in their Talk list, they will now view your full details, but not those that belong to your alias account, but to the account you are using (your real, personal account)!
And best of all - there is no way to turn the bloody thing off! I've emailed the GMail team a couple of weeks back and have not heard from them. Mind your step!
(I never asked for anything like this before, but please link to this post, echo it, digg it... anything! This is too important a privacy concern to keep quiet!)