Exemplo n.º 1
0
 protected override void Draw(PageBrush brush)
 {
     if (this.Origin == DrawOrigin.Header || this.Origin == DrawOrigin.Bottom)
     {
         brush.Backspace();
     }
     brush.Draw(GetCode(), this.Origin);
 }
        protected override void Render(object templateParent, PageBrush brush)
        {
            var e = this.Template;

            if (e == null)
            {
                return;
            }
            var parent = templateParent as DependencyObject;

            foreach (var item in e)
            {
                var t = item as UIElement;
                if (t != null)
                {
                    t.Parent = parent;
                    t.Render(brush);
                }
                else
                {
                    brush.Draw(t.ToString());
                }
            }
        }