Home
Manage Your Code
Snippet: Creating a DependencyProperty in a workflow activity (C#)
Title: Creating a DependencyProperty in a workflow activity Language: C#
Description: This example is to create a User DependencyProperty for a wokflow custom activity "SearchAddress". Views: 726
Author: Kevin Wang Date Added: 11/1/2007
Copy Code  
1        // User DependencyProperty for an authorized user
2        public static DependencyProperty UserProperty = System.Workflow.ComponentModel.DependencyProperty.Register("User", typeof(Austar.Framework.Library.Security.User), typeof(SearchAddressActivity));
3        [Description("An authorized user to use this activity.")]
4        [Category("Allowed User")]
5        [Browsable(true)]
6        [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
7        public Austar.Framework.Library.Security.User User
8        {
9            get
10            {
11                return ((Austar.Framework.Library.Security.User)(base.GetValue(SearchAddressActivity.UserProperty)));
12            }
13            set
14            {
15                base.SetValue(SearchAddressActivity.UserProperty, value);
16            }
17        }