Browse Source
Merge pull request #1769 from AvaloniaUI/fixes/devtools
Fix devtools
pull/1772/head
Steven Kirk
8 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with
20 additions and
10 deletions
-
src/Avalonia.Base/AvaloniaObject.cs
-
src/Avalonia.Base/Diagnostics/AvaloniaObjectExtensions.cs
-
src/Avalonia.Base/ValueStore.cs
-
src/Avalonia.Diagnostics/ViewModels/DevToolsViewModel.cs
|
|
|
@ -436,7 +436,7 @@ namespace Avalonia |
|
|
|
/// Gets all priority values set on the object.
|
|
|
|
/// </summary>
|
|
|
|
/// <returns>A collection of property/value tuples.</returns>
|
|
|
|
internal IDictionary<AvaloniaProperty, PriorityValue> GetSetValues() => Values?.GetSetValues(); |
|
|
|
internal IDictionary<AvaloniaProperty, object> GetSetValues() => Values?.GetSetValues(); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Forces revalidation of properties when a property value changes.
|
|
|
|
|
|
|
|
@ -23,15 +23,24 @@ namespace Avalonia.Diagnostics |
|
|
|
{ |
|
|
|
var set = o.GetSetValues(); |
|
|
|
|
|
|
|
PriorityValue value; |
|
|
|
|
|
|
|
if (set.TryGetValue(property, out value)) |
|
|
|
if (set.TryGetValue(property, out var obj)) |
|
|
|
{ |
|
|
|
return new AvaloniaPropertyValue( |
|
|
|
property, |
|
|
|
o.GetValue(property), |
|
|
|
(BindingPriority)value.ValuePriority, |
|
|
|
value.GetDiagnostic()); |
|
|
|
if (obj is PriorityValue value) |
|
|
|
{ |
|
|
|
return new AvaloniaPropertyValue( |
|
|
|
property, |
|
|
|
o.GetValue(property), |
|
|
|
(BindingPriority)value.ValuePriority, |
|
|
|
value.GetDiagnostic()); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
return new AvaloniaPropertyValue( |
|
|
|
property, |
|
|
|
obj, |
|
|
|
BindingPriority.LocalValue, |
|
|
|
"Local value"); |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
|
|
|
|
@ -100,7 +100,7 @@ namespace Avalonia |
|
|
|
_owner.PriorityValueChanged(property, priority, oldValue, newValue); |
|
|
|
} |
|
|
|
|
|
|
|
public IDictionary<AvaloniaProperty, PriorityValue> GetSetValues() => throw new NotImplementedException(); |
|
|
|
public IDictionary<AvaloniaProperty, object> GetSetValues() => _values; |
|
|
|
|
|
|
|
public object GetValue(AvaloniaProperty property) |
|
|
|
{ |
|
|
|
|
|
|
|
@ -31,6 +31,7 @@ namespace Avalonia.Diagnostics.ViewModels |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
SelectedTab = 0; |
|
|
|
root.GetObservable(TopLevel.PointerOverElementProperty) |
|
|
|
.Subscribe(x => PointerOverElement = x?.GetType().Name); |
|
|
|
} |
|
|
|
|