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

ZoomContentControl: Failing WinAppSDK Build #1291

Closed
17 tasks
MartinZikmund opened this issue Nov 27, 2024 · 2 comments
Closed
17 tasks

ZoomContentControl: Failing WinAppSDK Build #1291

MartinZikmund opened this issue Nov 27, 2024 · 2 comments
Assignees
Labels

Comments

@MartinZikmund
Copy link
Member

MartinZikmund commented Nov 27, 2024

Master Issue: #1290

Current behavior

Crashes with Expected template part not found: PART_ContentGrid"

Expected behavior

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

Nuget Package:

Package Version(s):

Affected platform(s):

  • WebAssembly
  • Android
  • iOS
  • macOS (AppKit)
  • Mac Catalyst
  • Skia
    • WPF
    • GTK (Linux)
    • Linux Framebuffer
    • Tizen
  • Windows

IDE:

  • Visual Studio 2022
  • Visual Studio 2019
  • Visual Studio Code
  • Visual Studio for Mac
  • Rider Windows
  • Rider macOS

Relevant plugins:

Anything else we need to know?

@MartinZikmund MartinZikmund added kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification. labels Nov 27, 2024
@Xiaoy312 Xiaoy312 added control/zoom-content-control and removed triage/untriaged Indicates an issue requires triaging or verification. labels Nov 27, 2024
@Xiaoy312
Copy link
Contributor

so somehow the TemplateBinding doesnt work on windows... in this specific case...?

<ScaleTransform CenterX="{TemplateBinding HorizontalZoomCenter}" CenterY="{TemplateBinding VerticalZoomCenter}" ScaleX="{TemplateBinding ZoomLevel}" ScaleY="{TemplateBinding ZoomLevel}" />

given this xaml

<Grid>
	<ContentPresenter ...>
		<ContentPresenter.RenderTransform>
			<TransformGroup>
				<ScaleTransform ... ScaleX="{TemplateBinding ZoomLevel}" ScaleY="{TemplateBinding ZoomLevel}" />
				^ changing to binding with relativesource tempaltedparent made it work
	<StackPanel>
		<TextBlock Foreground="Red">tb ZoomLevel:<Run Text="{TemplateBinding ZoomLevel}" /></TextBlock>
		<TextBlock Foreground="Red">btp ZoomLevel:<Run Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ZoomLevel}" /></TextBlock>
	</StackPanel>

here is the result on winappsdk:
image

microsoft says that "The types used as the value for the source property and the target property must match." while it wasnt the case for the textblock, it should be for ScaleTransform.ScaleX and ZoomContentControl.ZoomLevel, both are double without nullable...

@vatsashah45
Copy link
Contributor

Closing this issue as it has been resolved by #1297

@vatsashah45 vatsashah45 changed the title ZoomContentControl does not work on WinAppSDK ZoomContentControl: Failing WinAppSDK Build Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants