Tuesday, November 16, 2010

WPF Themes - Ensuring Hot Keys Display properly

In going through the themes in the WPF Themes project on CodePlex I've encountered many inconsistencies.  Sometimes these inconsistencies are annoying and other times they require much more complicated fixes.  All these issues are instructive because they teach us things to be aware of when building our own themes or even our own templates.

I've written about some of the more complex issues I've encountered in the past.  Today I'm just going to talk about one of the more simple problems.  Some themes in the WPF Themes do not properly display the access keys.  The underscore used to indicate the key was being displayed instead of removed.  This is a simple problem to fix.  ContentPresenters have a property RecognizesAccessKey.  If this property is not set, it defaults to false and the access keys will not work.  Writing RecognizesAccessKey="True" will make the access keys work properly.

I would have preferred the default for this property to true.  In the general case I want the access keys to be active.  An even better solution would be if there was a global way to specify the default for it.  Using access keys is usually what you want to be application wide and it'd eliminate little presentation bugs to if this was possible. Its easy to forget to set this property on a ContentPresenter which can manifest in hard to find locations.  Its an easy problem to fix, but annoying when you discover it.


  1. Replies
    1. Great Article Image Processing Projects Deep Learning Projects for Final Year JavaScript Training in Chennai JavaScript Training in Chennai The Angular Training covers a wide range of topics including Components, Angular Directives, Angular Services, Pipes, security fundamentals, Routing, and Angular programmability. The new Angular TRaining will lay the foundation you need to specialise in Single Page Application developer. Angular Training Project Centers in Chennai

  2. Banyak orang yang mengatakan sebaiknya buah durian dihindari oleh ibu yang sedang hamil. Katanya dapat menyebabkan keguguran kandungan dan dipercayai sebagian orang sebagai cara menggugurkan kandungan dengan buah durian . Meskipun demikian jika konsumsi tidak berlebihan tidak akan menimbulkan penyebab bagi ibu hamil . cara menggugurkan kandungan tidak boleh dilakukan sebarangan dan asal-asalan mengingat bahayanya dan risikonya cara gugurin kehamilan cukup tinggi dan berat sekali . masa puber wanita biasanya timbul rasa ketertarikan terhadap lawan jenisnya . Salah satu dari ciri ciri menopause adalah tidak mengalami siklus menstruasi yang sebelumnya di alaminya . Ada beberapa tips agar agar miss v harum dan keset yang bisa dilakukan seperti melakukan pengasapan di tempat Spa kecantikan dan sebagainya .