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

[Mobile][Skia][Wasm] cannot set the ItemsPanelTemplate to be a StackPanel on FlipView #13944

Open
Marc-Antoine-Soucy opened this issue Oct 10, 2023 · 0 comments
Labels
area/porting 🖨️ Categorizes an issue or PR as relevant for porting of WinUI code difficulty/challenging 🤯 Categorizes an issue for which the difficulty level is reachable with internals understanding kind/bug Something isn't working project/items 🧾 Categorizes an issue or PR as relevant to items (ItemsControl, ItemsRepeater, ...)

Comments

@Marc-Antoine-Soucy
Copy link

Current behavior

When you set the ItemsPanelTemplate to be a stackpanel on IOS, it throws an exception
image
On android it looks like this:
image
On skia and WASM, it doesnt show up
image

Expected behavior

It should be like on windows, where you can do it so that the height is set automatically
image
Instead of having to set a hardcoded height.

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

In the MainPage

<StackPanel>
	<FlipView x:Name="flipView">
		<FlipViewItem>
			<Border Background="LightBlue"
					Height="500">
				<TextBlock Text="Item 1"
						   FontSize="30"
						   HorizontalAlignment="Center"
						   VerticalAlignment="Center" />
			</Border>
		</FlipViewItem>
		<FlipViewItem>
			<Border Background="LightGreen"
					Height="500">
				<TextBlock Text="Item 2"
						   FontSize="30"
						   HorizontalAlignment="Center"
						   VerticalAlignment="Center" />
			</Border>
		</FlipViewItem>
		<FlipViewItem>
			<Border Background="LightCoral"
					Height="500">
				<TextBlock Text="Item 3"
						   FontSize="30"
						   HorizontalAlignment="Center"
						   VerticalAlignment="Center" />
			</Border>
		</FlipViewItem>
		<FlipView.ItemsPanel>
			<ItemsPanelTemplate>
				<StackPanel Orientation="Horizontal" />
			</ItemsPanelTemplate>
		</FlipView.ItemsPanel>
	</FlipView>

	<TextBlock Text="Can see this" />
</StackPanel>

BasicApp.zip

Workaround

You can hardcode a height to be the same as the expected height

Works on UWP/WinUI

Yes

Environment

No response

NuGet package version(s)

<PackageReference Include="Uno.Resizetizer" Version="1.2.0-dev.68" />
<PackageReference Include="Uno.WinUI" Version="5.0.0-dev.3407" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.1.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" />
<PackageReference Include="Uno.Extensions.Logging.OSLog" Version="1.7.0-dev.1" />
<PackageReference Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" Version="5.0.0-dev.3407" />
<PackageReference Include="Uno.WinUI.RemoteControl" Version="5.0.0-dev.3407" Condition="'$(Configuration)'=='Debug'" />

Affected platforms

WebAssembly, Android, iOS, Skia (GTK on Linux/macOS/Windows)

IDE

Visual Studio 2022

IDE version

17.7.4

Relevant plugins

No response

Anything else we need to know?

No response

@Marc-Antoine-Soucy Marc-Antoine-Soucy added kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. labels Oct 10, 2023
@MartinZikmund MartinZikmund changed the title [Mobile][Skia][Wasm] Flipview you cannot set the ItemsPanelTemplate to be a Stackpanel [Mobile][Skia][Wasm] cannot set the ItemsPanelTemplate to be a StackPanel on FlipView Oct 25, 2023
@MartinZikmund MartinZikmund added difficulty/challenging 🤯 Categorizes an issue for which the difficulty level is reachable with internals understanding area/porting 🖨️ Categorizes an issue or PR as relevant for porting of WinUI code project/items 🧾 Categorizes an issue or PR as relevant to items (ItemsControl, ItemsRepeater, ...) and removed triage/untriaged Indicates an issue requires triaging or verification difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. labels Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/porting 🖨️ Categorizes an issue or PR as relevant for porting of WinUI code difficulty/challenging 🤯 Categorizes an issue for which the difficulty level is reachable with internals understanding kind/bug Something isn't working project/items 🧾 Categorizes an issue or PR as relevant to items (ItemsControl, ItemsRepeater, ...)
Projects
None yet
Development

No branches or pull requests

2 participants