Version

Window Header Controls

The default template of the xamDialogWindow™ control contains buttons for Minimizing, Maximizing and closing the control. To simplify toggling which buttons are visible, three properties were added to the control, which simply toggle the VisualStates in the Template.

Your end user can interact with and change the window state of the dialog window by using these buttons. For more information on window states, see the Handle the Window Changing Events.

When your end user minimizes or maximizes the dialog window, that button changes to a Restore button. The restore button will cause the dialog window to return to its original size and position.

By default the Minimize, Maximize and Close buttons are displayed. However, you can change this default feature by setting the xamDialogWindow control’s CloseButtonVisibility, MaximizeButtonVisibility and MinimizeButtonVisibility properties to the Collapsed value of the Visibility enumeration, as demonstrated in the following code.

In XAML:

<Grid x:Name="LayoutRoot" Background="White">
   <ig:XamDialogWindow Content="Dialog Window"
       x:Name="DialogWindow"
       Width="200" Height="200"
       CloseButtonVisibility="Collapsed"
       MaximizeButtonVisibility="Collapsed"
       MinimizeButtonVisibility="Collapsed"/>
</Grid>

In Visual Basic:

Imports System.Windows
…
DialogWindow.CloseButtonVisibility = Visibility.Collapsed
DialogWindow.MaximizeButtonVisibility = Visibility.Collapsed
DialogWindow.MinimizeButtonVisibility = Visibility.Collapsed

In C#:

using System.Windows;
…
DialogWindow.MaximizeButtonVisibility = Visibility.Collapsed;
DialogWindow.MinimizeButtonVisibility = Visibility.Collapsed;
DialogWindow.CloseButtonVisibility = Visibility.Collapsed;