Skip to content

Fluent2 ListBoxItem Style (Et al..) Missing Bindings in ControlTemplate #9564

Closed

Description

@robert-abeo

Description

There are a lot of default styles that don't set template bindings correctly. I give an example for ListBoxItem below but there are other similar cases:

Margin="0"
Padding="{TemplateBinding Padding}"
Background="Transparent"
BorderThickness="1"

Should be:

<Border
  x:Name="Border"
  Padding="{TemplateBinding Padding}"
  Background="{TemplateBinding Background}"
  BorderThickness="{TemplateBinding BorderThickness}"
  CornerRadius="{TemplateBinding Border.CornerRadius}">

The Background/Border properties should be settable on the control itself and carried through to the template. These should NOT be hard-coded.

Reproduction Steps

See current Fluent2 theme

Expected behavior

Control templates should have all applicable template bindings.

Actual behavior

Control templates are missing several template bindings.

Regression?

No response

Known Workarounds

No response

Impact

No response

Configuration

No response

Other information

No response

Activity

  1. changed the title [-]ListBoxItem (Et al..) Missing Bindings in ControlTemplate[/-] [+]Fluent2 ListBoxItem Style (Et al..) Missing Bindings in ControlTemplate[/+] on Aug 13, 2024
  2. added
    Bug
    on Aug 14, 2024
  3. self-assigned this
    on Sep 2, 2024
  4. locked and limited conversation to collaborators on Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions