uno icon indicating copy to clipboard operation
uno copied to clipboard

[WASM] ContentControl requires explicit HorizontalContentAlignment and VerticalContentAlignment

Open HavenDV opened this issue 3 years ago • 4 comments

Current behavior

2 Differences(In WebAssembly relative to UWP): ContentControl requires explicit HorizontalContentAlignment="Stretch" and VerticalContentAlignment="Stretch"

Expected behavior

1

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

https://github.com/HavenDV/Uno.WASM.TemplateBug https://github.com/HavenDV/Uno.WASM.TemplateBug/commit/b6a4c8ed81b38ced515ba79add7849c00d6191d4

Works on UWP/WinUI

Yes

Environment

Nuget Package:

  • [x] Uno.UI / Uno.UI.WebAssembly / Uno.UI.Skia>

Nuget Package Version(s):

  • 3.8.6 and 3.9.0-dev.104

Affected platform(s): Possible multiple, tested only on WebAssembly

  • [ ] iOS
  • [ ] Android
  • [x] WebAssembly
  • [ ] WebAssembly renderers for Xamarin.Forms
  • [ ] macOS
  • [ ] Skia
    • [ ] WPF
    • [ ] GTK (Linux)
    • [ ] Tizen
  • [ ] Windows
  • [ ] Build tasks
  • [ ] Solution Templates

IDE:

  • [ ] Visual Studio 2017 (version: )
  • [x] Visual Studio 2019 (version: latest)
  • [ ] Visual Studio for Mac (version: )
  • [ ] Rider Windows (version: )
  • [ ] Rider macOS (version: )
  • [ ] Visual Studio Code (version: )

Relevant plugins:

  • [ ] Resharper (version: )

HavenDV avatar Jun 29 '21 08:06 HavenDV

Thanks for the report!

Can you create multiple issues? It will be easier to track in individual entries. Can you make sure to add an actual version number instead of latest, just to make sure we're tracking the proper one.

jeromelaban avatar Jul 05 '21 15:07 jeromelaban

Done.

HavenDV avatar Jul 05 '21 18:07 HavenDV

Repro sample: Uno.WASM.TemplateBug-master.zip

jeromelaban avatar Jul 05 '21 20:07 jeromelaban

Note for contributors

Those seem to have been altered values when dealing with default ContentControl placement based on previous versions of UWP, we may have to revisit the default values:

https://github.com/unoplatform/uno/blob/b7f19b08fd276155868e9a95c29714af80402945/src/Uno.UI/UI/Xaml/Style/Generic/Generic.xaml#L38-L57

jeromelaban avatar Jul 05 '21 20:07 jeromelaban