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)
167_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)
2155Window wnd = null;
System\Windows\Controls\Image.cs (1)
402Image.DpiChangedEvent = Window.DpiChangedEvent.AddOwner(typeof(Image));
System\Windows\Controls\MenuItem.cs (1)
2497&& (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 7622Type type = typeof(System.Windows.Window); 7623DependencyProperty dp = System.Windows.Window.ResizeModeProperty; 7625this.GetXamlType(typeof(System.Windows.Window)), // DeclaringType 7641Type type = typeof(System.Windows.Window); 7642DependencyProperty dp = System.Windows.Window.WindowStateProperty; 7644this.GetXamlType(typeof(System.Windows.Window)), // DeclaringType 7660Type type = typeof(System.Windows.Window); 7661DependencyProperty dp = System.Windows.Window.TitleProperty; 7663this.GetXamlType(typeof(System.Windows.Window)), // DeclaringType 8834Type type = typeof(System.Windows.Window); 8835DependencyProperty dp = System.Windows.Window.AllowsTransparencyProperty; 8837this.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)
3740Window window = null; 3747if (host != null && (window = Window.GetWindow(host)) != null) 3749dobj.SetValue(Window.IWindowServiceProperty, window); 3772dobj.ClearValue(Window.IWindowServiceProperty); 3901bp 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; 105var w = (Window)d; 116private void _SetWindow(Window window) 133Utility.AddDependencyPropertyChangeListener(_window, Window.TemplateProperty, _OnWindowPropertyChangedThatRequiresTemplateFixup); 134Utility.AddDependencyPropertyChangeListener(_window, Window.FlowDirectionProperty, _OnWindowPropertyChangedThatRequiresTemplateFixup); 175Utility.RemoveDependencyPropertyChangeListener(_window, Window.TemplateProperty, _OnWindowPropertyChangedThatRequiresTemplateFixup); 176Utility.RemoveDependencyPropertyChangeListener(_window, Window.FlowDirectionProperty, _OnWindowPropertyChangedThatRequiresTemplateFixup); 191public static WindowChromeWorker GetWindowChromeWorker(Window window) 198public 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), 769typeof(Window), 792if (!((Window) d).IsSourceWindowNull) 806DependencyProperty.Register("Title", typeof(String), typeof(Window), 842typeof(Window), 897typeof(Window), 945Canvas.TopProperty.AddOwner(typeof(Window), 996Canvas.LeftProperty.AddOwner(typeof(Window), 1134typeof(Window), 1171= DependencyProperty.RegisterReadOnly("IsActive", typeof(bool), typeof(Window), 1210public Window Owner 1393DependencyProperty.Register("WindowStyle", typeof(WindowStyle), typeof(Window), 1434if (!((Window)d).IsSourceWindowNull) 1437((Window)d).VerifyConsistencyWithAllowsTransparency((WindowStyle)value); 1449DependencyProperty.Register("WindowState", typeof(WindowState), typeof(Window), 1491DependencyProperty.Register("ResizeMode", typeof(ResizeMode), typeof(Window), 1534typeof(Window), 1568typeof(Window), 1626add { AddHandler(Window.DpiChangedEvent, value); } 1627remove { RemoveHandler(Window.DpiChangedEvent, value); } 1709/// this <see cref="Window"/> object is modified 1747RaiseEvent(new DpiChangedEventArgs(oldDpi, newDpi, Window.DpiChangedEvent, this)); 3109/// Gets or sets a value determining preferred backdrop type for current <see cref="Window"/>. 3123typeof(Window), 3130if (d is not Window window) 3328internal static readonly RoutedCommand DialogCancelCommand = new RoutedCommand("DialogCancel", typeof(Window)); 3530Window thisRef = (Window)arg; 3553CommandManager.RegisterClassCommandBinding(typeof(Window), binding); 3568Window w = target as Window; 5054Window w = (Window)d; 5080Window w = (Window)d; 5098Window w = (Window)d; 5158Window w = (Window)d; 5285Window w = (Window)d; 5305Window w = (Window)d; 5331Window w = (Window)d; 5355Window w = (Window)d; 5625Window w = d as Window; 5636Window w = d as Window; 5697Window w = d as Window; 5720Window w = d as Window; 5759Window w = d as Window; 5797Window w = d as Window; 5818Window w = d as Window; 5859Window w = d as Window; 6052Window w = d as Window; 6089Window w = d as Window; 6128Window w = d as Window; 6164Window w = d as Window; 6243Window w = d as Window; 6268((Window)d).VerifyApiSupported(); 6275Window w = d as Window; 7035Window window = sender as Window; 7043Window window = sender as Window; 7213private Window _ownerWindow; // owner window 7331= DependencyProperty.RegisterAttached("IWindowService", typeof(IWindowService), typeof(Window), 7646internal static HwndStyleManager StartManaging(Window w, int Style, int StyleEx ) 7659private HwndStyleManager(Window w, int Style, int StyleEx ) 7711private Window _window; 7722/// 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; 1164e.NewSource.RootVisual is Window) 1166rib._window = (Window)e.NewSource.RootVisual; 1171private void UnhookWindowListeners(Window win) 1185private void HookWindowListeners(Window win) 1415Window window = ((Ribbon)d)._window; 1547private 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)
542public static void EnableModelessKeyboardInterop(SW.Window window)
System\Windows\Integration\WindowsFormsHost.cs (2)
982Window presentationSourceWindow = presentationSource.RootVisual as Window;