Share via


PlacementAdapter.CanSetPosition Method

Returns a value that indicates whether the specified coordinate can be set.

Namespace:  Microsoft.Windows.Design.Interaction
Assembly:  Microsoft.Windows.Design.Interaction (in Microsoft.Windows.Design.Interaction.dll)

Syntax

'Declaration
Public MustOverride Function CanSetPosition ( _
    intent As PlacementIntent, _
    position As RelativePosition _
) As Boolean
public abstract bool CanSetPosition(
    PlacementIntent intent,
    RelativePosition position
)
public:
virtual bool CanSetPosition(
    PlacementIntent intent, 
    RelativePosition^ position
) abstract
abstract CanSetPosition : 
        intent:PlacementIntent * 
        position:RelativePosition -> bool 
public abstract function CanSetPosition(
    intent : PlacementIntent, 
    position : RelativePosition
) : boolean

Parameters

Return Value

Type: System.Boolean
true if the coordinate can be set; otherwise, false.

Exceptions

Exception Condition
ArgumentNullException

position is nulla null reference (Nothing in Visual Basic).

Remarks

The PlacementIntent is used by the placement adapter to fill in missing values from the specified placement positions. For example, if the PlacementIntent is Move and you pass in a value for LeftSide, but not RightSide, the placement adapter adjusts the right side so that the size of the control remains constant.

.NET Framework Security

See Also

Reference

PlacementAdapter Class

Microsoft.Windows.Design.Interaction Namespace

AdornerPlacementCollection

AdornerPanel

Other Resources

Walkthrough: Creating a Design-time Adorner

Adorner Architecture