UltraButton can be style in normal, hottracked, and down state -- is there a way to provide a style for when the button has the focus? Could the hottracked state be misused for that purpose?
We intend to create buttons with various shapes depending on the selected style. The focus rectangle just doesn't work in our case!
Hi Salvis,
You can check in AppStylist on the button's UIRole and see which states are supported. I don't think there is an appearance specifically for the focused state, so I don't think you can do what you want through AppStylist.
You could, of course, handle this in code by changing the appearance on the control in the Enter/Leave events.
You can also turn off the focus rect in code using a DrawFilter. Here's a KB article that tells you how: KB04791
Thank you for your answer and the link!
UltraButton only has the Normal, Hottracked, and Pressed states. Button has many more, including the Selected state, which is probably what I'm looking for.
Is there a way to make these additional appearances available to an UltraButton, or maybe to a control derived from UltraButton? I've looked at your documentation on the Appearances collection, but I couldn't find out whether there was a way to get it to work with the AppStylist?
We tried adding some appearances of our own and were hoping, those would show up in the run-time AppStylist, but they didn't. Is there a way to control additional appearances through an .isl file?
Changing the appearance in the Enter/Leave events would be fine, as long as we have an application-wide mechanism to control the appearance.
The Button role in AppStylist displays all of the states that any of it's descendants support. So the fact that it has a Selected state doesn't mean that that state will affect every child role, only that it affects at least one child role. Obviously, since UltraButton does not display the Selected state, it does not support that state.
In any case, Selected is not really what you want, you want the Focused state.
So there's really no way to do what you want through AppStylist at this time. You can submit a feature request to Infragistics that the UltraButton be updated to support a Focused appearance and the Focused State:
http://devcenter.infragistics.com/Protected/RequestFeature.aspx