Tim Hibbard

Software Architect for EnGraph software


News





Add to Google



My Stats

  • Posts - 593
  • Comments - 337
  • Trackbacks - 507

Twitter












Tag Cloud


Recent Comments


Recent Posts


Article Categories


Archives


Post Categories


Image Galleries


EnGraph Blogs


Links


Other


Roll


August 2007 Entries

WPF Access Keys


In WPF, access keys are created like this:
_Click Me!

Pre-WPF was:
&Click Me!

Access keys in buttons work differently based on the type of control your text is rendered in.

This code will only bring the keyboard focus to the button, it will not generate a click event:

<Button Click="clickMeClick">_Click Me!</Button>

When the user presses Alt - C on their keyboard, they expect the button to act as if it has been clicked, not just selected.

To set keyboard focus and generate a click event, use code like this:

<Button Click="clickMeClick"> <Label>_Click Me!</Label> </Button>

I *think* the default content of a button is a TextBlock, so until we explicitly set a Label inside of it, the button does not work with access keys as expected.  For other differences between a TextBlock and Label, see Josh Smith's post.

 

To use access keys to attach a label to another control, use code like this:

<DockPanel LastChildFill="True"> <Label Width="100" DockPanel.Dock="Left" Target="{Binding ElementName=firstNameText}">_First Name</Label> <TextBox Name="firstNameText"/> </DockPanel>

Now, when the user presses Alt - F on their keyboard, the TextBox will receive keyboard focus.

 

Technorati tags: , ,

posted @ Tuesday, August 28, 2007 10:15 AM | Feedback (0) | Filed Under [ .NET Keyboard Shortcuts WPF ]


Shiny Toy Guns ROCK


005

Last night, Kyle, Allie, Chelsea and I went to the Buzz Beach Ball here in Kansas City.  Jeff Julian (sporting his very GWB appropriate geek shirt) and Doug Butscher (who I think I saw crowd surfing) were also there.

I really liked Life In Jersey, the opening band.  They sounded like Senses Fail and were really excited to be playing.  Come to find out they are a local Kansas City band.

Shiny Toy Guns stole the show in my opinion.  They kind of have a Lords of Acid meets Roxette feel to them.  Their whole set was high energy and they even threw a Depeche Mode cover in for Kyle.  They are playing in Wichita in couple months.  Hopefully, I'll get to see them again.

Plain White T's did not show up because they are tools.

There is not much to say about a band with a lead signer on a 20-year coke binge, I wouldn't have been disappointed if Satellite Party did not show up either.

The Used have been one of my favorite bands for a while, and I was really excited to see them.  They didn't really disappoint, but they didn't exceed my expectations.  They just didn't sound very crisp.  At times, I couldn't tell if the lead signer was gargling mouthwash or singing.  It was still The Used though, and they still rock.

 

posted @ Monday, August 20, 2007 4:57 PM | Feedback (4) |


Looking for a printer


8234813_ra

 

We are looking for a new printer for our office.  It needs to be able to print/copy/fax/scan and be ethernet connectable.  I've typically purchased HP in the past because they seem to be the best.  We are currently looking at this one from Best Buy

Anybody have a suggestion for a good office printer?

 

Technorati tags: ,

posted @ Wednesday, August 01, 2007 8:27 AM | Feedback (0) |