Exemplo n.º 1
0
        public static void ReplaceByName(this Paragraph parent, string xaml)
        {
            var newInline = RTB_Support.CreateInline(xaml);
            var oldInline = parent.Inlines.FirstOrDefault(_i => _i.Name == newInline.Name);

            if (oldInline != null)
            {
                parent.Inlines.InsertAfter(oldInline, newInline);
                parent.Inlines.Remove(oldInline);
            }
            else
            {
                parent.Inlines.Add(newInline);
            }
        }
Exemplo n.º 2
0
        public static void AddPara(this Section parent, string content, String margin = "0", string rootAttr = "")
        {
            var pr = RTB_Support.CreatePara(content, margin, rootAttr);

            parent.Blocks.Add(pr);
        }