diff options
| author | LukePulverenti <luke.pulverenti@gmail.com> | 2013-02-23 10:58:08 -0500 |
|---|---|---|
| committer | LukePulverenti <luke.pulverenti@gmail.com> | 2013-02-23 10:58:08 -0500 |
| commit | 17c1fd576057bdd2d6aea517d733fe8af6e6b2ba (patch) | |
| tree | 660f47e816a8599aabdb7ee47f3cde64c72c3f4d /MediaBrowser.UI.Controls/BaseModalWindow.cs | |
| parent | 33ed929b526acbda696f00f5966917ebd6a9ded2 (diff) | |
moved ui to it's own repo
Diffstat (limited to 'MediaBrowser.UI.Controls/BaseModalWindow.cs')
| -rw-r--r-- | MediaBrowser.UI.Controls/BaseModalWindow.cs | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/MediaBrowser.UI.Controls/BaseModalWindow.cs b/MediaBrowser.UI.Controls/BaseModalWindow.cs deleted file mode 100644 index 90bd8114f..000000000 --- a/MediaBrowser.UI.Controls/BaseModalWindow.cs +++ /dev/null @@ -1,62 +0,0 @@ -using System; -using System.Windows; - -namespace MediaBrowser.UI.Controls -{ - /// <summary> - /// Class BaseModalWindow - /// </summary> - public class BaseModalWindow : BaseWindow - { - /// <summary> - /// Shows the modal. - /// </summary> - /// <param name="owner">The owner.</param> - public void ShowModal(Window owner) - { - WindowStyle = WindowStyle.None; - ResizeMode = ResizeMode.NoResize; - ShowInTaskbar = false; - WindowStartupLocation = WindowStartupLocation.Manual; - AllowsTransparency = true; - - Width = owner.Width; - Height = owner.Height; - Top = owner.Top; - Left = owner.Left; - WindowState = owner.WindowState; - Owner = owner; - - ShowDialog(); - } - - /// <summary> - /// Called when [browser back]. - /// </summary> - protected override void OnBrowserBack() - { - base.OnBrowserBack(); - - CloseModal(); - } - - /// <summary> - /// Raises the <see cref="E:System.Windows.FrameworkElement.Initialized" /> event. This method is invoked whenever <see cref="P:System.Windows.FrameworkElement.IsInitialized" /> is set to true internally. - /// </summary> - /// <param name="e">The <see cref="T:System.Windows.RoutedEventArgs" /> that contains the event data.</param> - protected override void OnInitialized(EventArgs e) - { - base.OnInitialized(e); - - DataContext = this; - } - - /// <summary> - /// Closes the modal. - /// </summary> - protected virtual void CloseModal() - { - Close(); - } - } -} |
