This project has moved. For the latest updates, please go here.

windowcontainer is always behind other objects

Jun 21, 2013 at 7:59 PM
Hello,

Loving the toolkit! I do have one problem with the windowcontainer. I defined a windowcontainer and Child window that I am activating based on conditions using a Command. That part fires fine. But when the window is activated, it is behind other objects such as a Groupbox I have defined.. is there a way to make it appear on top? thought this would have been default behavior..

Thanks
Harold
Developer
Jun 25, 2013 at 12:04 PM
Try defining the WindowContainer at the same level of the "grid" containing your objects. For example :

<Grid>
<Grid>
   <Grid.RowDefinitions>
        <RowDefinition />
         <RowDefinition />
         <RowDefinition />
    </Grid.RowDefinitions>

  <TextBlock Text="First Name:" />
  <TextBlock Grid.Row="1" Text="Last Name:" />
  <TextBlock Grid.Row="2" Text="Address:"/>
</Grid>

<xctk:WindowContainer x:Name="_windowContainer" ModalBackgroundBrush="#80000000">
    <xctk:ChildWindow x:Name="_childWindow" 
                                 Left="75"
                                 Top="50"
                                 Width="275"
                                 Height="125"
                                 IsModal="True"
                                 WindowState="Open">
                       <TextBlock Text="This is a regular Child Window" Padding="10"/>
       </xctk:ChildWindow>
</xctk:WindowContainer>
</Grid>