Friday, April 23, 2010

Troubles in ToggleButton land - 2nd take

As I continued my investigation of the ToggleButton issue mentioned in my previous post, I discovered that if you set the Focusable property of each ToggleButton, the border left on the pressed button when pressing any of the other buttons disappears. 

The issue though with this approach is that the ToggleButton may no longer be selected using the keyboard Tab button. If this is acceptable in your project, then this is a great way to solve the issue.

Again, this issue is reproduced on Windows 7 machines. I'll investigate if this holds for Windows Vista/XP machines. If not, I might submit a bug report.

Thursday, April 22, 2010

Troubles in ToggleButton land

I was recently developing an application in WPF that uses a TabControl control as a ribbon-style navigation bar. I wanted the user to press a ToggleButton and a Frame control at the bottom of the Window would load the requested Page.

Since the TabControl would serve as a navigation bar, I wanted the user to visually be able to see which page was loaded by having the ToggleButton in a Pressed state.
So far so well. When pressing the ToggleButton it remained pressed (as it should).

Now, I wanted when the user pressed a different button, the previously pressed button to go to the Default state. Alas, when the new button was pressed, the previous button was in the Default state, but there was a highlight rectangle around it.

Wednesday, April 21, 2010

Hello World!

So, I decided to create this blog for the purpose of posting small solutions to problems I have when coding in .Net. This blog will try to incorporate all things .Net, since it is my primary coding platform.

I hope you find my posts interesting. Comments will be appreciated!

Ioannis Stavrinides