Version

ValidateFocusSite Method (ValueEditor)

Validates the focus site. Returns true if the focus site is acceptable.
Syntax
'Declaration
 
Protected Overridable Function ValidateFocusSite( _
   ByVal focusSite As Object, _
   ByRef errorMessage As Exception _
) As Boolean
protected virtual bool ValidateFocusSite( 
   object focusSite,
   out Exception errorMessage
)

Parameters

focusSite
The focus site to validate.
errorMessage
If the foucs site is invalid then this out parameter will be assigned relevant error message.

Return Value

True if the focus site is valid, False otherwise.
Remarks

ValidateFocusSite method is called to ensure the element named PART_FocusSite in the control template is a valid focus site for the value editor. The default implementation ensures that the focus site is either a FrameworkElement or FrameworkContentElement. Derived value editors can override this method to further constraint what the focus site can be.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also