private void Button_Click(object sender, RoutedEventArgs e) { var val = AttachProperty.GetMyValue(lbl); System.Diagnostics.Debug.WriteLine(val); var val1 = AttachProperty.GetMyValue(lbl1); System.Diagnostics.Debug.WriteLine("no attach value:" + val1); }
private void Button_Click_1(object sender, RoutedEventArgs e) { AttachProperty.SetMyValue(lbl, new Random().Next(1, 100)); }