daniel-luberda / DLToolkit.Forms.Controls

Xamarin.Forms Custom Controls
Apache License 2.0
394 stars 182 forks source link

CropView.GetImageAsJpegAsync with mvvm #242

Open minaairsupport opened 5 years ago

minaairsupport commented 5 years ago

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

vlkam commented 5 years ago

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

minaairsupport commented 5 years ago

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

vlkam commented 5 years ago

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

minaairsupport commented 5 years ago

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); }
        }