Поделиться через


OrderToken.ResolveConflict Method

Called by the default CompareTo implementation when two OrderToken objects appear to be equivalent.

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

Syntax

'Declaration
Protected Overridable Function ResolveConflict ( _
    left As OrderToken, _
    right As OrderToken _
) As Integer
protected virtual int ResolveConflict(
    OrderToken left,
    OrderToken right
)
protected:
virtual int ResolveConflict(
    OrderToken^ left, 
    OrderToken^ right
)
abstract ResolveConflict : 
        left:OrderToken * 
        right:OrderToken -> int 
override ResolveConflict : 
        left:OrderToken * 
        right:OrderToken -> int 
protected function ResolveConflict(
    left : OrderToken, 
    right : OrderToken
) : int

Parameters

Return Value

Type: System.Int32
0, if the two are equal, -1, if left comes before right, 1 otherwise.

Remarks

The ResolveConflict method uses the instantiation order of the two tokens as a tie-breaker. Override this method to implement custom algorithms.

Note

If this method ever returns 0 (indicating that the two tokens are equivalent) and if these tokens belong to a list that is sorted multiple times, the relative order in which they appear in the list will not be guaranteed. Depending on the application, this side-effect may be a problem.

.NET Framework Security

See Also

Reference

OrderToken Class

Microsoft.Windows.Design Namespace

OrderTokenPrecedence

AdornerOrder

PropertyOrder

Other Resources

WPF Designer Extensibility