-
Currently i had replicated the Slider.cs code just to expose Track with a public getter. But this seens ugly and unnecessary... Var: https://github.com/AvaloniaUI/Avalonia/blob/master/src/Avalonia.Controls/Slider.cs#L84 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
In TemplateApplied event/override you can get it from the namescope in similar way as it is here: Other way, less efficient, is to find this control in the visual tree (traverse VisualChildren enumerable recursively). |
Beta Was this translation helpful? Give feedback.
In TemplateApplied event/override you can get it from the namescope in similar way as it is here:
https://github.com/AvaloniaUI/Avalonia/blob/master/src/Avalonia.Controls/Slider.cs#L189
Other way, less efficient, is to find this control in the visual tree (traverse VisualChildren enumerable recursively).