Infragistics(R) NetAdvantage(R) : WPF 2012.1
The xamDialogWindow Control's Behavior
E-mail your feedback on this topic.
Shared XAML > Interactions > xamDialogWindow > Using xamDialogWindow > The xamDialogWindow Control's Behavior

Glossary Item Box

The xamDialogWindow™ control has the following behaviors:

Setting the xamDialogWindow control’s attached properties such as Canvas.Top, Canvas.Left, Grid.Row and Grid.Column will cause some undesirable behavior. If you want to restrict the dialog window to a container, you should set the attached properties on the container that contains the dialog.

The following code demonstrates how to restrict the dialog window to the second column and the second row of the grid panel.

In XAML:

<Grid x:Name="LayoutRoot" Background="White" ShowGridLines="True">
   <Grid.ColumnDefinitions>
      <ColumnDefinition Width="100"></ColumnDefinition>
      <ColumnDefinition ></ColumnDefinition>
      <ColumnDefinition Width="400"></ColumnDefinition>
   </Grid.ColumnDefinitions>

   <Grid.RowDefinitions>
      <RowDefinition></RowDefinition>
      <RowDefinition Height="200"></RowDefinition>
      <RowDefinition Height="50"></RowDefinition>
   </Grid.RowDefinitions>

   <Border Grid.Column="1" Grid.Row="1" BorderBrush="Black" 
           BorderThickness="2">
      <ig:XamDialogWindow x:Name="Dialog1"  
                             Header="Dialog1" >
    </ig:XamDialogWindow>
   </Border>
</Grid>

You can also have multiple dialog windows restricted to the same container. This can be done by using another panel inside of the container.

The following code demonstrates how to achieve this.

In XAML:

<Grid x:Name="LayoutRoot" Background="White" ShowGridLines="True">
   <Grid.ColumnDefinitions>
      <ColumnDefinition Width="100"></ColumnDefinition>
      <ColumnDefinition ></ColumnDefinition>
      <ColumnDefinition Width="400"></ColumnDefinition>
   </Grid.ColumnDefinitions>

   <Grid.RowDefinitions>
      <RowDefinition></RowDefinition>
      <RowDefinition Height="200"></RowDefinition>
      <RowDefinition Height="50"></RowDefinition>
   </Grid.RowDefinitions>

   <Border Grid.Column="1" Grid.Row="1"  BorderBrush="Black" 
           BorderThickness="2">
      <Grid>
         <ig:XamDialogWindow x:Name="Dialog1"  >
         </ig:XamDialogWindow>

         <ig:XamDialogWindow x:Name="Dialog2"  >
         </ig:XamDialogWindow>
      </Grid>
   </Border>
</Grid>


Related Topics

Custom Cursors

Customize Modal Dialog Window Background

Customize the Window Header Icon

Handle Moving Events

Handle Window State Changing Events

Keyboard Settings

Modal and Modeless Dialog Windows

Position Minimized Dialog Window

Set the Dialog Window's Height and Width When Minimized

Start Up Position of xamDialogWindow

Window Header Controls