1

Closed

Cannot select Combobox while inside a WindowContainer

description

I have this issue I notice that I think it has something to do with the Window Container. When I have a regular ComboBox inside a ChildWindow, it does not behave properly if that ChildWindow is placed inside a WindowContainer.


To recreate this issue: I have a test control that has a ComboBox and a Button like this:
<UserControl >
  <StackPanel>

    <ComboBox VerticalAlignment="Top" Margin="3">
      <ComboBox.Items>
        <ComboBoxItem Content="Option 1"/>
        <ComboBoxItem Content="Option 2"/>
        <ComboBoxItem Content="Option 3"/>
        <ComboBoxItem Content="Option 4"/>
      </ComboBox.Items>
    </ComboBox>

    <Button Content="Click Me!" Margin="3" Click="Button_Click" />
  </StackPanel>
</UserControl>
I placed this UserControl inside three columns inside a grid. One is directly inside the Grid, the other is wrapped around a ChildWindow. And the last one is wrapped inside a ChildWindow inside a WindowContainer.
<Grid>
...
    <local:TestControl Grid.Column="0" />

    <xctk:ChildWindow Grid.Column="1"  WindowState="Open">
      <local:TestControl />
    </xctk:ChildWindow>

    <xctk:WindowContainer Grid.Column="2">
      <xctk:ChildWindow WindowState="Open">
        <local:TestControl />
      </xctk:ChildWindow>
    </xctk:WindowContainer>
  </Grid>
When I run the test, the Buttons in all three works fine. However, the combo box behaves strangely in the last control. I cannot change the combox item selection with my mouse LeftClick. The only way to get the mouse to work with the combo box is to right-click on the list while it is opened. Then only after that the combo box behaves properly.
Closed Nov 11 at 8:31 PM by BoucherS
Fixed in v2.1.

comments

BoucherS wrote Jun 21, 2013 at 8:31 PM

This is fixed in v2.1.

lloydchristmas wrote Aug 23, 2013 at 6:45 PM

Any known workaround until 2.1 is released?

BoucherS wrote Aug 23, 2013 at 9:09 PM

In WindowContainer.BringToFront() method, remove the line
windowControl.Focus();

That should do it.

rfcdejong wrote Oct 8, 2013 at 2:04 PM

Any idea when 2.1 will be released ? perhaps a beta release on nuget?

Or is there any other workaround which doesn't require a toolkit source code change?

BoucherS wrote Jan 31 at 2:47 PM

v2.1 sources files are available. The Download package will be soon available.