Hi guys,
I have an Expander that in the header:
<Expander.Header><Canvas Height="43" Margin="0" MinWidth="400" ><Label Content="Test" Canvas.Left="0" Canvas.Top="10"/><Button Width="75" Height="23" IsDefault="True" /></Canvas></Expander.Header>
Since the button is set to be default, If I press the Enter key in the window, the button click event is triggered. And it works.
But now, if the header is focused, and I press the Enter key, the Button click event will not work and the Expander always show and hide. It seems the default button will not work until lose focus from the Expander Header.
How can I resolve it?
Knowledge will change the destiny.