In This Article

FloatingWindowControl Class

Represents a WindowControl that is used as the root control of a hosted floating window.

public class FloatingWindowControl : WindowControl
Inheritance:
object Visual UIElement FrameworkElement Control ContentControl WindowControl object

Properties

DockSite

Gets the DockSite that is managing the window.

public DockSite DockSite { get; }

Property Value

DockSite:

The DockSite that is managing the window.

Methods

Activate()

Attempts to bring the window to the foreground and activates it.

public override bool Activate()

Returns

bool:

true if the window was successfully activated; otherwise, false.

GetAdjustedBounds(Rect, ResizeOperation)

Returns an adjusted version of the specified bounds, which can provide support for features such as magnetism.

public override Rect GetAdjustedBounds(Rect bounds, ResizeOperation resizeOperation)
Parameter Type Description
bounds Rect

The bounds to examine.

resizeOperation ResizeOperation

The active resize operation.

Returns

Rect:

The adjusted bounds.

OnActivated(RoutedEventArgs)

Called when the window gains focus within.

protected override void OnActivated(RoutedEventArgs e)
Parameter Type Description
e RoutedEventArgs

A RoutedEventArgs that contains the event data.

Remarks

This method has no default implementation. Because an intermediate class in the inheritance might implement this method, we recommend that you call the base implementation in your implementation.

OnClosing(CancelRoutedEventArgs)

Called directly after Close() is called, and can be handled to cancel window closure.

protected override void OnClosing(CancelRoutedEventArgs e)
Parameter Type Description
e CancelRoutedEventArgs

A CancelRoutedEventArgs that contains the event data.

OnDeactivated(RoutedEventArgs)

Called when the window loses focus within.

protected override void OnDeactivated(RoutedEventArgs e)
Parameter Type Description
e RoutedEventArgs

A RoutedEventArgs that contains the event data.

Remarks

This method has no default implementation. Because an intermediate class in the inheritance might implement this method, we recommend that you call the base implementation in your implementation.

Inherited Members