si618
si618

Reputation: 16848

WPF CheckBox IsChecked toggled on different events

Does anyone know the rationale behind the WPF CheckBox behaviour where it (appears) to display IsChecked true on MouseLeftButtonDown event and false on MouseLeftButtonUp event?

The reason I ask is that I'm implementing a CheckBox in an existing grid where the text is on the left instead of the right of the CheckBox. The easiest way was to add a TextBlock and some code-behind, but if I want to be consistent it means adding both events and checking state on each one.

Upvotes: 1

Views: 400

Answers (1)

publicgk
publicgk

Reputation: 3191

If all you want is CheckBox having text to its left, why not simply modify its template: http://www.codeproject.com/KB/WPF/WPFCheckboxTextOnLeft.aspx
http://social.msdn.microsoft.com/Forums/en/wpf/thread/85673c27-01e6-4f8e-96a5-1847bb44abc4

Upvotes: 1

Related Questions