Browse Source

Add comments.

pull/2964/head
Dariusz Komosiński 7 years ago
parent
commit
7237fa979e
  1. 4
      src/Avalonia.Input/InputElement.cs

4
src/Avalonia.Input/InputElement.cs

@ -565,8 +565,12 @@ namespace Avalonia.Input
{
IsEffectivelyEnabled = IsEnabledCore && (parent?.IsEffectivelyEnabled ?? true);
// PERF-SENSITIVE: This is called on entire hierarchy and using foreach or LINQ
// will cause extra allocations and overhead.
var children = VisualChildren;
// ReSharper disable once ForCanBeConvertedToForeach
for (int i = 0; i < children.Count; ++i)
{
var child = children[i] as InputElement;

Loading…
Cancel
Save