Exemplo n.º 1
0
 void initText(Color c)
 {
     _textEnterUC = new TextUC(this);
     _textEnterUC.txtLabel.Effect     = ShapeUtils.ShadowProvider();
     _textEnterUC.txtLabel.Foreground = new SolidColorBrush(c);
     _textEnterUC.DataContext         = this;
     _textEnterUC.Tag          = this;
     _textEnterUC.field.Tag    = this;
     _textEnterUC.handle.Tag   = this;
     _textEnterUC.textChanged += TextChanged;
     _textEnterUC.MouseWheel  += MouseWheel;
 }
Exemplo n.º 2
0
 void initText(Color c)
 {
     _textEnterUC = new TextUC(this);
     _textEnterUC.txtLabel.Effect = ShapeUtils.ShadowProvider();
     _textEnterUC.txtLabel.Foreground = new SolidColorBrush(c);
     _textEnterUC.DataContext = this;           
     _textEnterUC.Tag = this;
     _textEnterUC.field.Tag = this; 
     _textEnterUC.handle.Tag = this;
     _textEnterUC.textChanged += TextChanged;
     _textEnterUC.MouseWheel += MouseWheel;
 }
Exemplo n.º 3
0
        public static IVdShape findVdText(object originalSrc)
        {
            DependencyObject findSource = originalSrc as FrameworkElement;
            TextUC           vdText     = null;

            while (vdText == null && findSource != null)
            {
                if ((vdText = findSource as TextUC) == null)
                {
                    findSource = VisualTreeHelper.GetParent(findSource);
                }
            }

            if (vdText == null)
            {
                return(null);
            }
            else
            {
                return(vdText.Tag as IVdShape);
            }
        }