From 3f7d7b2a6542cc16279625e496d9bc0f180a9c0e Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Mon, 22 Oct 2018 10:38:03 +0200 Subject: [PATCH] Don't call IsRegistered in PropertyEqualsSelector. Was showing up in the profiling and it's not even correct anymore, as any property can be set on any object now, registered or not. --- src/Avalonia.Styling/Styling/PropertyEqualsSelector.cs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/Avalonia.Styling/Styling/PropertyEqualsSelector.cs b/src/Avalonia.Styling/Styling/PropertyEqualsSelector.cs index 25f12ffa57..541e8646b1 100644 --- a/src/Avalonia.Styling/Styling/PropertyEqualsSelector.cs +++ b/src/Avalonia.Styling/Styling/PropertyEqualsSelector.cs @@ -72,11 +72,7 @@ namespace Avalonia.Styling /// protected override SelectorMatch Evaluate(IStyleable control, bool subscribe) { - if (!AvaloniaPropertyRegistry.Instance.IsRegistered(control, _property)) - { - return SelectorMatch.False; - } - else if (subscribe) + if (subscribe) { return new SelectorMatch(control.GetObservable(_property).Select(v => Equals(v ?? string.Empty, _value))); }