CVB.Net 15.0
Loading...
Searching...
No Matches

Behavior that restricts an overlay's coordinates to a certain region. More...

Static Public Member Functions

static Thickness GetRestrictedFringe (ImageOverlay overlay)
 Gets the RestrictedFringe property from the given overlay .
 
static void SetRestrictedFringe (ImageOverlay overlay, Thickness value)
 Sets the RestrictedFringe property to the given overlay .
 
static WinRect GetEffectiveRect (ImageOverlay overlay)
 Gets the effective coordinate rect based on the displayed image size and its restricted fringe.
 
static void SetRestrictedFringeBasedOnOverlay (ImageOverlay overlayToRestrict, ImageOverlay boundsOverlay, bool relative=true)
 Restricts overlayToRestrict to the rectangle of boundsOverlay .
 

Static Public Attributes

static readonly DependencyProperty RestrictedFringeProperty
 Attached RestrictedFringe property.
 

Detailed Description

Behavior that restricts an overlay's coordinates to a certain region.

Attention: Drag/resize implementation still needs to check this property as otherwise exceptions are thrown (the MovableImageOverlay behavior handles this.).

Member Function Documentation

◆ GetEffectiveRect()

static WinRect GetEffectiveRect ( ImageOverlay overlay)
static

Gets the effective coordinate rect based on the displayed image size and its restricted fringe.

Parameters
overlayOverlay to query
Returns
The effective coordinate rect.

◆ GetRestrictedFringe()

static Thickness GetRestrictedFringe ( ImageOverlay overlay)
static

Gets the RestrictedFringe property from the given overlay .

Parameters
overlayOverlay to get the property from.
Returns
Fringe as Thickness as seen from the borders of the overlayed image.

◆ SetRestrictedFringe()

static void SetRestrictedFringe ( ImageOverlay overlay,
Thickness value )
static

Sets the RestrictedFringe property to the given overlay .

Setting a non-0 fringe will restrict the overlay 's coordinate properties.

Parameters
overlayOverlay to set the property on.
valueFringe as Thickness as seen from the borders of the overlayed image.

◆ SetRestrictedFringeBasedOnOverlay()

static void SetRestrictedFringeBasedOnOverlay ( ImageOverlay overlayToRestrict,
ImageOverlay boundsOverlay,
bool relative = true )
static

Restricts overlayToRestrict to the rectangle of boundsOverlay .

The fringe is not auto-updated: thus if boundsOverlay changes size or location the fringe needs to be updated.

Parameters
overlayToRestrictOverlay to set the fringe to.
boundsOverlayOverlay that functions as the allowed region.
relativetrue if overlayToRestrict is inside a OverlayCanvas of another overlay; false for unrelated overlays.