We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

DocumentSource Binding broken

Thread ID:

Created:

Updated:

Platform:

Replies:

132779 Sep 20,2017 07:35 AM Sep 21,2017 09:39 PM WPF 1
loading
Tags: EditControl
Thomas Goussaert
Asked On September 20, 2017 07:35 AM

Is it possible that the DocumentSource Binding is broken?
First time the binding works, but whenever the binded value changes, nothing happens with the EditControl.

Now I have to break my MVVM pattern to update the DocumentSource (or use LoadFile) from my ViewModel through code.
(+ I'm absolutely sure that the binded value works)

I'm using MVVMlight btw.

[DocumentSource="{Binding CurrentFileName, Converter={StaticResource SafeFileConverter}, ConverterParameter=Default.asm}"]
> After CurrentFileName changes, nothing happens (ValueConverter isn't called, DocumentSourceChanged event isn't called) [Only the first time these are called]

Am I missing something?



Vijayalakshmi Roopkumar [Syncfusion]
Replied On September 21, 2017 09:39 PM

 Hi Thomas,

Thank you for contacting Syncfusion Support.

We have checked the reported requirement with EditControl by binding the DocumentSource, but on changing it dynamically, the file get updated and DocumentSourceChanged event is called. We also observed that in the provided code you have not bind the DocumentSource in TwoWay mode, so we suspect that the binding would not occurred dynamically at your end. Please make use of the below code example:

Code Example:[C#] 
 
 
<syncfusion:EditControl Grid.Row="0" x:Name="EditControl" DocumentSource="{Binding FileName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" DocumentSourceChanged="EditControl_DocumentSourceChanged"/> 
 
 

We have also prepared the sample and video for your reference. Please download it from following location:

Sample: http://www.syncfusion.com/downloads/support/forum/132779/ze/EditControlbinding1723693955 

We also checking it in the MVVM light pattern, but in meanwhile please check the sample and let us know whether our understanding on the reported issue is same? Also let us know implement details in the MVVM light pattern and what you have done in the converter of your application. It would be helpful for us to proceed further on this.

Regards,
Vijayalakshmi V.R.
 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;