These are chat archives for AvaloniaUI/Avalonia

Nov 2018
Nov 18 2018 12:09

Hi guys,
I'm playing with custom controls, for example I have a custom textbox (subclass of TextBox) that has 2 new StyledProperties (MaximumValue, MinimumValue).
In my Xaml, I have something like this <controls:CustomTextBox Text="15" MinimumValue="10" />.

Problem, the MinimumValue setter in my CustomTextBox class is never called. The OnPropertyChanged event detects the change in that property.

My question is, I must handle the OnPropertyChanged event, and make the call to the MinimumValue setter, or the setter should be called automatically when the value is set in XAML?

Nikita Tsukanov
Nov 18 2018 14:23
Property might be changed without the setter call (just like in WPF)
So you need to register change handler for the property
Nov 18 2018 14:28
@kekekeks Thanks, I'll do that
Nov 18 2018 16:10
@Gillibald @kekekeks @nc4rrillo @jkoritzinsky and skia experts anyone able to advise me how to fix TileBrush on Skia, see the PR AvaloniaUI/Avalonia#2115
and issue #1614
for more info
Nov 18 2018 19:58
a thought to speed up getValue for inherited properties, if the inheritance tree depth is tracked (cheap) the tree walking could be replaced with a binary search or something directed by either real or average app stats
could be wrong , it worked a moment ago in my head but now doesn't :)
Nov 18 2018 20:08
or caching could be done only at every few level steps in the tree
Steven Kirk
Nov 18 2018 23:17
@ahopper i've done a few experiments around that - i've got a prototype i'll get back to when profiling shows inherited properties as one of the main performance problems