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

ResponsiveExpression does not support non-FrameworkElement, like TextBlock>Run #950

Closed
Xiaoy312 opened this issue Dec 6, 2023 · 3 comments · Fixed by #1084 or #1181
Closed

ResponsiveExpression does not support non-FrameworkElement, like TextBlock>Run #950

Xiaoy312 opened this issue Dec 6, 2023 · 3 comments · Fixed by #1084 or #1181
Assignees
Labels
control/responsive Categorizes an issue or PR as relevant to Responsive-View,-Expression, or -Helper kind/bug Something isn't working

Comments

@Xiaoy312
Copy link
Contributor

Xiaoy312 commented Dec 6, 2023

Current behavior

^ title

Expected behavior

should be supported

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

<TextBlock Text="{utu:Responsive Normal=ok, Wide=ok}" />
<TextBlock><Run Text="{utu:Responsive Normal=not_ok, Wide=not_ok}" /></TextBlock>

Anything else we need to know?

beside descendants of Inline family, we should probably try to identify more scenarios where this can fail too.

@Xiaoy312 Xiaoy312 added kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification. control/responsive Categorizes an issue or PR as relevant to Responsive-View,-Expression, or -Helper and removed triage/untriaged Indicates an issue requires triaging or verification. labels Dec 6, 2023
@Xiaoy312 Xiaoy312 self-assigned this Dec 19, 2023
@Xiaoy312
Copy link
Contributor Author

candidates to support:

  • (Row|Column)Definition
  • Inlines
  • to add...

@Xiaoy312
Copy link
Contributor Author

Xiaoy312 commented Jun 4, 2024

ItemsRepeater::Layout

image

@Xiaoy312
Copy link
Contributor Author

Xiaoy312 commented Jun 19, 2024

new contract: // we are moving away from the ResponsiveBehavior::IsEnabled approach

<TextBlock x:Name="TestText">
	<Run Text="{utu:Responsive Source={Binding ElementName=TestText}, Narrow='Narrow', Wide='Wide'}" />

edit: with IRootObjectProvider we no longer need a proxy host (Source) or ResponsiveBehavior.IsEnabled as workarounds

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
control/responsive Categorizes an issue or PR as relevant to Responsive-View,-Expression, or -Helper kind/bug Something isn't working
Projects
None yet
1 participant