Skip to content

Allow white spaces in the resource dictionary keys #2471

Closed

Description

@paulovila

Current behavior

When I declare a style as

<Color x:Key="Blue GreyPrimary50">#eceff1</Color>

the uno project fails to compile the following generated code:

// Source ..\..\..\..\..\..\..\MainDemo.Uno.Shared\Themes\MaterialDesignColor.BlueGrey.Named.xaml (Line 3:4)
public static global::Windows.UI.Color Blue GreyPrimary50 { get; } = 
Windows.UI.ColorHelper.FromARGB(255, 236, 239, 241)        ;

Expected behavior

resource dictionary keys should be able to contain white spaces, and the generated code should be able compile accordingly with some escape character as UWP does

  • iOS
  • Android
  • WebAssembly
  • WebAssembly renderers for Xamarin.Forms
  • macOS
  • Windows
  • Build tasks
  • Solution Templates

Activity

  1. added
    kind/bug
    triage/untriaged
    on Jan 13, 2020
  2. davidjohnoliver commented on Jan 13, 2020

    @davidjohnoliver
    Contributor

    Thanks for the report!

    This will probably be fixed by #1766, since resource entries are no longer converted to static properties (with attendant naming restrictions).

  3. removed
    triage/untriaged
    on Aug 29, 2020
  4. added this to the 3.1 milestone on Aug 29, 2020
  5. added
    project/styling 👔
    on Sep 21, 2020
  6. davidjohnoliver commented on Sep 23, 2020

    @davidjohnoliver
    Contributor

    I verified that this works properly with Uno 3.0. 3e4d1aa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugproject/styling 👔

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions