Constructors

ThemedDocumentControlHandler

#
public ThemedDocumentControlHandler()
Initializes a new instance of the ThemedDocumentControlHandler class.

Properties

AllowDrop

public virtual bool AllowDrop { get; set; }
Gets or sets a value indicating whether this control can serve as drop target.
inherited fromThemedControlHandler<TControl, TWidget, TCallback>

AllowNavigationButtons

#
public bool AllowNavigationButtons { get; set; }
Gets or sets a value indicating the tabs can be navigated by next and previous buttons.

AllowReordering

#
public bool AllowReordering { get; set; }
Gets or sets a value indicating whether to allow page reordering.

BackgroundColor

#
public override Color BackgroundColor { get; set; }
Gets or sets the color for the background of the control
Remarks: Note that on some platforms (e.g. Mac), setting the background color of a control can change the performance characteristics of the control and its children, since it must enable layers to do so.
The color of the background.
BackgroundColor

Callback

public TCallback Callback { get; }
Gets the callback object for the control
inherited fromWidgetHandler<TControl, TWidget, TCallback>
Remarks: This object is typically a single static instance that is used by the platform handlers to call private or protected methods on the widget, such as protected event methods e.g. protected virtual void OnClick(EventArgs e)
The callback.

CloseBackgroundColor

#
public Color CloseBackgroundColor { get; set; }
Gets or sets the background color for the close button.

CloseCornerRadius

#
public int CloseCornerRadius { get; set; }
Gets or sets the corner radius of the close button.

CloseForegroundColor

#
public Color CloseForegroundColor { get; set; }
Gets or sets the foreground color for the close button.

CloseHighlightBackgroundColor

#
public Color CloseHighlightBackgroundColor { get; set; }
Gets or sets the highlight background color for the close button.

CloseHighlightForegroundColor

#
public Color CloseHighlightForegroundColor { get; set; }
Gets or sets the highlight foreground color for the close button.

Connector

protected WidgetHandler<TControl, TWidget>.WeakConnector Connector { get; }
Gets a weak connector class to hook up events to the underlying control
inherited fromWidgetHandler<TControl, TWidget>
Remarks: Some frameworks (e.g. gtk, monomac, ios, android) keep track of references in a way that leak objects when there is a circular reference between the control and the handler. This is the case when registering events from the control to a method implemented in the handler. This instance can be used to connect the objects together using a weak reference to the handler, allowing controls to be garbage collected.
The connector instance

ContextMenu

public ContextMenu ContextMenu { get; set; }
Gets or sets the context menu to show when the user right clicks or presses the menu key
inherited fromThemedControlHandler<TControl, TWidget, TCallback>

Cursor

public virtual Cursor Cursor { get; set; }
Gets or sets the type of cursor to use when the mouse is hovering over the control
inherited fromThemedControlHandler<TControl, TWidget, TCallback>

DisabledForegroundColor

#
public Color DisabledForegroundColor { get; set; }
Gets or sets the disabled foreground color.

DisposeControl

protected virtual bool DisposeControl { get; }
Gets a value indicating that control should automatically be disposed when this widget is disposed
inherited fromWidgetHandler<TControl, TWidget>

Enabled

#
public override bool Enabled { get; set; }
Gets or sets a value indicating whether this control is enabled

Font

#
public Font Font { get; set; }
Gets or sets the font for the tab text.

HasControl

public bool HasControl { get; }
Gets a value indicating whether this instance has a WidgetHandler<TControl, TWidget>.Control instance.
inherited fromWidgetHandler<TControl, TWidget>

HasFocus

public virtual bool HasFocus { get; }
Gets a value indicating whether this instance has the keyboard input focus.
inherited fromThemedControlHandler<TControl, TWidget, TCallback>

IsMouseCaptured

public bool IsMouseCaptured { get; }
Gets a value indicating this control currently has mouse capture
inherited fromThemedControlHandler<TControl, TWidget, TCallback>
Remarks: Mouse capture can happen during a handled MouseDown event until MouseUp, or it can be captured explicitly via Control.IHandler.CaptureMouse().
IsMouseCaptured

KeyboardControl

protected virtual Control KeyboardControl { get; }
Gets the control used to attach keyboard and text input events
inherited fromThemedControlHandler<TControl, TWidget, TCallback>

Location

public virtual Point Location { get; }
Gets the location of the control as positioned by the container
inherited fromThemedControlHandler<TControl, TWidget, TCallback>
Remarks: A control's location is set by the container. This can be used to determine where the control is for overlaying floating windows, menus, etc.
The current location of the control
Location

NativeHandle

public virtual nint NativeHandle { get; }
Gets the native platform-specific handle for integration purposes
inherited fromWidgetHandler<TWidget>

PropagateLoadEvents

public virtual bool PropagateLoadEvents { get; }
Gets a value indicating whether Control.PreLoad/Control.Load/Control.LoadComplete/Control.UnLoad events are propagated to the inner control
inherited fromThemedControlHandler<TControl, TWidget, TCallback>
Remarks: Typically this should be true so that the events are propagated, but when you set the control hierarchy manually, such as a TabPage on a TabControl, you can return false here since the load events will be handled automatically by the internal eto controls.
true if propagate load events; otherwise, false.

RecurseToChildren

public virtual bool RecurseToChildren { get; }
Gets a value indicating whether PreLoad/Load/LoadComplete/Unload events are propegated to the children controls
inherited fromThemedContainerHandler<TControl, TWidget, TCallback>
Remarks: This is mainly used when you want to use Eto controls in your handler, such as with the ThemedContainerHandler<TContainer, TWidget, TCallback>
true to recurse events to children; otherwise, false.
RecurseToChildren

SelectedIndex

#
public int SelectedIndex { get; set; }
Gets or sets the index of the selected.

Size

public virtual Size Size { get; set; }
Gets or sets the size of the control. Use -1 to specify auto sizing for either the width and/or height.
inherited fromThemedControlHandler<TControl, TWidget, TCallback>

SupportedPlatformCommands

public virtual IEnumerable<string> SupportedPlatformCommands { get; }
Gets the supported platform commands that can be used to hook up system functions to user defined logic
inherited fromThemedControlHandler<TControl, TWidget, TCallback>

TabBackgroundColor

#
public Color TabBackgroundColor { get; set; }
Gets or sets the background color for the tab.

TabForegroundColor

#
public Color TabForegroundColor { get; set; }
Gets or sets the foreground color for the tab.

TabHighlightBackgroundColor

#
public Color TabHighlightBackgroundColor { get; set; }
Gets or sets the highlight background color for the highlighted or selected tab.

TabHighlightForegroundColor

#
public Color TabHighlightForegroundColor { get; set; }
Gets or sets the highlight foreground color for the highlighted or selected tab.

TabHoverBackgroundColor

#
public Color TabHoverBackgroundColor { get; set; }
Gets or sets the background color for the tab under mouse.

TabHoverForegroundColor

#
public Color TabHoverForegroundColor { get; set; }
Gets or sets the foreground color for the tab under mouse.

TabIndex

public int TabIndex { get; set; }
Gets or sets the tab index order for this control within its container.
inherited fromThemedControlHandler<TControl, TWidget, TCallback>
Remarks: This sets the order when using the tab key to cycle through controls Note that some platforms (Gtk and WinForms) may not support setting the context of the tab order to StackLayout or DynamicLayout containers and may not behave exactly as expected. Use the PlatformFeatures.TabIndexWithCustomContainers flag to determine if it is supported.
The index of the control in the tab order.
TabIndex

TabPadding

#
public Padding TabPadding { get; set; }
Gets or sets the padding inside each tab around the text.

TabStop

public virtual bool TabStop { get; set; }
Gets or sets a value indicating whether the user can get to this control using the tab key.
inherited fromThemedControlHandler<TControl, TWidget, TCallback>
true to include the control in the tab order (the default); false to skip it.
TabStop

ToolTip

public virtual string ToolTip { get; set; }
Gets or sets the tool tip to show when the mouse is hovered over the control
inherited fromThemedControlHandler<TControl, TWidget, TCallback>

UnsavedBackgroundColor

#
public Color UnsavedBackgroundColor { get; set; }
Gets or sets the background color for the unsaved changes indicator.

UseFixedTabHeight

#
public bool UseFixedTabHeight { get; set; }
Gets or sets a value indicating whether to use a fixed tab height.

Visible

public virtual bool Visible { get; set; }
Gets or sets a value indicating whether this control is visible to the user.
inherited fromThemedControlHandler<TControl, TWidget, TCallback>
Remarks: When the visibility of a control is set to false, it will still occupy space in the layout, but not be shown. The only exception is for controls like the Splitter, which will hide a pane if the visibility of one of the panels is changed.
true if visible; otherwise, false.
Visible

VisualControls

public virtual IEnumerable<Control> VisualControls { get; }
Gets an enumeration of controls that are in the visual tree.
inherited fromThemedControlHandler<TControl, TWidget, TCallback>
Remarks: This is used to specify which controls are contained by this instance that are part of the visual tree. This should include all controls including non-logical Eto controls used for layout.
The visual controls.
VisualControls

Widget

public TWidget Widget { get; }
Gets the widget that this platform handler is attached to
inherited fromWidgetHandler<TWidget>

Methods

CaptureMouse

public bool CaptureMouse()
Captures all mouse events to this control.
inherited fromThemedControlHandler<TControl, TWidget, TCallback>
Remarks: This captures all mouse events until Control.IHandler.ReleaseMouseCapture() is called. Note that not all platforms will allow a mouse capture unless the mouse is currently down.
true if the mouse was captured, false otherwise.
CaptureMouse

CreateConnector

protected virtual WidgetHandler<TControl, TWidget>.WeakConnector CreateConnector()
Creates the event connector for this control
inherited fromWidgetHandler<TControl, TWidget>
Remarks: This creates the weak connector to use for event registration and other purposes.

CreateControl

protected virtual TControl CreateControl()
Creates the control if not already set.
inherited fromWidgetHandler<TControl, TWidget>
Remarks: Override this to create the control instance for the handler. This makes it easy to extend existing handler implementations with different control implementations. Some platforms (e.g. Mac) require subclasses to implement/override functionality.
The control.

DetachEvent

public virtual bool DetachEvent(string id)
Detaches an event from the platform-specific control, undoing WidgetHandler<TWidget>.AttachEvent(string).
inherited fromWidgetHandler<TWidget>
Remarks: Implementors can override this for events that hold onto something worth giving back while they are attached, such as a system wide hook. Most events cost nothing to leave attached for the life of the widget, which is why the default is to refuse. Only reached for events whose remove accessor uses PropertyStore.RemoveHandlerEvent(string, Delegate), and never for an event that is attached because the widget overrides its On[Event] method.
id (string)Identifier of the event
True if the event was detached, false if this platform can't detach it, in which case it stays attached and won't be attached again on a later subscription.

Dispose

protected override void Dispose(bool disposing)
Disposes this widget and the associated control if WidgetHandler<TControl, TWidget>.DisposeControl is true
inherited fromWidgetHandler<TControl, TWidget>

DoDragDrop

public void DoDragDrop(DataObject data, DragEffects allowedAction, Image image, PointF cursorOffset)
Starts drag operation using this control as drag source.
inherited fromThemedControlHandler<TControl, TWidget, TCallback>
data (DataObject)Drag data.
allowedAction (DragEffects)Allowed action.
image (Image)Custom drag image
cursorOffset (PointF)Offset of the cursor to the drag image
DoDragDrop

Focus

public virtual void Focus()
Attempts to set the keyboard input focus to this control, or the first child that accepts focus
inherited fromThemedControlHandler<TControl, TWidget, TCallback>

GetNativeParentWindow

public Window GetNativeParentWindow()
Gets the window this control is contained in
inherited fromThemedControlHandler<TControl, TWidget, TCallback>

GetPreferredSize

public virtual SizeF GetPreferredSize(SizeF availableSize)
Gets the preferred size of this control given the specified availableSize.
inherited fromThemedControlHandler<TControl, TWidget, TCallback>
availableSize (SizeF)The available size to determine the preferred size
The preferred size this control would like to be, which can be larger than the specified availableSize.
GetPreferredSize

HandleEvent

public void HandleEvent(string id, bool defaultEvent = false)
Called to handle a specific event
inherited fromWidgetHandler<TWidget>
Remarks: Most events are late bound by this method. Instead of wiring all events, this will be called with an event string that is defined by the control. This is called automatically when attaching to events, but must be called manually when users of the control only override the event's On... method. Override the WidgetHandler<TWidget>.AttachEvent(string) to attach your events
id (string)ID of the event to handle
defaultEvent (bool = false)True if the event is default (e.g. overridden or via an event handler subscription)
HandleEvent

Initialize

protected override void Initialize()
Called to initialize this widget after it has been constructed
inherited fromThemedControlHandler<TControl, TWidget, TCallback>
Remarks: Override this to initialize any of the platform objects. This is called in the widget constructor, after all of the widget's constructor code has been called.

Invalidate

public virtual void Invalidate(bool invalidateChildren)
Queues a repaint of the entire control on the screen
inherited fromThemedControlHandler<TControl, TWidget, TCallback>
Remarks: This is only useful when the control is visible.
invalidateChildren (bool)True to invalidate all children, false to only invalidate the container
Invalidate

Invalidate

public virtual void Invalidate(Rectangle rect, bool invalidateChildren)
Queues a repaint of the specified rect of the control
inherited fromThemedControlHandler<TControl, TWidget, TCallback>
Remarks: This is only useful when the control is visible.
rect (Rectangle)Rectangle to repaint
invalidateChildren (bool)True to invalidate all children, false to only invalidate the container
Invalidate

IsEventHandled

public bool IsEventHandled(string id)
Gets a value indicating that the specified event is handled
inherited fromWidgetHandler<TWidget>
id (string)Identifier of the event
True if the event is handled, otherwise false

MapPlatformCommand

public virtual void MapPlatformCommand(string systemAction, Command action)
Specifies a command to execute for a platform-specific command
inherited fromThemedControlHandler<TControl, TWidget, TCallback>

OnInitializeComplete

protected virtual void OnInitializeComplete()
Called after initialization is complete
inherited fromWidgetHandler<TWidget>
Remarks: Override this to perform any logic after the handler is fully initialized, but before returning from the construction of the widget. This by default applies the any styles for the handler.

PointFromScreen

public virtual PointF PointFromScreen(PointF point)
Converts a point from screen space to control space.
inherited fromThemedControlHandler<TControl, TWidget, TCallback>

PointToScreen

public virtual PointF PointToScreen(PointF point)
Converts a point from control space to screen space
inherited fromThemedControlHandler<TControl, TWidget, TCallback>

ResumeLayout

public virtual void ResumeLayout()
Resumes the layout after it has been suspended, and performs a layout
inherited fromThemedControlHandler<TControl, TWidget, TCallback>
Remarks: This can be used to optimize some platforms while adding, removing, or changing many child controls at once. Each call to ResumeLayout() must be balanced with a call to ThemedControlHandler<TControl, TWidget, TCallback>.SuspendLayout() before it.
ResumeLayout

SetParent

public virtual void SetParent(Container oldParent, Container newParent)
Called when the parent of the control has been set
inherited fromThemedControlHandler<TControl, TWidget, TCallback>
oldParent (Container)Old parent for the control, or null if the control is added
newParent (Container)New parent for the control, or null if the parent was removed
SetParent

SuspendLayout

public virtual void SuspendLayout()
Suspends the layout of child controls
inherited fromThemedControlHandler<TControl, TWidget, TCallback>
Remarks: This can be used to optimize some platforms while adding, removing, or changing many child controls at once. It disables the calculation of control positioning until ThemedControlHandler<TControl, TWidget, TCallback>.ResumeLayout() is called. Each call to SuspendLayout() must be balanced with a call to ThemedControlHandler<TControl, TWidget, TCallback>.ResumeLayout().
SuspendLayout

UnhandleEvent

public void UnhandleEvent(string id)
Called when the last subscriber to an event has been removed, giving WidgetHandler<TWidget>.DetachEvent(string) the chance to stop listening for it.
inherited fromWidgetHandler<TWidget>

UpdateLayout

public void UpdateLayout()
Updates the layout of this control if necessary.
inherited fromThemedControlHandler<TControl, TWidget, TCallback>
Remarks: This will ensure the control has had all of its layout applied so you can use its position and size right after this call. Most platforms (except WinForms) use a deferred layout system so that after adding your control to the form dynamically it won't get laid out until the next idle loop. This is useful when you need to know the dimensions of the control immediately.
UpdateLayout