Skip to content

Classes implementing ComboBox do not render #2404

Closed

Description

@peternary

Current behavior

In Android and Wasm any custom class implementing ComboBox is not rendered.

Expected behavior

ComboBox should render as on UWP.

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

Start the attached solution in UWP and observe the red combobox. Launch in Android and Wasm and observe that the combobox is not drawn.
ComboboxAndroid.zip

Environment

Nuget Package:
Uno.UI
Package Version(s):
2.1.0-dev.481
Affected platform(s):

  • [?] iOS
  • Android
  • WebAssembly
  • WebAssembly renderers for Xamarin.Forms
  • Windows
  • Build tasks
  • Solution Templates

Visual Studio:

  • 2017 (version: )
  • 2019 (version: )
  • for Mac (version: )

Relevant plugins:

  • Resharper (version: )

Anything else we need to know?

Activity

  1. added
    kind/bug
    triage/untriaged
    on Dec 27, 2019
  2. jeromelaban commented on Dec 27, 2019

    @jeromelaban
    Member

    This is issue is related to #1766, where the DefaultStyleKey is not taken into account.

    For an inherited control to work, you need to define either an implicit style or a named style for your new control type.

  3. DierkDroth commented on Dec 27, 2019

    @DierkDroth

    @jeromelaban any chance to get the PR referenced merged?

  4. peternary commented on Dec 27, 2019

    @peternary
    Author

    I've tried creating a named style and assigning it but that doesn't appear to be working. Sample attached

    ComboboxAndroid_with_style.zip

  5. jeromelaban commented on Dec 27, 2019

    @jeromelaban
    Member

    @DierkDroth this PR is still in the works, with lots of validation left to do. Most of the issues fixed by this PR can be worked around with some additional styling that is compatible with the normal behavior of WinUI.

    @peternary you need to redefine the style completely, not just parts of it. This is something that the mentioned PR will also address. For the ComboBox, take a complete copy of the original style. Best is to place the style in a ResourceDictionary referenced from App.xaml.

  6. added
    platform/android 🤖
    platform/wasm 🌐
    on Jan 2, 2020
  7. removed
    triage/untriaged
    on Jan 3, 2020
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/bugplatform/android 🤖platform/wasm 🌐

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions