示例#1
0
 private void DealWithSpecialPrintControl(ContentControlBase c, PropertyModel p, TextBox textBox = null)
 {
     if (p.Name == "pX")
     {
         Canvas.SetLeft(c, (double)Convert.ChangeType(p.Value, typeof(double)));
         return;
     }
     if (p.Name == "pY")
     {
         Canvas.SetTop(c, (double)Convert.ChangeType(p.Value, typeof(double)));
         return;
     }
     if (p.PropertyChanged != null)
     {
         PropertyChangedFromTextBoxEventArgs proerty = new PropertyChangedFromTextBoxEventArgs()
         {
             PrintControl = c,
             TextBox      = textBox,
             Property     = p
         };
         p.PropertyChanged(proerty);
     }
 }