Browse Source

Object graph - tweaked column sizing a bit.

pull/15/head
mkonicek 15 years ago
parent
commit
f8adea054f
  1. 5
      src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/Drawing/PositionedGraphNodeControl.xaml.cs
  2. 7
      src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/ObjectGraph/ObjectGraphBuilder.cs

5
src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/Drawing/PositionedGraphNodeControl.xaml.cs

@ -65,10 +65,9 @@ namespace Debugger.AddIn.Visualizers.Graph.Drawing @@ -65,10 +65,9 @@ namespace Debugger.AddIn.Visualizers.Graph.Drawing
public void CalculateWidthHeight()
{
int maxLen = this.items.MaxOrDefault(contentNode => contentNode.Name.Length, 0);
int spaces = Math.Max((int)(maxLen * 1.8 - 3), 0);
int nameColumnMaxLen = this.items.MaxOrDefault(contentNode => contentNode.Name.Length, 0);
GridView gv = listView.View as GridView;
gv.Columns[1].Width = 50 + spaces * 2.5;
gv.Columns[1].Width = Math.Min(20 + nameColumnMaxLen * 6, 260);
gv.Columns[2].Width = 80;
listView.Width = gv.Columns[0].Width + gv.Columns[1].Width + gv.Columns[2].Width + 10;

7
src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/ObjectGraph/ObjectGraphBuilder.cs

@ -226,9 +226,14 @@ namespace Debugger.AddIn.Visualizers.Graph @@ -226,9 +226,14 @@ namespace Debugger.AddIn.Visualizers.Graph
foreach (MemberInfo memberProp in shownType.GetFieldsAndNonIndexedProperties(flags))
{
if (memberProp.Name.Contains("<")) {
// skip backing fields
if (memberProp.Name.Contains("<"))
continue;
}
if (memberProp.DeclaringType != shownType) {
// skip properties declared in the base type
continue;
}
// ObjectGraphProperty needs an expression
// to use expanded / nonexpanded (and to evaluate?)

Loading…
Cancel
Save