Skip to content
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

Community Toolkit's DataGrid is invisible, with Uno 4.0 and net6 in Android #7635

Open
crogeniks opened this issue Dec 12, 2021 · 2 comments
Labels
area/windows-community-toolkit 🎚️ Categorizes an issue or PR as relevant to the Windows Community Toolkit difficulty/challenging 🤯 Categorizes an issue for which the difficulty level is reachable with internals understanding kind/bug Something isn't working

Comments

@crogeniks
Copy link
Contributor

crogeniks commented Dec 12, 2021

Current behavior

Using the dotnet new unoapp-net6 template, and the Community Toolkit's Datagrid :

  • the Datagrid is not visible in Android

image

Expected behavior

Using the dotnet new unoapp-net6 template, and the Community Toolkit's Datagrid should work in Android

How to reproduce it (as minimally and precisely as possible)

  • Create an Uno app through: dotnet new unoapp-net6
  • Add the Community Toolkit's Datagrid following the instructions in the documentation
  • Add a DataGrid in MainPage.xaml following above documentation
  • Start the app in Android

Workaround

None as far as I know

Works on UWP/WinUI

Yes

Environment

Uno.UI / Uno.UI.WebAssembly / Uno.UI.Skia, Uno.SourceGenerationTasks

NuGet package version(s)

Microsoft.Toolkit.Uwp.UI.Controls.DataGrid 7.1.2
Uno.Microsoft.Toolkit.Uwp.UI.Controls.DataGrid 7.1.10
Uno.UI 4.0.9

Affected platforms

Android

IDE

Visual Studio 2022

IDE version

Version 17.1.0 Preview 1.1

Relevant plugins

No response

Anything else we need to know?

Repro project :
DataGridUnoSample-main.zip

Did not try to reproduce in iOS
Works as expected in WASM and WPF

@crogeniks crogeniks added difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification labels Dec 12, 2021
@jeromelaban jeromelaban added area/windows-community-toolkit 🎚️ Categorizes an issue or PR as relevant to the Windows Community Toolkit and removed triage/untriaged Indicates an issue requires triaging or verification labels Dec 13, 2021
@jeromelaban
Copy link
Member

The community toolkit does not explicitly support net6-android yet, this could be a cause.

Note for contributors

Otherwise, there's no obvious crash reported when starting the app, aside from resources resolution exceptions which don't seem to cause the DataGrid to fail. The DataGrid control does not seem to have a control template applied, which would suggest an invalid resolution of the imported styles.

@jeromelaban jeromelaban self-assigned this Feb 4, 2022
@iosub
Copy link
Contributor

iosub commented Feb 8, 2022

Current behavior

Using the dotnet new unoapp-net6 template, and the Community Toolkit's Datagrid :

  • the Datagrid is not visible in Android

image

Expected behavior

Using the dotnet new unoapp-net6 template, and the Community Toolkit's Datagrid should work in Android

How to reproduce it (as minimally and precisely as possible)

  • Create an Uno app through: dotnet new unoapp-net6
  • Add the Community Toolkit's Datagrid following the instructions in the documentation
  • Add a DataGrid in MainPage.xaml following above documentation
  • Start the app in Android

Workaround

None as far as I know

Works on UWP/WinUI

Yes

Environment

Uno.UI / Uno.UI.WebAssembly / Uno.UI.Skia, Uno.SourceGenerationTasks

NuGet package version(s)

Microsoft.Toolkit.Uwp.UI.Controls.DataGrid 7.1.2 Uno.Microsoft.Toolkit.Uwp.UI.Controls.DataGrid 7.1.10 Uno.UI 4.0.9

Affected platforms

Android

IDE

Visual Studio 2022

IDE version

Version 17.1.0 Preview 1.1

Relevant plugins

No response

Anything else we need to know?

Repro project : DataGridUnoSample-main.zip

Did not try to reproduce in iOS Works as expected in WASM and WPF

Hi
As a workaround you can add the DataGrid.xaml from toolkit (I have attached the file) and add to the app.xaml the resource:
<ResourceDictionary Source="ms-appx:///Styles/DataGrid.xaml" />
I have test it on UWP, WASM, Android and iOS and the Datagrid is showed
DataGrid.zip

@MartinZikmund MartinZikmund added difficulty/challenging 🤯 Categorizes an issue for which the difficulty level is reachable with internals understanding and removed difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. labels Jul 19, 2023
@MartinZikmund MartinZikmund changed the title Community Toolkit's Datagrid is invisible, with Uno 4.0 and net6 in Android Community Toolkit's DataGrid is invisible, with Uno 4.0 and net6 in Android Jul 19, 2023
@jeromelaban jeromelaban removed their assignment May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/windows-community-toolkit 🎚️ Categorizes an issue or PR as relevant to the Windows Community Toolkit difficulty/challenging 🤯 Categorizes an issue for which the difficulty level is reachable with internals understanding kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants