Ejemplo n.º 1
0
        protected override void RenderContents(HtmlTextWriter writer)
        {
            var context = HttpContext.Current;

            writer.Write("<img src='GradientHandler.grad?{0}={1}&{2}={3}&{4}={5}&{6}={7}&{8}={9}'>",
                         GradientLabelHandler.TextQueryString, context.Server.UrlEncode(Text),
                         GradientLabelHandler.TextSizeQueryString, TextSize,
                         GradientLabelHandler.TextColorQueryString, TextColor.ToArgb(),
                         GradientLabelHandler.GradientColorStartQueryString, GradientColorStart.ToArgb(),
                         GradientLabelHandler.GradientColorEndQueryString, GradientColorEnd.ToArgb());
        }
Ejemplo n.º 2
0
        protected override void Render(HtmlTextWriter writer)
        {
            HttpContext context = HttpContext.Current;

            writer.Write("<img src='" + "GradientLabel.aspx?" +
                         "Text=" + context.Server.UrlEncode(Text) +
                         "&TextSize=" + TextSize.ToString() +
                         "&TextColor=" + TextColor.ToArgb() +
                         "&GradientColorStart=" + GradientColorStart.ToArgb() +
                         "&GradientColorEnd=" + GradientColorEnd.ToArgb() +
                         "'>");
        }
Ejemplo n.º 3
0
        public Brush GetBrush()
        {
            switch (Type)
            {
            case FillType.Solid:
                return(new SolidColorBrush(BackgroundColor.ToWpfColor()));

            case FillType.Gradient:
                return(new LinearGradientBrush(
                           GradientColorStart.ToWpfColor(), GradientColorEnd.ToWpfColor(),
                           GradientAngle));

            default:
                throw new NotSupportedException();
            }
        }