Exemplo n.º 1
0
        public void ShowTips(ColorCode code, Point point)
        {
            if (isPause)
            {
                return;
            }
            if (!isFix)
            {
                this.Top  = point.Y - 20;
                this.Left = point.X;
            }
            TbHex.Text = code.GetCodeInHex();
            rect.Fill  = new SolidColorBrush(code.GetColor());
            this.Show();
            Storyboard      sb = new Storyboard();
            DoubleAnimation da = new DoubleAnimation(0, 1, TimeSpan.FromSeconds(0.3));

            Storyboard.SetTarget(da, this);
            Storyboard.SetTargetProperty(da, new PropertyPath(Window.OpacityProperty));
            sb.Children.Add(da);
            sb.Begin();
        }
Exemplo n.º 2
0
 public void ShowColorCode(ColorCode color)
 {
     TbColorCode1.Text = color.GetCodeInHex();
     TbColorCode2.Text = color.GetCodeInDec();
 }