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

[iOS 5.6 regression] Parent control resources completely ignored beyond direct parent #19825

Closed
mikernet opened this issue Apr 3, 2025 · 0 comments · Fixed by #19841
Closed
Assignees
Labels
difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. kind/bug Something isn't working

Comments

@mikernet
Copy link
Contributor

mikernet commented Apr 3, 2025

Current behavior

Styles (both implicit and specifically referenced via {StaticResource}) added to any parent other than the direct parent are ignored. This is an Uno 5.6 regression (works in v5.5.62).

Expected behavior

Child controls should be able to access styles from parent resource dictionaries beyond their direct parent.

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

<Page ...>
  <Page.Resources>
    <!-- Style is ignored -->
    <Style TargetType="Button">
      <Setter Property="Background" Value="Red"/>
    </Style>
  </Page.Resources>

  <ScrollViewer>
    <ScrollViewer.Resources>
      <!-- Style is ignored -->
      <Style TargetType="Button">
        <Setter Property="Background" Value="Red"/>
      </Style>
    </ScrollViewer.Resources>
    <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" utu:SafeArea.Insets="VisibleBounds">
      <!-- Style is only respected if this is uncommented -->
      <!--<StackPanel.Resources>
        <Style TargetType="Button">
          <Setter Property="Background" Value="Red"/>
        </Style>
      </StackPanel.Resources>-->
      <Button Content="Test Content"/>
    </StackPanel>
  </ScrollViewer>
</Page>

Sample project: TestUno.zip

Notice the style is not applied on iOS but works fine everywhere else.

Workaround

No response

Works on UWP/WinUI

Yes

Environment

Uno.WinUI / Uno.WinUI.WebAssembly / Uno.WinUI.Skia

NuGet package version(s)

6.0.0-dev.132, 5.6.51, 5.6.19

Affected platforms

iOS

IDE

No response

IDE version

No response

Relevant plugins

No response

Anything else we need to know?

No response

@mikernet mikernet added difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification labels Apr 3, 2025
@mikernet mikernet changed the title [iOS] ResourceDictionary.Source does not resolve relative paths next to XAML file [iOS regression] Root control resource dictionary completely ignored Apr 3, 2025
@mikernet mikernet changed the title [iOS regression] Root control resource dictionary completely ignored [iOS regression] Parent control resource dictionary completely ignored Apr 3, 2025
@mikernet mikernet changed the title [iOS regression] Parent control resource dictionary completely ignored [iOS regression] Parent control resource dictionaries completely ignored Apr 3, 2025
@mikernet mikernet changed the title [iOS regression] Parent control resource dictionaries completely ignored [iOS regression] Parent control resource dictionaries completely ignored beyond direct parent Apr 3, 2025
@mikernet mikernet changed the title [iOS regression] Parent control resource dictionaries completely ignored beyond direct parent [iOS regression] Parent control resources completely ignored beyond direct parent Apr 3, 2025
@mikernet mikernet changed the title [iOS regression] Parent control resources completely ignored beyond direct parent [iOS 5.6 regression] Parent control resources completely ignored beyond direct parent Apr 3, 2025
@ajpinedam ajpinedam self-assigned this Apr 5, 2025
@ajpinedam ajpinedam removed the triage/untriaged Indicates an issue requires triaging or verification label Apr 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants