示例#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;
 }
示例#2
0
文件: VdText.cs 项目: gdlprj/duscusys
 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;
 }
示例#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);
            }
        }