diff --git a/src/Avalonia.Controls/Application.cs b/src/Avalonia.Controls/Application.cs
index bbea3693cc..0e696e0199 100644
--- a/src/Avalonia.Controls/Application.cs
+++ b/src/Avalonia.Controls/Application.cs
@@ -362,7 +362,7 @@ namespace Avalonia
}
///
- bool IResourceProvider.TryGetResource(string key, out object value)
+ bool IResourceProvider.TryGetResource(object key, out object value)
{
value = null;
return (_resources?.TryGetResource(key, out value) ?? false) ||
diff --git a/src/Avalonia.Styling/Controls/IResourceProvider.cs b/src/Avalonia.Styling/Controls/IResourceProvider.cs
index eec783623c..cbaacee012 100644
--- a/src/Avalonia.Styling/Controls/IResourceProvider.cs
+++ b/src/Avalonia.Styling/Controls/IResourceProvider.cs
@@ -28,6 +28,6 @@ namespace Avalonia.Controls
///
/// True if the resource if found, otherwise false.
///
- bool TryGetResource(string key, out object value);
+ bool TryGetResource(object key, out object value);
}
}
diff --git a/src/Avalonia.Styling/Controls/ResourceDictionary.cs b/src/Avalonia.Styling/Controls/ResourceDictionary.cs
index 74a861b36b..901e27b7b7 100644
--- a/src/Avalonia.Styling/Controls/ResourceDictionary.cs
+++ b/src/Avalonia.Styling/Controls/ResourceDictionary.cs
@@ -69,7 +69,7 @@ namespace Avalonia.Controls
}
///
- public bool TryGetResource(string key, out object value)
+ public bool TryGetResource(object key, out object value)
{
if (TryGetValue(key, out value))
{
diff --git a/src/Avalonia.Styling/Controls/ResourceProviderExtensions.cs b/src/Avalonia.Styling/Controls/ResourceProviderExtensions.cs
index 52309b87a2..01112eaf2c 100644
--- a/src/Avalonia.Styling/Controls/ResourceProviderExtensions.cs
+++ b/src/Avalonia.Styling/Controls/ResourceProviderExtensions.cs
@@ -11,7 +11,7 @@ namespace Avalonia.Controls
/// The control.
/// The resource key.
/// The resource, or if not found.
- public static object FindResource(this IResourceNode control, string key)
+ public static object FindResource(this IResourceNode control, object key)
{
if (control.TryFindResource(key, out var value))
{
@@ -28,7 +28,7 @@ namespace Avalonia.Controls
/// The resource key.
/// On return, contains the resource if found, otherwise null.
/// True if the resource was found; otherwise false.
- public static bool TryFindResource(this IResourceNode control, string key, out object value)
+ public static bool TryFindResource(this IResourceNode control, object key, out object value)
{
Contract.Requires(control != null);
Contract.Requires(key != null);
@@ -52,7 +52,7 @@ namespace Avalonia.Controls
return false;
}
- public static IObservable