protected override FrameworkElement GenerateEditingElement(DataGridCell cell, object dataItem)
        {
            var element = new ImagePicker();

            element.IsEditable = true;

            //the binding order of FilePath and ImageStream is important because the dependent of its. Must set ImageStream binding before FilePath binding because if set FilePath fisrt, ImageStream create by FilePath will be overrided by ImageStream binding value
            element.SetBinding(ImagePicker.ImageStreamProperty, ImageStreamBinding);
            element.SetBinding(ImagePicker.FilePathProperty, Binding);

            return(element);
        }