コード例 #1
0
        }                               //part to new TextBox class

        private void Swap_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            if (!IsTextBoxVisible)
            {
                NetMaskTB.Visibility = Visibility.Visible;
                NetMaskCB.BeginAnimation(ComboBox.OpacityProperty, SwapOpacityTo0);
                NetMaskTB.BeginAnimation(TextBox.OpacityProperty, SwapOpacityTo1);
            }
            else if (IsTextBoxVisible)
            {
                NetMaskCB.Visibility = Visibility.Visible;
                NetMaskCB.BeginAnimation(ComboBox.OpacityProperty, SwapOpacityTo1);
                NetMaskTB.BeginAnimation(TextBox.OpacityProperty, SwapOpacityTo0);
            }
        }
コード例 #2
0
 private void NetMaskTB_OpacityTo0_Completed(object sender, EventArgs e)
 {
     NetMaskTB.Text = null;
     if (NetMaskTB.IsFocused)
     {
         (NetMaskTB.Background as SolidColorBrush).BeginAnimation(SolidColorBrush.ColorProperty, ColorToDarkText);
         (NetMaskTB.BorderBrush as SolidColorBrush).BeginAnimation(SolidColorBrush.ColorProperty, ColorToDarkText);
     }
     else
     {
         if (NetMaskTB.IsMouseOver)
         {
             (NetMaskTB.BorderBrush as SolidColorBrush).BeginAnimation(SolidColorBrush.ColorProperty, ColorToDarkText);
         }
         else
         {
             (NetMaskTB.BorderBrush as SolidColorBrush).BeginAnimation(SolidColorBrush.ColorProperty, ColorToBase);
         }
         NetMaskTB.Background = new SolidColorBrush(Colors.Transparent);
     }
     NetMaskTB.BeginAnimation(TextBox.OpacityProperty, OpacityTo1);
 }