Skip navigation.

Syndicate

Syndicate content

User login

wpf

Rendering disabled ('grayed out') image buttons in WPF

Earlier today I was ranting about lack of built-in support for grayed-out image buttons in WPF. I’ve come up with two workarounds; one correct, and one workable.

What the HELL is wrong with WPF?

This weekend I’ve been working on one of my many self-edification projects, and against my better judgment I was implementing it with .NET 3.0/Windows Presentation Foundation, mainly because of the markup-like UI model which fit nicely with a few of my project’s idioms.

WTF is wrong with WPF focus!?

There’s something badly broken about Windows Presentation Foundation focus. I’ve read that WPF implements its own concept of focus, and at the high level a WPF element tree is just a single HWND, and the WPF elements are rendered therein.

Here’s an experiment for you to try on your own: Create a simple XAML Window. Populate it with user controls. Now, try to get the first user control in the window to receive focus (keyboard and logical) when you’re window starts up. The FocusSample does it with a Button, which seems to work OK, but with a UserControl you’re out of luck. Even after setting Focusable to true, it doesn’t work. Yet, you can Tab through the focusable controls without problem.

Windows Presentation Foundation: I must be missing something

I’ve spent most of the day playing around with the .NET Framework 3.0 RC1 bits. I’m primarily interested in the Windows Presentation Foundation (WPF) stuff, which deals with UI construction for both desktop and web apps under Vista/IE7 and beyond (though it works on XP and 2k3 Server too).

(As an aside, the new Windows x Foundation marketing idiom is among the more stupid in recent memory. That they’re bundled together into the .NET Framework 3.0, which has no obvious textual resemblance to the Windows somethingotherother Foundation template makes it all the more awkward. I liked WinFX better.)

Syndicate content