-
Notifications
You must be signed in to change notification settings - Fork 707
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ListBox
is not implemented
#1362
Comments
@ghuntley it looks like it's in the ballpark. But in my case, I don't see anything in the listbox until I resize the browser. Very easy to see in the sample I posted. |
@ghuntley there is an update on this. I thought the issue might because I was setting the ItemsSource directly rather than using binding. So, I tried creating a ViewModel, and binding to the ItemsSource. I got the same result. I thought that perhaps the issue was because UpdateLayout was not being called. So, I manually called UpdateLayout after the items were set. Again, same result. I also tried manually adding an item in to the ObservableCollection to try to wake up: same result. I also tried in Chrome. Same result. The problem is very easy to reproduce if you grab my sample. |
@ghuntley I switched my sample to a ComboBox so I could get it working. I've tagged the issue UnoIssue1362 so if you grab that commit, you will see the issue. |
I tried the original report (with a ListView & tag <!-- RestClient.Net.Samples.Uno.Wasm.csproj -->
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
<PackageReference Include="Uno.UI" Version="1.45.0" />
<PackageReference Include="Uno.Wasm.Bootstrap" Version="1.0.0-dev.302" />
<DotNetCliToolReference Include="Uno.Wasm.Bootstrap.Cli" Version="1.0.0-dev.302" />
</ItemGroup> Reported problem solved. But I'm not sure the @ghuntley's problem with SampleApps is related... |
@carldebilly , @ghuntley thanks for looking in to this. Unfortunately the problem is different with the latest version. The ListBox doesn't show up at all. I made the ListBox red to highlight the issue. You can see it in UWP, but not on Wasm (Firefox, Edge or Chrome). Please see the branch here . This has your NuGet upgrades in it. |
Ok I'll reopen this issue. |
Currently the only code for The control works 'in some fashion' because it inherits the functionality of
To implement this, an authored .cs file should be created with the members required, and the missing style added to https://github.com/unoplatform/uno/blob/master/src/Uno.UI/UI/Xaml/Style/Generic/Generic.xaml, with any adjustments needed (eg, we don't support |
Comment from @michael-hawker on Discord, about the ease of use of ListViewItem just encapsulates everything in the ListViewItemPresenter and if you use the expanded template it has a bunch of Borders and Rectangles and other behavior which are harder to style around. ListBox on the other hand is pretty bare-bones and is an easy starting point. Justin Liu gave this feedback to the platform team a while back too. |
FYI @JustinXinLiu can probably elaborate a bit more of the specifics better than I can. 🙂 |
Current behavior
When the ItemsSource on a ListBox is set, no items are populated. However, if the browser is maximised or otherwise resized, the items will populate.
Expected behavior
ListBox is populated as soon as ItemsSource is set.
How to reproduce it (as minimally and precisely as possible)
Environment
Windows 10
Firefox (WASM)
Visual Studio
Anything else we need to know?
This has happened in multiple different projects. It also happens in Edge.
The text was updated successfully, but these errors were encountered: