I was asked at a recent Silverlight Meetup what happened to me? He was concerned that I was sick or something worse so I thought it was worth a post.
I’ve been quiet on my blog (but not on Twitter) lately as I’ve been travelling a lot and working too hard. I am working on several important projects (not all of which I can share). The ones that you can know about are:
In the interim, I found some tidbits in Silverlight and WP7 that I’ve been collecting share (though briefly):
Implicit Styles in Silverlight
Explicit styles in Silvelright are polymorphic. Meaning you can apply a style with TargetType of “Control” to “Button” and “TextBox” though you can only style properties that exist on the base class. This is a cool feature especially when you need to use BasedOn to create cascading styles.
Implicit Styles are different. They are *not* polymorphic so that only a style of a specific type is supported. So an Implicit Style of TargetType Control would only apply to a control in XAML of type “Control” but derived types like Button and TextBox aren’t styled. I suspect this is because of perf as to apply implicit styles you’d need to walk down the list of base classes to find a style that applies. And what if there were both? Should it do an implicit BasedOn or ignore it? Since its complex, the non-polymorphic nature of Implicit Templates is probably the right approach.
If you need to implicit styles to have shared setters, implicit styles still use BasedOn so you could create a base (explicit) style that your implicit styles are BasedOn.
RichTextBox and Mango Beta
If you’re trying to use the RichTextBox in the Mango Beta, you might have noticed it doesn’t render by default. The problem is it doesn’t have a default style. This was in the release notes but lots of people missed it. You can see Jaime Rodriguez’s post about it here:
Also in the Mango Beta, the RichTextBox’s InlineUIContainer and images does not render no matter what you do. This is temporary and should be fixed in later drops.
Another issue to be aware of is that when you use the hardware keyboard in the Mango Emulator (hit Page-Up to enable, Page-Dn do disable), it sticks your orientation at portrait. Not sure why, but its not you.
For those who never noticed, the hardware keyboard emulates using a real keyboard (so the SIP doesn’t appear and you can type with the computer keyboard). This emulates some of the devices with a hardware keyboard like the Dell.
More to come?
I hope to be able to share two of my more private projects of the next couple of weeks with folks. So don’t worry…I am still here.