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


RequirementAttribute.AllRequired Property

Gets a value indicating whether all requirement attributes of the same type are required.

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

Syntax

'Declaration
Public Overridable ReadOnly Property AllRequired As Boolean
    Get
public virtual bool AllRequired { get; }
public:
virtual property bool AllRequired {
    bool get ();
}
abstract AllRequired : bool
override AllRequired : bool
function get AllRequired () : boolean

Property Value

Type: System.Boolean
true if all requirement attributes of the same type are required; otherwise, false.

Remarks

If this property returns true, all requirement attributes of the same type must return true from the MeetsRequirement method for the RequirementValidator class to consider the set of requirements met.

If this property returns false, if any one of the requirement attributes of the same type returns true, the requirement is considered met. By convention, requirement attributes that return true from AllRequired are named with the prefix "Requires", as in "RequiresContext". Conversely, all attributes that return false from AllRequired are named with the prefix "Uses", as in "UsesPolicy". The default implementation always returns true.

.NET Framework Security

See Also

Reference

RequirementAttribute Class

Microsoft.Windows.Design Namespace

RequiresContextItemAttribute

RequiresServiceAttribute

UsesItemPolicyAttribute

Other Resources

Understanding WPF Designer Extensibility