MVVM databinding not working

2 posts, 0 answers
  1. Christy
    Christy avatar
    3 posts
    Member since:
    Dec 2013

    Posted 10 Dec 2013 Link to this post

    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.

  2. Petya
    Admin
    Petya avatar
    975 posts

    Posted 13 Dec 2013 Link to this post

    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 >>
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top