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

Please report bugs here. If you are unsure whether something is a bug or an expected behavior, please post it on the "Technical Support" forum instead, and wait for a moderator to handle/move the post.
hamej
Posts: 37
Joined: Thu Oct 01, 2015 8:41 am

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

Postby hamej » Sat Apr 30, 2016 3:59 am

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.
Attachments
2016-04-27 Error when assigning ItemsSource to Listbox.zip
(114.9 KiB) Downloaded 392 times

xidea
Posts: 33
Joined: Thu Jun 30, 2016 7:04 pm

Re: Beta 8: Error when assigning ItamsSource to Listbox

Postby xidea » Fri Jul 22, 2016 7:50 pm

Same trouble here in beta 8.4, waiting for a huge fix on binding management of list controls!
Tried the ItemsControl, buggy too.

Flavio

JS-Support @Userware
Site Admin
Posts: 1142
Joined: Tue Apr 08, 2014 3:42 pm

Re: Beta 8: Error when assigning ItamsSource to Listbox

Postby JS-Support @Userware » Sun Jul 24, 2016 11:05 am

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

xidea
Posts: 33
Joined: Thu Jun 30, 2016 7:04 pm

Re: Beta 8: Error when assigning ItamsSource to Listbox

Postby xidea » Mon Jul 25, 2016 9:50 am

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

JS-Support @Userware
Site Admin
Posts: 1142
Joined: Tue Apr 08, 2014 3:42 pm

Re: Beta 8: Error when assigning ItamsSource to Listbox

Postby JS-Support @Userware » Tue Jul 26, 2016 1:19 am

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

xidea
Posts: 33
Joined: Thu Jun 30, 2016 7:04 pm

Re: Beta 8: Error when assigning ItamsSource to Listbox

Postby xidea » Tue Jul 26, 2016 8:25 am

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!
Last edited by xidea on Wed Jul 27, 2016 11:22 am, edited 1 time in total.

xidea
Posts: 33
Joined: Thu Jun 30, 2016 7:04 pm

UPDATE: Error when assigning ItamsSource to Listbox

Postby xidea » Tue Jul 26, 2016 10:49 am

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

JS-Support @Userware
Site Admin
Posts: 1142
Joined: Tue Apr 08, 2014 3:42 pm

Re: Beta 8: Error when assigning ItamsSource to Listbox

Postby JS-Support @Userware » Wed Jul 27, 2016 12:13 am

Thanks. I will keep you updated.

JS-Support @Userware
Site Admin
Posts: 1142
Joined: Tue Apr 08, 2014 3:42 pm

Re: Beta 8: Error when assigning ItamsSource to Listbox

Postby JS-Support @Userware » Fri Aug 26, 2016 4:47 am

The issue has been fixed in Beta 9.1, which will be released shortly.

JS-Support @Userware
Site Admin
Posts: 1142
Joined: Tue Apr 08, 2014 3:42 pm

Re: Beta 8: Error when assigning ItamsSource to Listbox

Postby JS-Support @Userware » Mon Aug 29, 2016 6:40 am

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


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 23 guests

 

 

cron