Table of Contents

Class Window

Namespace
nanoFramework.Presentation
Assembly
nanoFramework.Graphics.dll

Represents a window control for displaying content on the screen.

public class Window : ContentControl
Inheritance
Window
Inherited Members
Extension Methods

Constructors

Window()

Constructs a window object

public Window()

Remarks

Automatic determination of current Dispatcher. Use alternative constructor
that accepts a Dispatcher for best performance.

REFACTOR -- consider specifying app default window sizes to cover Aux case for default window size.

Properties

Left

Gets or sets the distance between the left edge of the window and the left edge of the screen.

public int Left { get; set; }

Property Value

int

SizeToContent

Auto size Window to its content's size

public SizeToContent SizeToContent { get; set; }

Property Value

SizeToContent

Default value is SizeToContent.Manual

Remarks

  1. SizeToContent can be applied to Width Height independently
  2. After SizeToContent is set, setting Width/Height does not take affect if that dimension is sizing to content.

Top

Gets or sets the distance between the top of the window and the top of the screen.

public int Top { get; set; }

Property Value

int

Topmost

Gets or sets a value that indicates whether the window always appears on top of other windows.

public bool Topmost { get; set; }

Property Value

bool

Methods

ArrangeOverride(int, int)

ArrangeOverride allows for the customization of the positioning of children.

protected override void ArrangeOverride(int arrangeWidth, int arrangeHeight)

Parameters

arrangeWidth int

The width of the CustomControl.

arrangeHeight int

The height of the CustomControl.

Remarks

Deducts the frame size of the window from the constraint and then arranges it's child. Supports only one child.

Close()

Closes the window.

public void Close()

MeasureOverride(int, int, out int, out int)

Measurement override. Implements content sizing logic.

protected override void MeasureOverride(int availableWidth, int availableHeight, out int desiredWidth, out int desiredHeight)

Parameters

availableWidth int

The available width.

availableHeight int

The available height.

desiredWidth int

The desired width.

desiredHeight int

The desired height.

Remarks

Deducts the frame size from the constraint and then passes it on to it's child. Only supports one Visual child (just like control)