Class WindowOptions
A class representing the options for a Window.
Inherited Members
Namespace: OpenFin.Net.Adapter
Assembly: OpenFin.Net.Adapter.dll
Syntax
public class WindowOptions : OptionsEx
Constructors
WindowOptions(String)
Constructs an instance with a new underlying JObject.
Declaration
public WindowOptions(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The windows name |
WindowOptions(String, String)
Constructs an instance with a new underlying JObject.
Declaration
public WindowOptions(string name, string url)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The windows name |
| System.String | url | The windows URL |
Properties
AcceleratorKeys
Gets or sets the options for accelerator keys on the current window
Declaration
[JsonPropertyName("accelerator")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public AcceleratorKeyOptions AcceleratorKeys { get; set; }
Property Value
| Type | Description |
|---|---|
| AcceleratorKeyOptions |
AlwaysOnTop
The AlwaysOnTop property represents a flag to always position the window at the top of the window stack.
Default: false
Declaration
[JsonPropertyName("alwaysOnTop")]
public bool AlwaysOnTop { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | The AlwaysOnTop property gets/sets the value of the underlying JObject field, "alwaysOnTop". |
AutoShow
The AutoShow property represents a flag to automatically show the Window when it is created.
Default: false
Declaration
[JsonPropertyName("autoShow")]
public bool AutoShow { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | The AutoShow property gets/sets the value of the underlying JObject field, "autoShow". |
BackgroundColor
Gets or sets the backfill color of the current window. The default is black.
Declaration
[JsonIgnore]
public Color BackgroundColor { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Drawing.Color |
ContentNavigationRules
Navigation rules used by this window.
Default: No application rules; the Window will be allowed to navigate to any URL.
Declaration
[JsonPropertyName("contentNavigation")]
public ContentNavigation ContentNavigationRules { get; set; }
Property Value
| Type | Description |
|---|---|
| ContentNavigation |
ContextMenu
The ContextMenu property represents a flag to show the context menu when right-clicking on a window.
Gives access to the Developer Console for the Window.
Default: false
Declaration
[JsonPropertyName("contextMenu")]
public bool ContextMenu { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | The ContextMenu property gets/sets the value of the underlying JObject field, "contextMenu". |
CornerRoundingHeight
The CornerRoundingHeight property represents the rounded corners height to apply.
Default: 0
Declaration
[JsonIgnore]
public int CornerRoundingHeight { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 | The CornerRoundingHeight property gets/sets the value of the underlying JObject field, "cornerRounding.height". |
CornerRoundingWidth
The CornerRoundingWidth property represents the rounded corners width to apply.
Default: 0
Declaration
[JsonIgnore]
public int CornerRoundingWidth { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 | The CornerRoundingWidth property gets/sets the value of the underlying JObject field, "cornerRounding.width". |
CustomRequestHeaders
Defines list of custom request headers for requests sent by the window.
Declaration
[JsonPropertyName("customRequestHeaders")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public List<CustomRequestHeader> CustomRequestHeaders { get; }
Property Value
| Type | Description |
|---|---|
| List<CustomRequestHeader> |
DefaultCentered
The DefaultCentered property specifies that the window will be positioned in the center of the primary monitor when loaded for the first time on a machine.
Default: false
Declaration
[JsonPropertyName("defaultCentered")]
public bool DefaultCentered { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | The DefaultCentered property gets/sets the value of the underlying JObject field, "defaultCentered". |
Remarks
When the window corresponding to that ID is loaded again, the position from before the window was closed is used.
DefaultHeight
The DefaultHeight property represents the window's default height in pixels.
Default: 500
Declaration
[JsonPropertyName("defaultHeight")]
public int DefaultHeight { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 | The DefaultHeight property gets/sets the value of the underlying JObject field, "defaultHeight". |
Remarks
Specifies the height of the window when loaded for the first time on a machine. When a window with the same name and parent application UUID is loaded again, the height is taken to be the last height of the window before it was closed.
DefaultLeft
The DefaultLeft property represents the window's default left position.
Default: 100
Declaration
[JsonPropertyName("defaultLeft")]
public int DefaultLeft { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 | The DefaultLeft property gets/sets the value of the underlying JObject field, "defaultLeft". |
Remarks
Specifies the left position of the window when loaded for the first time on a machine. When a window with the same name and parent application UUID is loaded again, the value of left is taken to be the last value before the window was closed.
DefaultTop
The DefaultTop property represents the window's default top position.
Default: 100
Declaration
[JsonPropertyName("defaultTop")]
public int DefaultTop { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 | The DefaultTop property gets/sets the value of the underlying JObject field, "defaultTop". |
Remarks
Specifies the top position of the window when loaded for the first time on a machine. When a window with the same name and parent application UUID is loaded again, the value of top is taken to be the last value before the window was closed.
DefaultWidth
The DefaultWidth property represents the window's default width in pixels.
Default: 800
Declaration
[JsonPropertyName("defaultWidth")]
public int DefaultWidth { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 | The DefaultWidth property gets/sets the value of the underlying JObject field, "defaultWidth". |
Remarks
Specifies the width of the window when loaded for the first time on a machine. When a window with the same name and parent application UUID is loaded again, the height is taken to be the last width of the window before it was closed.
Frame
The Frame property represents a flag to show the frame.
Default: true
Declaration
[JsonPropertyName("frame")]
public bool Frame { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | The Frame property gets/sets the value of the underlying JObject field, "frame". |
IconPath
Absolute path, relative path, or URL of the icon file to be shown in the window title bar and taskbar. When ommitted, inherits from the parent application.
Declaration
[JsonIgnore]
public string IconPath { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
IconUrl
Absolute URL of the icon file to be shown on the window title bar and taskbar, as defined in IconPath
Declaration
[JsonPropertyName("icon")]
public string IconUrl { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
MaxHeight
The MaxHeight property represents the maximum height of a window.
Will default to the OS defined value if set to -1.
Default: -1
Declaration
[JsonPropertyName("maxHeight")]
public int MaxHeight { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 | The MaxHeight property gets/sets the value of the underlying JObject field, "maxHeight". |
Maximizable
The Maximizable property represents a flag that lets the window be maximized.
Default: true
Declaration
[JsonPropertyName("maximizable")]
public bool Maximizable { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | The Maximizable property gets/sets the value of the underlying JObject field, "maximizable". |
MaxWidth
The MaxWidth property represents the maximum width of a window.
Will default to the OS defined value if set to -1.
Default: -1
Declaration
[JsonPropertyName("maxWidth")]
public int MaxWidth { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 | The MaxWidth property gets/sets the value of the underlying JObject field, "maxWidth". |
MinHeight
The MinHeight property represents the minimum height of a window.
Default: 0
Declaration
[JsonPropertyName("minHeight")]
public int MinHeight { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 | The MinHeight property gets/sets the value of the underlying JObject field, "minHeight". |
Minimizable
The Minimizable property represents a flag that lets the window be minimized.
Default: true
Declaration
[JsonPropertyName("minimizable")]
public bool Minimizable { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | The Minimizable property gets/sets the value of the underlying JObject field, "minimizable". |
MinWidth
The MinWidth property represents the minimum width of a window.
Default: 0
Declaration
[JsonPropertyName("minWidth")]
public int MinWidth { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 | The MinWidth property gets/sets the value of the underlying JObject field, "minWidth". |
Name
The Name property represents the name for the window which must be unique within the context of the invoking Application.
Default: An empty string
Declaration
[JsonPropertyName("name")]
public string Name { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String | The Name property gets/sets the value of the underlying JObject field, "name". |
Opacity
The Opacity property represents a flag that specifies how transparent the window will be.
Default: 1.0
Declaration
[JsonPropertyName("opacity")]
public double Opacity { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double | The Opacity property gets/sets the value of the underlying JObject field, "opacity". |
PreloadScripts
Gets or sets the collection of preload scripts to load automatically after each page navigation.
Declaration
[JsonPropertyName("preloadScripts")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public List<PreloadScript> PreloadScripts { get; set; }
Property Value
| Type | Description |
|---|---|
| List<PreloadScript> |
Resizable
The Resizable property represents a flag which allows the user to resize the window.
This property is deprecated.
Default: true
Declaration
[JsonPropertyName("resizable")]
public bool Resizable { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | The Resizable property gets/sets the value of the underlying JObject field, "resizable". |
ResizeRegionBottomRightCorner
The ResizeRegionBottomRightCorner property defines an additional square region located at the bottom right corner of a frameless window.
Default: 4
Declaration
[JsonIgnore]
public int ResizeRegionBottomRightCorner { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 | The ResizeRegionBottomRightCorner property gets/sets the value of the underlying JObject field, "resizeRegion.bottomRightCorner". |
ResizeRegionSize
The ResizeRegionSize property defines a region in pixels that will respond to user mouse interaction for resizing a frameless window
Default: 2
Declaration
[JsonIgnore]
public int ResizeRegionSize { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 | The ResizeRegionSize property gets/sets the value of the underlying JObject field, "resizeRegion.size". |
SaveWindowState
The SaveWindowState property defines whether or not a window should maintain a persistent cache of its position/size.
Default: true
Declaration
[JsonPropertyName("saveWindowState")]
public bool SaveWindowState { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | The SaveWindowState property gets/sets the value of the underlying JObject field, "saveWindowState". |
Shadow
Gets or sets a value indicating whether to show a shadow on a frameless Window.
Declaration
[JsonPropertyName("shadow")]
public bool Shadow { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
ShowTaskbarIcon
The ShowTaskbarIcon property represents a flag to show the Window's icon in the taskbar.
Default: false
Declaration
[JsonPropertyName("showTaskbarIcon")]
public bool ShowTaskbarIcon { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | The ShowTaskbarIcon property gets/sets the value of the underlying JObject field, "showTaskbarIcon". |
SmallWindow
Determines if window can be smaller than 41x46 px.
Declaration
[JsonPropertyName("smallWindow")]
public bool SmallWindow { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
State
The State property represents a string that sets the window to be "minimized", "maximized", or "normal" on creation.
Default: "normal"
Declaration
[JsonPropertyName("state")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string State { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String | The State property gets/sets the value of the underlying JObject field, "state". |
TaskbarIconGroup
Gets or sets the taskbar group for the window.
Declaration
[JsonPropertyName("taskbarIconGroup")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string TaskbarIconGroup { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
URL
The URL property represents the URL of the window.
Default: "about:blank"
Declaration
[JsonPropertyName("url")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string URL { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String | The URL property gets/sets the value of the underlying JObject field, "url". |
WaitForPageLoadToRender
Determines if OpenFin will wait for DomContent Loaded to display the window.
Declaration
[JsonPropertyName("waitForPageLoad")]
public bool WaitForPageLoadToRender { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |