Page 1 of 1

[SOLVED] Beta 8: Error when assigning ItamsSource to Listbox

Posted: Sat Apr 30, 2016 3:59 am
by hamej
I have discovered an error in the new beta 8, when assigning ItemsSource to a ListBox (see attached document). Actually the error was also in beta 7.3, which I installed to try it, but not in beta 7.2. If you need more information to pinpoint the error, please let me know.

Re: Beta 8: Error when assigning ItamsSource to Listbox

Posted: Fri Jul 22, 2016 7:50 pm
by xidea
Same trouble here in beta 8.4, waiting for a huge fix on binding management of list controls!
Tried the ItemsControl, buggy too.

Flavio

Re: Beta 8: Error when assigning ItamsSource to Listbox

Posted: Sun Jul 24, 2016 11:05 am
by JS-Support @Userware
Thank you for reporting this issue.

It has been fixed in Beta 9.0, which will be available in a few hours.

Regards,
JS-Support

Re: Beta 8: Error when assigning ItamsSource to Listbox

Posted: Mon Jul 25, 2016 9:50 am
by xidea
Hello,

installed the beta 9, created a new fresh project and added my existing code to it.

Now setting the ItemSource to null doesn't raise any exception, but setting to a new fresh source list the ItemsControls doesn't update, the items remain listed in the control even if the source list is empty.

In my case, there are two ItemsControl, same XAML, different binding, the first is working, the second is not. I've tried tenth of combination in XAML and in code. In beta 9 I set the ItemsControl.ItemsSource to null and manually remove elements from ItemsControl.Items, without any success. Same result anyway, the first control works correctly, the second doesn't.

So strange.

You can see my work in progress here: http://webboggler.xidea.it/game. If you join (Partecipa) with different browser windows you can see the Players list (Giocatori) updating correctly when you close or add a new window. If you add words, (sorry, you must enter italian words) when a new round starts up you see the words' list doesn't clear even if in code there is a new empty list assigned to ItemsSource.

Furtherly, the Border thickness issue seems solved, but actually I've got the correct rendering by removing the wrapping Grid elements that surrounded the Border control. It seems to render better, but not everytime correctly.

Another thing: the DateTime.Now.ToUniversalTime.ToString() doesnt returns the time, but the date only.

Thanks,

Flavio

Re: Beta 8: Error when assigning ItamsSource to Listbox

Posted: Tue Jul 26, 2016 1:19 am
by JS-Support @Userware
Thank you Flavio.

I went to the website: it looks very promising! Congratulations.

We are working non-stop to fix all the remaining issues as fast as possible.

We are going to completely revamp the way both ItemsSource and DateTime works in the coming weeks.

Thank you
JS-Support

Re: Beta 8: Error when assigning ItamsSource to Listbox

Posted: Tue Jul 26, 2016 8:25 am
by xidea
Thank you,

the project makes use of part of a codebase coming from my Windows Phone app, that was written in VB.NET, but the entire XAML is written from scratch, so it reflects C#XAMLforHTML5's features and limitations. Unfortunately when I make changes in C# code, the final result is strangely compromised in unrelated parts of final code, i.e. some code is not executed properly.

Further investigations suggest me that the ItemsSource problem is related to multiple instances of the ItemsControl, as if I duplicate the control that works fine, I can't work with the duplicate. The actions applied to the duplicate are bypassed and seems to control the firs instance even if the referenced control is the duplicate and there is no reference to the source object in the code!

UPDATE: Error when assigning ItamsSource to Listbox

Posted: Tue Jul 26, 2016 10:49 am
by xidea
Hello,

just spotted a strange thing, and NO, it seems there is no problem with the updating of the ItemsSource in the control.

There were in the code an instruction "MyObservableCollection.Clear()", removing it solved!

So: if we empty the underlaying list with the Clear() method, the control becomes unlinked and any new assignment of ItemSource will add items without removing old items.

Sorry for previous misleading info, but spotting this issue have been a little difficult in the context of my code.

Regards,

Flavio

Re: Beta 8: Error when assigning ItamsSource to Listbox

Posted: Wed Jul 27, 2016 12:13 am
by JS-Support @Userware
Thanks. I will keep you updated.

Re: Beta 8: Error when assigning ItamsSource to Listbox

Posted: Fri Aug 26, 2016 4:47 am
by JS-Support @Userware
The issue has been fixed in Beta 9.1, which will be released shortly.

Re: Beta 8: Error when assigning ItamsSource to Listbox

Posted: Mon Aug 29, 2016 6:40 am
by JS-Support @Userware
You can download Beta 9.1, which fixes the issue, from the following URL:

http://forums.cshtml5.com/viewforum.php?f=6

Thank you.
Regards,
JS-Support