Take a look at this very simple example of a WPF program:
<Window x:Class="WpfApplication1.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Height="300" Width="300"> <GroupBox> <GroupBox.Header> <CheckBox Content="Click Here"/> </GroupBox.Header> </GroupBox> </Window>
So, I have a GroupBox whose title is CheckBox. We all did something like this: usually you bind the contents of the GroupBox in such a way that it is disabled when the CheckBox is not checked.
However, when I launch this application and click on CheckBox, I find that sometimes my mouse clicks are swallowed and the status of CheckBox does not change. If I'm right, this is when I click on the exact row of pixels that the GroupBox top border is on.
Can anyone repeat this? Why is this happening, and is there a way around it?
Edit: setting the GroupBox BorderThickness parameter to 0 solves the problem, but obviously it removes the border, so it no longer looks like a GroupBox.
Matt Hamilton Sep 30 '08 at 6:32 2008-09-30 06:32
source share