コード例 #1
0
 private static void IncrementChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
 {
     try
     {
         float       newValue = (float)e.NewValue;
         SelectFloat item     = sender as SelectFloat;
         TextBox     tb       = (TextBox)LogicalTreeHelper.FindLogicalNode(item, "txt");
         string      val      = newValue.ToString("f3");
         tb.Text = val;
     }
     catch { }
 }
コード例 #2
0
 private static void IncrementTextChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
 {
     try
     {
         if (e.NewValue == null)
         {
             return;
         }
         SelectFloat item = sender as SelectFloat;
         item.Increment = Convert.ToSingle(e.NewValue);
         item.txt.Text  = item.Increment.ToString("f3");
     }
     catch { }
 }
コード例 #3
0
        private static void MaxValueChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
        {
            SelectFloat source = (SelectFloat)sender;

            source.txt_TextChanged(null, null);
        }