Click here to Skip to main content
15,908,445 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
public static readonly DependencyProperty DiscTypeProperty = DependencyProperty.Register("DiscTypeDP", typeof(string), typeof(ItemReceipt));
        public string DiscType
        {
            get
            {
                return GetValue<string>(DiscTypeProperty);
            }
            set
            {

                //if (IsLoaded)
                //{
                if (DiscLevel == "H")
                {
                    if (DiscType == null || DiscType != value)
                    {
                        SetValue<string>(DiscTypeProperty, value);
                        DiscValue = 0;
                    }
                }
                else
                {
                    SetValue<string>(DiscTypeProperty, value);
                }
                //}

            }
        }
Posted
Updated 14-Feb-12 22:27pm
v4

1 solution

You need to use StyleTriggers in your XAML that will then bind to your dependency property.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900