Class Window
Represents an application window.
Inheritance
System.Object
Window
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: OpenSilver.dll
Syntax
public class Window : FrameworkElement
Constructors
|
Improve this Doc
View Source
Window()
Initializes a new instance of the Window class.
Declaration
Fields
|
Improve this Doc
View Source
ContentProperty
Identifies the Content dependency property.
Declaration
public static readonly DependencyProperty ContentProperty
Field Value
Properties
|
Improve this Doc
View Source
Bounds
Gets the height and width of the application window, as a Rect value.
Declaration
public Rect Bounds { get; }
Property Value
|
Improve this Doc
View Source
Content
Gets or sets the content of the Window.
Declaration
public FrameworkElement Content { get; set; }
Property Value
|
Improve this Doc
View Source
Current
Gets the currently activated window for an application.
Declaration
public static Window Current { get; set; }
Property Value
|
Improve this Doc
View Source
IsActive
Declaration
[NotImplemented]
public bool IsActive { get; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
IsVisible
Declaration
[NotImplemented]
public bool IsVisible { get; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Left
Gets or sets the position of the left edge of the application window; see Remarks
for restrictions on setting this property at run time.
Declaration
[NotImplemented]
public double Left { get; set; }
Property Value
Type |
Description |
System.Double |
|
|
Improve this Doc
View Source
Title
Gets or sets the window title bar text.
Declaration
[NotImplemented]
public string Title { get; set; }
Property Value
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Top
Gets or sets the position of the top edge of the application window; see Remarks
for restrictions on setting this property at run time.
Declaration
[NotImplemented]
public double Top { get; set; }
Property Value
Type |
Description |
System.Double |
|
|
Improve this Doc
View Source
WindowState
Declaration
[NotImplemented]
public WindowState WindowState { get; set; }
Property Value
|
Improve this Doc
View Source
WindowStyle
Declaration
[NotImplemented]
public WindowStyle WindowStyle { get; set; }
Property Value
Methods
|
Improve this Doc
View Source
Activate()
Attempts to activate the application window by bringing it to the foreground
and setting the input focus to it.
Declaration
|
Improve this Doc
View Source
ArrangeOverride(Size)
Declaration
protected override Size ArrangeOverride(Size finalSize)
Parameters
Type |
Name |
Description |
Size |
finalSize |
|
Returns
Overrides
|
Improve this Doc
View Source
AttachToDomElement(Object)
Set the DOM element that will host the window. This can be set only to new windows. The MainWindow looks for a DIV that has the ID "cshtml5-root" or "opensilver-root".
Declaration
public void AttachToDomElement(object rootDomElement)
Parameters
Type |
Name |
Description |
System.Object |
rootDomElement |
The DOM element that will host the window
|
|
Improve this Doc
View Source
Close()
Declaration
[NotImplemented]
public void Close()
|
Improve this Doc
View Source
CreateDomElement(Object, out Object)
Declaration
public override object CreateDomElement(object parentRef, out object domElementWhereToPlaceChildren)
Parameters
Type |
Name |
Description |
System.Object |
parentRef |
|
System.Object |
domElementWhereToPlaceChildren |
|
Returns
Type |
Description |
System.Object |
|
Overrides
|
Improve this Doc
View Source
DragMove()
Declaration
[NotImplemented]
public void DragMove()
|
Improve this Doc
View Source
DragResize(WindowResizeEdge)
Declaration
[NotImplemented]
public void DragResize(WindowResizeEdge resizeEdge)
Parameters
|
Improve this Doc
View Source
GetWindow(DependencyObject)
Declaration
[NotImplemented]
public static Window GetWindow(DependencyObject dependencyObject)
Parameters
Returns
|
Improve this Doc
View Source
MeasureOverride(Size)
Declaration
protected override Size MeasureOverride(Size availableSize)
Parameters
Type |
Name |
Description |
Size |
availableSize |
|
Returns
Overrides
|
Improve this Doc
View Source
OnClosing(ClosingEventArgs)
Declaration
protected void OnClosing(ClosingEventArgs eventArgs)
Parameters
|
Improve this Doc
View Source
OnContentChanged(Object, Object)
Declaration
protected void OnContentChanged(object oldContent, object newContent)
Parameters
Type |
Name |
Description |
System.Object |
oldContent |
|
System.Object |
newContent |
|
|
Improve this Doc
View Source
Show()
Declaration
[NotImplemented]
public void Show()
Events
|
Improve this Doc
View Source
Closing
Occurs when the window is about to close.
Declaration
public event EventHandler<ClosingEventArgs> Closing
Event Type
|
Improve this Doc
View Source
SizeChanged
Occurs when the window has rendered or changed its rendering size.
Declaration
public event WindowSizeChangedEventHandler SizeChanged
Event Type
Extension Methods