Exemplo n.º 1
0
    private static void ReadWriteStr_Changed(DependencyObject d,
                                             DependencyPropertyChangedEventArgs e)
    {
        foo f = d as foo;

        if (f != null)
        {
            int iVal;
            if (int.TryParse(f.ReadWriteStr, out iVal))
            {
                f.SetValue(ReadOnlyIntPropertyKey, iVal);
            }
        }
    }