2 types derived from Window
PresentationFramework (1)
System\Windows\Navigation\NavigationWindow.cs (1)
38public class NavigationWindow : Window, INavigator, INavigatorImpl, IDownloader, IJournalNavigationScopeHost, IUriContext
System.Windows.Controls.Ribbon (1)
Microsoft\Windows\Controls\Ribbon\RibbonWindow.cs (1)
23public class RibbonWindow : Window
9 instantiations of Window
IdeBenchmarks (1)
InheritanceMargin\InheritanceMarginGlyphBenchmarks.cs (1)
168_wpfApp.MainWindow = new Window();
PresentationFramework (2)
System\Windows\Markup\Baml2006\WpfGeneratedKnownTypes.cs (1)
12530DefaultConstructor = delegate () { return new System.Windows.Window(); },
System\Windows\Markup\KnownTypes.cs (1)
1651case KnownElements.Window: o = new System.Windows.Window(); break;
PresentationFramework.Tests (5)
System\Windows\MessageBox.Tests.cs (5)
31MessageBox.Show(new Window(), "Test Message", "Test Caption", (MessageBoxButton)invalidButton)); 59MessageBox.Show(new Window(), "Test Message", "Test Caption", MessageBoxButton.OK, MessageBoxImage.None, (MessageBoxResult)invalidResult)); 101MessageBox.Show(new Window(), "Test Message", "Test Caption", MessageBoxButton.OK, (MessageBoxImage)invalidImage, MessageBoxResult.None)); 139MessageBox.Show(new Window(), "Test Message", "Test Caption", MessageBoxButton.OK, MessageBoxImage.None, MessageBoxResult.None, (MessageBoxOptions)invalidOptions)); 153Window owner = new Window();
Roslyn.VisualStudio.DiagnosticsWindow (1)
VenusMargin\ProjectionBufferMargin.xaml.cs (1)
55var window = new Window
250 references to Window
PresentationFramework (225)
Microsoft\Win32\CommonDialog.cs (2)
114public bool? ShowDialog(Window owner) 286Window.CalculateCenterScreenPosition(hMonitor,
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\SecurityHelper.cs (1)
171System.Windows.Window parent,
System\Windows\Appearance\WindowBackdropManager.cs (1)
28internal static bool SetBackdrop(Window window, WindowBackdropType backdropType)
System\Windows\Application.cs (9)
202public int Run(Window window) 783public Window MainWindow 1651internal int RunInternal(Window window) 1706Window win = obj as Window; 2240if (root is not Window wnd) 2253if (!((Window)window).IsDisposed) 2255((Window)window).Show(); 2429private Window _mainWindow;
System\Windows\Automation\Peers\WindowAutomationPeer.cs (7)
15public WindowAutomationPeer(Window owner): base(owner) 31Window window = (Window)Owner; 64Window window = (Window)Owner; 84Window window = (Window)Owner;
System\Windows\Controls\Button.cs (1)
273MS.Internal.Commands.CommandHelpers.ExecuteCommand(Window.DialogCancelCommand, null, this);
System\Windows\Controls\DocumentViewer.cs (1)
2158Window wnd = null;
System\Windows\Controls\Image.cs (1)
402Image.DpiChangedEvent = Window.DpiChangedEvent.AddOwner(typeof(Image));
System\Windows\Controls\MenuItem.cs (1)
2505&& (Window.GetWindow(this)?.IsActive ?? true))
System\Windows\Controls\Page.cs (3)
36Window.IWindowServiceProperty.OverrideMetadata( 637(Parent is Window) || 689if ((parent is Window) || (parent is Frame))
System\Windows\Controls\Primitives\Popup.cs (1)
795Window.AllowsTransparencyProperty.AddOwner(typeof(Popup),
System\Windows\Controls\Primitives\ResizeGrip.cs (5)
37Window.IWindowServiceProperty.OverrideMetadata( 66rg.OnWindowServiceChanged(e.OldValue as Window, e.NewValue as Window); 75private void OnWindowServiceChanged(Window oldWindow, Window newWindow)
System\windows\Documents\TextEditorDragDrop.cs (2)
629Window window = Window.GetWindow(_textEditor.TextView.RenderScope);
System\Windows\FrameworkElement.cs (1)
710if (this is Window window)
System\Windows\Interop\HwndHost.cs (1)
27HwndHost.DpiChangedEvent = Window.DpiChangedEvent.AddOwner(typeof(HwndHost));
System\Windows\Interop\WindowInteropHelper.cs (2)
32public WindowInteropHelper(Window window) 113private Window _window;
System\Windows\Markup\Baml2006\Baml2006KnownTypes.cs (1)
832case 739: t = () => typeof(Window); break;
System\Windows\Markup\Baml2006\WpfGeneratedKnownProperties.cs (15)
6684Type type = typeof(System.Windows.Window); 6685DependencyProperty dp = System.Windows.Window.ContentProperty; 6687this.GetXamlType(typeof(System.Windows.Window)), // DeclaringType 7618Type type = typeof(System.Windows.Window); 7619DependencyProperty dp = System.Windows.Window.ResizeModeProperty; 7621this.GetXamlType(typeof(System.Windows.Window)), // DeclaringType 7637Type type = typeof(System.Windows.Window); 7638DependencyProperty dp = System.Windows.Window.WindowStateProperty; 7640this.GetXamlType(typeof(System.Windows.Window)), // DeclaringType 7656Type type = typeof(System.Windows.Window); 7657DependencyProperty dp = System.Windows.Window.TitleProperty; 7659this.GetXamlType(typeof(System.Windows.Window)), // DeclaringType 8830Type type = typeof(System.Windows.Window); 8831DependencyProperty dp = System.Windows.Window.AllowsTransparencyProperty; 8833this.GetXamlType(typeof(System.Windows.Window)), // DeclaringType
System\Windows\Markup\Baml2006\WpfGeneratedKnownTypes.cs (1)
12527typeof(System.Windows.Window),
System\Windows\Markup\KnownTypes.cs (1)
6286case KnownElements.Window: t = typeof(System.Windows.Window); break;
System\Windows\MessageBox.cs (6)
251Window owner, 267Window owner, 283Window owner, 298Window owner, 311public static MessageBoxResult Show(Window owner, string messageBoxText, string caption) 321public static MessageBoxResult Show(Window owner, string messageBoxText)
System\Windows\Navigation\NavigationService.cs (5)
3758Window window = null; 3765if (host != null && (window = Window.GetWindow(host)) != null) 3767dobj.SetValue(Window.IWindowServiceProperty, window); 3790dobj.ClearValue(Window.IWindowServiceProperty); 3919bp is Window)
System\Windows\Shell\WindowChrome.cs (4)
69var window = (Window)d; 90public static WindowChrome GetWindowChrome(Window window) 98public static void SetWindowChrome(Window window, WindowChrome chrome)
System\Windows\Shell\WindowChromeWorker.cs (10)
33private Window _window; 112var w = (Window)d; 123private void _SetWindow(Window window) 140Utility.AddDependencyPropertyChangeListener(_window, Window.TemplateProperty, _OnWindowPropertyChangedThatRequiresTemplateFixup); 141Utility.AddDependencyPropertyChangeListener(_window, Window.FlowDirectionProperty, _OnWindowPropertyChangedThatRequiresTemplateFixup); 182Utility.RemoveDependencyPropertyChangeListener(_window, Window.TemplateProperty, _OnWindowPropertyChangedThatRequiresTemplateFixup); 183Utility.RemoveDependencyPropertyChangeListener(_window, Window.FlowDirectionProperty, _OnWindowPropertyChangedThatRequiresTemplateFixup); 201public static WindowChromeWorker GetWindowChromeWorker(Window window) 208public static void SetWindowChromeWorker(Window window, WindowChromeWorker chrome)
System\Windows\SystemCommands.cs (7)
28private static void _PostSystemCommand(Window window, SC command) 39public static void CloseWindow(Window window) 45public static void MaximizeWindow(Window window) 51public static void MinimizeWindow(Window window) 57public static void RestoreWindow(Window window) 65public static void ShowSystemMenu(Window window, Point screenLocation) 72internal static void ShowSystemMenuPhysicalCoordinates(Window window, Point physicalScreenLocation)
System\Windows\ThemeManager.cs (12)
32foreach (Window window in Application.Current.Windows) 54foreach (Window window in FluentEnabledWindows) 90foreach (Window window in Application.Current.Windows) 107internal static void OnWindowThemeChanged(Window window, ThemeMode oldThemeMode, ThemeMode newThemeMode) 134internal static void SyncWindowThemeMode(Window window) 144internal static void ApplyStyleOnWindow(Window window) 223foreach (Window window in Application.Current.Windows) 232private static void RemoveFluentFromWindow(Window window) 248private static void ApplyFluentOnWindow(Window window) 263private static void RemoveStyleFromWindow(Window window) 283private static void ApplyStyleOnWindow(Window window, bool useLightColors) 297window.SetResourceReference(FrameworkElement.StyleProperty, typeof(Window));
System\Windows\ThemeMode.cs (5)
23/// This is the default value for <see cref="Application.ThemeMode"/> and <see cref="Window.ThemeMode"/> 27/// even if <see cref="Window.ThemeMode"/> is set to <see cref="None">, the Fluent theme will be applied on the window. 35/// Whenever this mode is set on <see cref="Application"/> or <see cref="Window"/>, 44/// Whenever this mode is set on <see cref="Application"/> or <see cref="Window"/>, 53/// Whenever this mode is set on <see cref="Application"/> or <see cref="Window"/>,
System\Windows\TreeWalkHelper.cs (1)
457if(fe is Window currentWindow)
System\Windows\Window.cs (112)
45HeightProperty.OverrideMetadata(typeof(Window), new FrameworkPropertyMetadata(new PropertyChangedCallback(_OnHeightChanged))); 46MinHeightProperty.OverrideMetadata(typeof(Window), new FrameworkPropertyMetadata(new PropertyChangedCallback(_OnMinHeightChanged))); 47MaxHeightProperty.OverrideMetadata(typeof(Window), new FrameworkPropertyMetadata(new PropertyChangedCallback(_OnMaxHeightChanged))); 48WidthProperty.OverrideMetadata(typeof(Window), new FrameworkPropertyMetadata(new PropertyChangedCallback(_OnWidthChanged))); 49MinWidthProperty.OverrideMetadata(typeof(Window), new FrameworkPropertyMetadata(new PropertyChangedCallback(_OnMinWidthChanged))); 50MaxWidthProperty.OverrideMetadata(typeof(Window), new FrameworkPropertyMetadata(new PropertyChangedCallback(_OnMaxWidthChanged))); 58VisibilityProperty.OverrideMetadata(typeof(Window), new FrameworkPropertyMetadata(Visibility.Collapsed, new PropertyChangedCallback(_OnVisibilityChanged), new CoerceValueCallback(CoerceVisibility))); 60IsTabStopProperty.OverrideMetadata(typeof(Window), new FrameworkPropertyMetadata(BooleanBoxes.FalseBox)); 61KeyboardNavigation.DirectionalNavigationProperty.OverrideMetadata(typeof(Window), new FrameworkPropertyMetadata(KeyboardNavigationMode.Cycle)); 62KeyboardNavigation.TabNavigationProperty.OverrideMetadata(typeof(Window), new FrameworkPropertyMetadata(KeyboardNavigationMode.Cycle)); 63KeyboardNavigation.ControlTabNavigationProperty.OverrideMetadata(typeof(Window), new FrameworkPropertyMetadata(KeyboardNavigationMode.Cycle)); 64FocusManager.IsFocusScopeProperty.OverrideMetadata(typeof(Window), new FrameworkPropertyMetadata(BooleanBoxes.TrueBox)); 66DefaultStyleKeyProperty.OverrideMetadata(typeof(Window), new FrameworkPropertyMetadata(typeof(Window))); 67_dType = DependencyObjectType.FromSystemTypeInternal(typeof(Window)); 69FlowDirectionProperty.OverrideMetadata(typeof(Window), new FrameworkPropertyMetadata(new PropertyChangedCallback(_OnFlowDirectionChanged))); 72RenderTransformProperty.OverrideMetadata(typeof(Window), new FrameworkPropertyMetadata(Transform.Identity, new PropertyChangedCallback(_OnRenderTransformChanged), new CoerceValueCallback(CoerceRenderTransform))); 73ClipToBoundsProperty.OverrideMetadata(typeof(Window), new FrameworkPropertyMetadata(BooleanBoxes.FalseBox, new PropertyChangedCallback(_OnClipToBoundsChanged), new CoerceValueCallback(CoerceClipToBounds))); 80EventManager.RegisterClassHandler(typeof(Window), 84EventManager.RegisterClassHandler(typeof(Window), 89Window.DpiChangedEvent = EventManager.RegisterRoutedEvent("DpiChanged", RoutingStrategy.Bubble, 90typeof (System.Windows.DpiChangedEventHandler), typeof (Window)); 522public static Window GetWindow(DependencyObject dependencyObject) 530return dependencyObject.GetValue(Window.IWindowServiceProperty) as Window; 617typeof(Window), 620(d, e) => ((Window)d).OnTaskbarItemInfoChanged(e), 775typeof(Window), 798if (!((Window) d).IsSourceWindowNull) 812DependencyProperty.Register("Title", typeof(String), typeof(Window), 848typeof(Window), 903typeof(Window), 951Canvas.TopProperty.AddOwner(typeof(Window), 1002Canvas.LeftProperty.AddOwner(typeof(Window), 1140typeof(Window), 1177= DependencyProperty.RegisterReadOnly("IsActive", typeof(bool), typeof(Window), 1216public Window Owner 1399DependencyProperty.Register("WindowStyle", typeof(WindowStyle), typeof(Window), 1440if (!((Window)d).IsSourceWindowNull) 1443((Window)d).VerifyConsistencyWithAllowsTransparency((WindowStyle)value); 1455DependencyProperty.Register("WindowState", typeof(WindowState), typeof(Window), 1497DependencyProperty.Register("ResizeMode", typeof(ResizeMode), typeof(Window), 1540typeof(Window), 1574typeof(Window), 1632add { AddHandler(Window.DpiChangedEvent, value); } 1633remove { RemoveHandler(Window.DpiChangedEvent, value); } 1715/// this <see cref="Window"/> object is modified 1753RaiseEvent(new DpiChangedEventArgs(oldDpi, newDpi, Window.DpiChangedEvent, this)); 3118/// Gets or sets a value determining preferred backdrop type for current <see cref="Window"/>. 3132typeof(Window), 3139if (d is not Window window) 3337internal static readonly RoutedCommand DialogCancelCommand = new RoutedCommand("DialogCancel", typeof(Window)); 3539Window thisRef = (Window)arg; 3562CommandManager.RegisterClassCommandBinding(typeof(Window), binding); 3577Window w = target as Window; 5066Window w = (Window)d; 5092Window w = (Window)d; 5110Window w = (Window)d; 5170Window w = (Window)d; 5297Window w = (Window)d; 5317Window w = (Window)d; 5343Window w = (Window)d; 5367Window w = (Window)d; 5637Window w = d as Window; 5648Window w = d as Window; 5709Window w = d as Window; 5732Window w = d as Window; 5771Window w = d as Window; 5809Window w = d as Window; 5830Window w = d as Window; 5871Window w = d as Window; 6064Window w = d as Window; 6101Window w = d as Window; 6140Window w = d as Window; 6176Window w = d as Window; 6255Window w = d as Window; 6280((Window)d).VerifyApiSupported(); 6287Window w = d as Window; 7050Window window = sender as Window; 7058Window window = sender as Window; 7228private Window _ownerWindow; // owner window 7346= DependencyProperty.RegisterAttached("IWindowService", typeof(IWindowService), typeof(Window), 7670internal static HwndStyleManager StartManaging(Window w, int Style, int StyleEx ) 7683private HwndStyleManager(Window w, int Style, int StyleEx ) 7735private Window _window; 7746/// Initially, an HWND created in <see cref="Window"/> in a Per-Monitor Aware process may not
System\Windows\WindowCollection.cs (6)
53public Window this[int index] 57return _list[index] as Window; 99public void CopyTo(Window[] array, int index) 158internal void Remove(Window win) 174internal int Add (Window win) 182internal bool HasItem(Window win)
PresentationFramework.Tests (1)
System\Windows\MessageBox.Tests.cs (1)
153Window owner = new Window();
Roslyn.VisualStudio.DiagnosticsWindow (1)
VenusMargin\ProjectionBufferMargin.xaml.cs (1)
55var window = new Window
System.Windows.Controls.Ribbon (12)
Microsoft\Windows\Controls\KeyTipService.cs (2)
1069_currentWindow = Window.GetWindow(scope); 1734private Window _currentWindow = null;
Microsoft\Windows\Controls\Ribbon\Ribbon.cs (7)
639private Window _window = null; 1173e.NewSource.RootVisual is Window) 1175rib._window = (Window)e.NewSource.RootVisual; 1180private void UnhookWindowListeners(Window win) 1194private void HookWindowListeners(Window win) 1424Window window = ((Ribbon)d)._window; 1559private static bool CheckIfWindowIsRibbonWindow(Window win)
Microsoft\Windows\Controls\Ribbon\RibbonContextualTabGroup.cs (2)
327RibbonWindow ribbonWindow = Window.GetWindow(this) as RibbonWindow; 379RibbonWindow ribbonWindow = Window.GetWindow(this) as RibbonWindow;
Microsoft\Windows\Controls\Ribbon\RibbonWindow.cs (1)
52Window.TitleProperty.OverrideMetadata(ownerType, new FrameworkPropertyMetadata(String.Empty, new PropertyChangedCallback(OnTitleChangedCallback)));
WindowsFormsIntegration (11)
System\Windows\Integration\ApplicationInterop.cs (8)
43public static void EnableModelessKeyboardInterop(SW.Window window) 199private static ModelessWindowFilter FindFilter(SW.Window window) 228ModelessWindowFilter windowFilter = WindowFilterList.FindFilter(sender as SW.Window); 243private System.Windows.Window _window; 244public SW.Window Window 252public ModelessWindowFilter(System.Windows.Window window) 401SW.Window rootWindow = null; 404rootWindow = FindRootVisual(wfh) as SW.Window;
System\Windows\Integration\ElementHost.cs (1)
544public static void EnableModelessKeyboardInterop(SW.Window window)
System\Windows\Integration\WindowsFormsHost.cs (2)
989Window presentationSourceWindow = presentationSource.RootVisual as Window;