xaml-math icon indicating copy to clipboard operation
xaml-math copied to clipboard

Box and derived type should be immutable

Open Orace opened this issue 2 years ago • 1 comments
trafficstars

Box and derived type should be immutable. This property setters and methods should only be called in the constructor / at init:

  • [ ] Add
  • [ ] Source
  • [ ] Foreground
  • [ ] Background
  • [ ] Italic
  • [ ] Width
  • [ ] Height
  • [ ] Depth
  • [ ] Shift

Orace avatar May 23 '23 07:05 Orace

Yep, I approve this. We've been having a similar problem with Atom type, and that's been resolved recently (with C# records). I think a similar approach should work for boxes?

Keep an eye on how selected boxes highlighting works, though. I remember something weird about that.

ForNeVeR avatar May 23 '23 19:05 ForNeVeR