string xaml = @"<Section xml:space="preserve" HasTrailingParagraphBreakOnPaste="False" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"><Paragraph FontSize="10" FontFamily="Arial" Foreground="#FF000000" FontWeight="Normal" FontStyle="Normal" FontStretch="Normal" TextAlignment="Left"><Run FontSize="13" Foreground="#FFFF0000" FontWeight="Bold" Text="Haider is a very good guy" /></Paragraph><Paragraph FontSize="10" FontFamily="Arial" Foreground="#FF000000" FontWeight="Normal" FontStyle="Normal" FontStretch="Normal" TextAlignment="Left"><Run FontSize="13" Foreground="#FF008000" FontWeight="Bold" Text="Haider is a very " /><Run FontSize="13" Foreground="#FFFF0000" FontWeight="Bold" Text="good " /><Run FontSize="13" Foreground="#FF008000" FontWeight="Bold" Text="guy" /></Paragraph><Paragraph FontSize="10" FontFamily="Arial" Foreground="#FF000000" FontWeight="Normal" FontStyle="Normal" FontStretch="Normal" TextAlignment="Left"><Run FontSize="13" Foreground="#FF0000FF" FontWeight="Bold" Text="Haider is a very " /><Run FontSize="13" Foreground="#FFFF0000" FontWeight="Bold" Text="good " /><Run FontSize="13" Foreground="#FF0000FF" FontWeight="Bold" Text="guy" /></Paragraph><Paragraph FontSize="10" FontFamily="Arial" Foreground="#FF000000" FontWeight="Normal" FontStyle="Normal" FontStretch="Normal" TextAlignment="Left"><Run FontSize="13" Foreground="#FFFFFF00" FontWeight="Bold" Text="Haider is a very " /><Run FontSize="13" Foreground="#FFFF0000" FontWeight="Bold" Text="good " /><Run FontSize="13" Foreground="#FFFFFF00" FontWeight="Bold" Text="guy" /></Paragraph></Section>"; public Bitmap XamltoImage(string xaml ,int Width, int Height) { //convert code here }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)