public VisualizedPowerpointContent(int s, TextDescriptor text) : this(s, text.x, text.y, text.w, text.h,text.privacy,text.target) { Visual = new TextBlock { Text = text.content, FontFamily = new FontFamily(text.fontFamily), FontSize = text.fontSize, Foreground = new SolidColorBrush(text.fontColor), Width = text.w, Height = text.h }; Descriptor = text; }
public VisualizedPowerpointContent(int s, ImageDescriptor image) : this(s, image.x, image.y, image.w, image.h,image.privacy,image.target) { var source = new BitmapImage(); try { source.BeginInit(); source.StreamSource = new System.IO.MemoryStream(image.imageBytes); } finally { source.EndInit(); } Visual = new Image { Width = image.w, Height = image.h, Source = source }; Descriptor = image; }