From b5df0cdcee6f0a7c6c56b767daf9dc60ed0dd82f Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Tue, 22 Aug 2017 01:03:02 +0200 Subject: [PATCH] Remove Style.Resources setter. We don't need it. --- src/Avalonia.Styling/Styling/Style.cs | 12 ------------ tests/Avalonia.Styling.UnitTests/ResourceTests.cs | 8 ++++---- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/src/Avalonia.Styling/Styling/Style.cs b/src/Avalonia.Styling/Styling/Style.cs index 637e583a25..80238889c8 100644 --- a/src/Avalonia.Styling/Styling/Style.cs +++ b/src/Avalonia.Styling/Styling/Style.cs @@ -49,18 +49,6 @@ namespace Avalonia.Styling return _resources; } - - set - { - var resources = Resources; - if (!Equals(resources, value)) - { - foreach (var i in value) - { - resources[i.Key] = i.Value; - } - } - } } /// diff --git a/tests/Avalonia.Styling.UnitTests/ResourceTests.cs b/tests/Avalonia.Styling.UnitTests/ResourceTests.cs index 1efd043f6a..bfef1bd762 100644 --- a/tests/Avalonia.Styling.UnitTests/ResourceTests.cs +++ b/tests/Avalonia.Styling.UnitTests/ResourceTests.cs @@ -20,7 +20,7 @@ namespace Avalonia.Styling.UnitTests { new Style { - Resources = new ResourceDictionary + Resources = { { "Foo", "foo resource" }, { "Bar", "overridden" }, @@ -33,14 +33,14 @@ namespace Avalonia.Styling.UnitTests { new Style { - Resources = new ResourceDictionary + Resources = { { "Bar", "again overridden" }, } }, new Style { - Resources = new ResourceDictionary + Resources = { { "Bar", "bar resource" }, } @@ -64,7 +64,7 @@ namespace Avalonia.Styling.UnitTests { new Style { - Resources = new ResourceDictionary + Resources = { { "Foo", "foo" }, }