Browse Source

fixes(DevTools): The Type column does not update when the property value changes.

pull/6280/head
Giuseppe Lippolis 5 years ago
parent
commit
4b3b37c961
  1. 2
      src/Avalonia.Diagnostics/Diagnostics/ViewModels/AvaloniaPropertyViewModel.cs
  2. 2
      src/Avalonia.Diagnostics/Diagnostics/ViewModels/ClrPropertyViewModel.cs

2
src/Avalonia.Diagnostics/Diagnostics/ViewModels/AvaloniaPropertyViewModel.cs

@ -45,6 +45,7 @@ namespace Avalonia.Diagnostics.ViewModels
{
var convertedValue = ConvertFromString(value, Property.PropertyType);
_target.SetValue(Property, convertedValue);
Update();
}
catch { }
}
@ -84,6 +85,7 @@ namespace Avalonia.Diagnostics.ViewModels
RaiseAndSetIfChanged(ref _group, "Unset", nameof(Group));
}
}
RaisePropertyChanged(nameof(Type));
}
}
}

2
src/Avalonia.Diagnostics/Diagnostics/ViewModels/ClrPropertyViewModel.cs

@ -48,6 +48,7 @@ namespace Avalonia.Diagnostics.ViewModels
{
var convertedValue = ConvertFromString(value, Property.PropertyType);
Property.SetValue(_target, convertedValue);
Update();
}
catch { }
}
@ -67,6 +68,7 @@ namespace Avalonia.Diagnostics.ViewModels
var val = Property.GetValue(_target);
RaiseAndSetIfChanged(ref _value, val, nameof(Value));
RaiseAndSetIfChanged(ref _assignedType, _value?.GetType() ?? Property.PropertyType, nameof(AssignedType));
RaisePropertyChanged(nameof(Type));
}
}
}

Loading…
Cancel
Save