Dialog w/ Shell Overlay

Topics: Prism v4 - Silverlight 4, Prism v4 - WPF 4
Jan 5, 2011 at 9:24 PM

Using Prism with the dialogpopupbehavior found in the StockTrade RI, I have been using dialogs to provide data entry screens.  What I was searching for at one point was while the dialog was up to shroud the window behind.  Finally came up with fairly simple solution of doing this with a border and a pub/sub event with the EventAggregator.   I figured I would share with the rest since some might want this feature.

In my shell I put a

<border background="black" Visibility="{Binding ChildVisibility}" Grid.RowSpan="X" Grid.ColumnSpan="X" />

the rowpan/columnspan are set relative to your shell if at all.  ChildVisibility is a property of type Visibility in my ShellViewModel, which is initialized to Visibility.Hidden

Then using my event PopupNotificationEvent : CompositePresentationEvent<bool>, I publish true to show the border overlay, corresponding with the dialog activation.  Then of course send a false publication based on dialog closure or entry save and subsequent closure.




Jan 6, 2011 at 1:36 PM

Hi Morgan,

Thank you for sharing your approach with the rest of the community, as this might be valuable for other users pursuing similar scenarios.

Guido Leandro Maliandi