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
- intent
Type: Microsoft.Windows.Design.Interaction.PlacementIntent
Specifies the reason for this placement call.
- position
Type: Microsoft.Windows.Design.Interaction.RelativePosition
Coordinate to be set.
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
Microsoft.Windows.Design.Interaction Namespace