Browse Source

Fix data context change notification.

Don't notify a non-inheritance child that the data context has begun changing, because it won't receive the accompanying end change notification.

Fixes #1245.
pull/1246/head
Steven Kirk 9 years ago
parent
commit
6421d422cb
  1. 4
      src/Avalonia.Controls/Control.cs

4
src/Avalonia.Controls/Control.cs

@ -774,7 +774,9 @@ namespace Avalonia.Controls
foreach (var child in control.LogicalChildren) foreach (var child in control.LogicalChildren)
{ {
if (child is Control c && !c.IsSet(DataContextProperty)) if (child is Control c &&
c.InheritanceParent == control &&
!c.IsSet(DataContextProperty))
{ {
DataContextNotifying(c, notifying); DataContextNotifying(c, notifying);
} }

Loading…
Cancel
Save