Tweak DisplayAttribute, don't disable text labels, PropertyGrid should be feature complete now.

This commit is contained in:
Brant Martin
2018-04-27 10:25:57 -04:00
parent f2537706e7
commit b9e9be227a
2 changed files with 11 additions and 8 deletions

View File

@@ -110,7 +110,7 @@ namespace Torch.Views
c.Value.Sort((a, b) =>
{
var c1 = descriptors[a]?.Order?.CompareTo(descriptors[b]?.Order);
var c1 = descriptors[a]?.Order.CompareTo(descriptors[b]?.Order);
if (c1.HasValue && c1.Value != 0)
return c1.Value;
return string.Compare((descriptors[a]?.Name ?? a.Name), descriptors[b]?.Name ?? b.Name, StringComparison.Ordinal);
@@ -138,8 +138,8 @@ namespace Torch.Views
text.Margin = new Thickness(3);
text.Tag = $"{text.Text}: {descriptor?.Description}";
text.IsMouseDirectlyOverChanged += Text_IsMouseDirectlyOverChanged;
if (descriptor?.Enabled == false)
text.IsEnabled = false;
//if (descriptor?.Enabled == false)
// text.IsEnabled = false;
grid.Children.Add(text);
FrameworkElement valueControl;