This is a migrated thread and some comments may be shown as answers.

MVVM databinding not working

1 Answer 164 Views
ImageEditor
This is a migrated thread and some comments may be shown as answers.
Christy
Top achievements
Rank 1
Christy asked on 10 Dec 2013, 07:17 PM
I have created my image property in my view model and can see the correct format provider is being used and populating my RadBitmap property but the binding does not work on the RadImageEditorUI control.

 

string extension = Path.GetExtension(FilePath).ToLower();
            Stream stream = File.OpenRead(FilePath);
            IImageFormatProvider formatProvider = ImageFormatProviderManager.GetFormatProviderByExtension(extension);
            if (formatProvider != null)
            {
                ImagePath = formatProvider.Import(stream);
            }
            stream.Close();
 
XAML:
<telerik:RadImageEditorUI x:Name="ImageEditorUi" Image="{Binding ImagePath}" Style="{DynamicResource ImageEditorStyle1}">

Is binding working for this control? If so, please provide a MVVM example because the documentaiton for this has no binding examples.

1 Answer, 1 is accepted

Sort by
0
Petya
Telerik team
answered on 13 Dec 2013, 02:26 PM
Hello,

Please specify the mode of the binding as TwoWay. This should resolve the issue and the image should be shown properly in the control. Additionally, attached you can find a project demosntrating the scenario.

We are not sure what causes the binding to not work if not set as TwoWay, but will investigate this as soon as possible and try to provide a solution.

Let me know if you have any other comments or questions.

Regards,
Petya
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
ImageEditor
Asked by
Christy
Top achievements
Rank 1
Answers by
Petya
Telerik team
Share this question
or