Infragistics(R) NetAdvantage(R) : WPF 2012.1
Customize Modal Dialog Window Background
E-mail your feedback on this topic.
Shared XAML > Interactions > xamDialogWindow > Using xamDialogWindow > Customize Modal Dialog Window Background

Glossary Item Box

A modal dialog window always maintains the active window status until it is closed. When a modal dialog window is opened, your end user cannot interact with any other part of the application until the dialog window is closed.

When a dialog window is open, the rest of the application is grayed out. However, you can change this default style by setting the xamDialogWindow control’s ModalBackground, ModalBackgroundOpacity and ModalBackgroundEffect properties.

The following code demonstrates how to set these modal dialog properties.

In XAML:

<Grid x:Name="LayoutRoot" Background="White">
   <ig:XamDialogWindow x:Name="DialogWindow" Width="200" 
       Height="200" Content="This is a sample dialog" 
IsModal="True" ModalBackground="Green" ModalBackgroundOpacity="0.8"> <ig:XamDialogWindow.ModalBackgroundEffect> <BlurEffect Radius="10"/> </ig:XamDialogWindow.ModalBackgroundEffect> </ig:XamDialogWindow> </Grid>

In Visual Basic:

Imports System.Windows.Media.Effects
...
Dim modalBrush As New SolidColorBrush()
modalBrush.Color = Colors.Green
DialogWindow.ModalBackground = modalBrush
DialogWindow.ModalBackgroundOpacity = 0.8

Dim myBlurEffect As New BlurEffect()
blurEffectModal.Radius = 10
DialogWindow.ModalBackgroundEffect = blurEffectModal  

In C#:

using System.Windows.Media.Effects;
...
SolidColorBrush colorModal = new SolidColorBrush();
colorModal.Color = Colors.Green;
DialogWindow.ModalBackground = colorModal;
DialogWindow.ModalBackgroundOpacity = 0.8;
BlurEffect blurEffectModal = new BlurEffect();
blurEffectModal.Radius = 10;
DialogWindow.ModalBackgroundEffect = blurEffectModal;


Customize Modal Dialog Window Background
Related Topics

Custom Cursors

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

The xamDialogWindow Control's Behavior

Window Header Controls