Skip to content

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

@robert-abeo

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions