DLToolkit.Forms.Controls icon indicating copy to clipboard operation
DLToolkit.Forms.Controls copied to clipboard

CropView.GetImageAsJpegAsync with mvvm

Open minaairsupport opened this issue 6 years ago • 4 comments

I am sure many people looking forward to call this method inside the viewmodel not code behind could you create bindable property for us do that

minaairsupport avatar Jan 07 '19 18:01 minaairsupport

GetImageAsJpegAsync is a function with parameters How to make it a bindable property ?

vlkam avatar Jan 07 '19 20:01 vlkam

at least make this field binable property readonly CustomCachedImage _image; and method accessible from outside ImageCropView inside helper class

minaairsupport avatar Jan 08 '19 12:01 minaairsupport

You can create class inherit from ImageCropView class and create that bindable property there

vlkam avatar Jan 08 '19 13:01 vlkam

I am trying this now but your method depends on these fields I may think with something different like Command execute this method and return result

CustomCachedImage _image,
 CropTransformation _crop;
 public IList<ITransformation> Transformations
        {
            get { return (IList<ITransformation>)GetValue(TransformationsProperty); }
            set { SetValue(TransformationsProperty, value); }
        }

minaairsupport avatar Jan 08 '19 13:01 minaairsupport