Tidy up namespaces
This commit is contained in:
@@ -1,28 +1,27 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Data;
|
||||
|
||||
namespace Toolkit.Foundation.Avalonia
|
||||
namespace Toolkit.Foundation.Avalonia;
|
||||
|
||||
public static class PropertyPathHelper
|
||||
{
|
||||
public static class PropertyPathHelper
|
||||
private static readonly Dummy dummy = new();
|
||||
|
||||
public static object GetValue(object args, string path)
|
||||
{
|
||||
private static readonly Dummy dummy = new();
|
||||
|
||||
public static object GetValue(object args, string path)
|
||||
Binding binding = new(path)
|
||||
{
|
||||
Binding binding = new(path)
|
||||
{
|
||||
Mode = BindingMode.OneTime,
|
||||
Source = args
|
||||
};
|
||||
Mode = BindingMode.OneTime,
|
||||
Source = args
|
||||
};
|
||||
|
||||
dummy.Bind(Dummy.ValueProperty, binding);
|
||||
return dummy.GetValue(Dummy.ValueProperty);
|
||||
}
|
||||
dummy.Bind(Dummy.ValueProperty, binding);
|
||||
return dummy.GetValue(Dummy.ValueProperty);
|
||||
}
|
||||
|
||||
private class Dummy : AvaloniaObject
|
||||
{
|
||||
public static readonly StyledProperty<object> ValueProperty =
|
||||
AvaloniaProperty.Register<Dummy, object>("Value");
|
||||
}
|
||||
private class Dummy : AvaloniaObject
|
||||
{
|
||||
public static readonly StyledProperty<object> ValueProperty =
|
||||
AvaloniaProperty.Register<Dummy, object>("Value");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user