This project has moved and is read-only. For the latest updates, please go here.

ChildWindow Focus

Apr 24, 2014 at 9:32 PM
Edited Apr 24, 2014 at 9:33 PM
I have an issue with using a non-modal ChildWindow. It seems to lose and gain focus when clicking on the window. This is most noticable with a selected CheckBox in the ChildWindow. (I can post some XAML for the reproduction if needed).

This change in WindowContainer.cs fixes the issue.
    private void SetActiveWindow( WindowControl windowControl )
    {
      foreach( WindowControl window in this.Children )
      {
        if ( window != windowControl )
        {
          window.SetIsActiveInternal( false );
        }
      }
      windowControl.SetIsActiveInternal( true );
    }
Developer
Apr 28, 2014 at 1:24 PM
Hi,

Can you paste some xaml that shows the bug please ? I'm trying a WindowContainer with 2 childWindows, each of them having a CheckBox. Clicking on ChildWindows to change the focus doesn't change the look (lose an gain focus). What version of the toolkit are you using ?

Thank you.
Apr 28, 2014 at 4:52 PM
Make the following changes in Xceed.Wpf.Toolkit.LiveExplorer.Samples.Window.Views.ChildWindowView

87: <CheckBox x:Name="_chkIsModal" Grid.Column="3" VerticalAlignment="Center" Margin="5" IsChecked="False" />
135: <CheckBox IsChecked="True" Grid.Row="4" Grid.Column="1" Margin="2" VerticalAlignment="Center" />
Apr 28, 2014 at 5:00 PM
This video shows this issue
https://www.youtube.com/watch?v=hg4_r6zb63Q

And this video shows the same example with the code changes
https://www.youtube.com/watch?v=tqJRPPLhzjw

Thanks.
Developer
Apr 29, 2014 at 2:47 PM
Hi,

From the video, I believe you are using Windows 7. What is the version of the toolkit you are using ? In Windows 8, under v2.1, I don't see this behavior.
Thanks
Apr 29, 2014 at 4:11 PM
I am using v2.1. I just tested the same executable in Windows 7 and Windows 8.1. The problem only occurred in Windows 7.
Developer
May 6, 2014 at 2:20 PM
Hi,

v2.3 has a fix for this issue in Windows 7.
May 6, 2014 at 3:56 PM
Thanks!