public ImagePartViewModel(LayoutPartImageProperties properties) { if (properties != null) { Stretch = properties.Stretch; if (properties.SourceUID != Guid.Empty) { if (properties.IsVectorImage) ImageSource = new DrawingImage(ServiceFactoryBase.ContentService.GetDrawing(properties.SourceUID)); else ImageSource = ServiceFactoryBase.ContentService.GetBitmapContent(properties.SourceUID); } } }
public LayoutPartImageViewModel(LayoutPartImageProperties properties) { _imageSource = null; _properties = properties ?? new LayoutPartImageProperties(); _imagePage = new LayoutPartPropertyImagePageViewModel(this); }