lepoco / lepoco/wpfui

ObservableCollection does not work correctly with the controls

Open
#63 5 comments 0 reactions 1 assignee View on GitHub

@pomianowski is already working on this.

Since Jul 19, 2022.

controls enhancement styles
Dominant language
C#
Stars
9.6k
Forks
1k
PR merge metrics
No merged PRs in 30d

Description

If we try to add any control via code using ObservableCollection, we won't get the desired result.
for example:

public ObservableCollection<WPFUI.Controls.Card> TestColl { get; set; } = new ObservableCollection<WPFUI.Controls.Card>();

TestTest.Add(new WPFUI.Controls.Card {Content = "Test"});

The result will be just Test text without any style

Similar behavior can be seen in the Demo > Controls > DataGrid
data grid
As you see the checkboxes use the default windows style.

Maybe someone knows why this happens? I have not yet tested other ui libraries, wonder how they handle it.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.