Labs-Windows icon indicating copy to clipboard operation
Labs-Windows copied to clipboard

Unblock DataTable on Uno

Open Martin1994 opened this issue 11 months ago • 6 comments

This PR unblocks using DataTable on Uno with a Release build.

The top issue for now is the lack of ListView header in Uno: https://github.com/unoplatform/uno/issues/1979, so this patch introduced a new container without use of a header to unblock its usage on Uno.

This approach is kinda hacky though, so I am looking for discussion about the long term direction assuming ListView's header won't be implemented in Uno soon.

Tested with WinUI 3 and Uno on Skia (WPF and GTK).

data-table

Martin1994 avatar Sep 02 '23 11:09 Martin1994

@dotnet-policy-service agree

Martin1994 avatar Sep 02 '23 11:09 Martin1994

Thanks @Martin1994. But yeah, I was trying to explicitly not have an extra layer/type here and just use the natural container found in these scenarios. I believe the Uno folks are working on the issue though with ItemsPresenter? Maybe @MartinZikmund can give an update?

michael-hawker avatar Sep 03 '23 01:09 michael-hawker

I believe the Uno folks are working on the issue though with ItemsPresenter?

That's great!

If header won't be a blocker, shall we take a look at the change at column resize handler?

// old
CurrentWidth = new(this.ActualWidth);
// new
CurrentWidth = new(this.Width);

When a manipulation event is sent on Uno, I don't see ActualWidth being changed so as a result the column will be frozen at its initial dimension.

Martin1994 avatar Sep 03 '23 07:09 Martin1994

@michael-hawker @Martin1994 On our side @ramezgerges is now working on adding Header and Footer support here https://github.com/unoplatform/uno/pull/13507

MartinZikmund avatar Sep 05 '23 08:09 MartinZikmund

Looks like the PR was merged and the issue closed: https://github.com/unoplatform/uno/issues/10745

Once @Arlodotexe gets Labs up-to-date with our latest changes from the Windows/tooling repos, then we can try the latest Uno version and see how things work with DataTable

michael-hawker avatar Sep 18 '23 17:09 michael-hawker