Window opened from DataGrid is placed in background

Posted by 0xddr on Stack Overflow See other posts from Stack Overflow or by 0xddr
Published on 2012-04-16T11:24:39Z Indexed on 2012/04/16 11:30 UTC
Read the original article Hit count: 173

Filed under:
|
|
|
|

One column in DataGrid looks like that:

<DataTemplate>
    <StackPanel>
        <Image MouseDown="OpenWindow" />
        <Image MouseDown="func2"/>
    </StackPanel>
</DataTemplate>

In OpenWindow window is opened: it starts opening in foreground (in front of the window with DataGrid), but when creating UI ends it is placed behind window with DataGrid, which is not expected behavior.

When I changed Image to Button and MouseDown to Click everything works as it should (opened window is placed in front of the one with DataGrid).

© Stack Overflow or respective owner

Related posts about c#

Related posts about wpf