Browse Source

Remove Style.Resources setter.

We don't need it.
pull/1136/head
Steven Kirk 9 years ago
parent
commit
b5df0cdcee
  1. 12
      src/Avalonia.Styling/Styling/Style.cs
  2. 8
      tests/Avalonia.Styling.UnitTests/ResourceTests.cs

12
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;
}
}
}
}
/// <summary>

8
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" },
}

Loading…
Cancel
Save