Export (0) Print
Expand All

ValidationOptionAttribute Class

Custom attribute that contains ValidationOption information. This class cannot be inherited.

Namespace: System.Workflow.ComponentModel.Compiler
Assembly: System.Workflow.ComponentModel (in system.workflow.componentmodel.dll)

[AttributeUsageAttribute(AttributeTargets.Property|AttributeTargets.Event, AllowMultiple=false, Inherited=true)] 
public sealed class ValidationOptionAttribute : Attribute
/** @attribute AttributeUsageAttribute(AttributeTargets.Property|AttributeTargets.Event, AllowMultiple=false, Inherited=true) */ 
public final class ValidationOptionAttribute extends Attribute
AttributeUsageAttribute(AttributeTargets.Property|AttributeTargets.Event, AllowMultiple=false, Inherited=true) 
public final class ValidationOptionAttribute extends Attribute
Not applicable.

This attribute should only be used as dependency property option. Attributes are ignored if declared on a .NET property.

The ValidationOptionAttribute is intended to be used on Meta-properties only. It will be ignored for instance properties. For more information, see Using Activity Properties for more details.

If the ValidationOptionAttribute is not specified, the behavior defaults to ValidationOption.Optional.

public sealed partial class Activity1: Activity
{
    public Activity1()
    {
    }

    public static DependencyProperty MyPropertyProperty = 
        DependencyProperty.Register(
            "MyProperty", 
            typeof(string), 
            typeof(Activity1),
            new PropertyMetadata(
                DependencyPropertyOptions.Metadata,
                new ValidationOptionAttribute(ValidationOption.Required)));

    [Browsable(true)]
    [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
    public string MyProperty
    {
        get
        {
            return ((string)(base.GetValue(Activity1.MyPropertyProperty)));
        }
        set
        {
            base.SetValue(Activity1.MyPropertyProperty, value);
        }
    }
}

System.Object
   System.Attribute
    System.Workflow.ComponentModel.Compiler.ValidationOptionAttribute

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

ADD
Show:
© 2014 Microsoft