Skip to content

Commit

Permalink
chore(debug): [iOS] Include layout properties in ShowLocalVisualTree()
Browse files Browse the repository at this point in the history
  • Loading branch information
davidjohnoliver committed Apr 27, 2020
1 parent fc18909 commit db1fba4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Uno.UI/Extensions/UIViewExtensions.iOSmacOS.cs
Expand Up @@ -584,6 +584,7 @@ StringBuilder AppendView(_View innerView)

var uiElement = innerView as UIElement;
var desiredSize = uiElement?.DesiredSize.ToString() ?? "<native/unk>";
var fe = innerView as IFrameworkElement;

return sb
.Append(spacing)
Expand All @@ -594,6 +595,11 @@ StringBuilder AppendView(_View innerView)
#if __IOS__
.Append($" {(innerView.Hidden ? "Hidden" : "Visible")}")
#endif
.Append(fe != null ? $" HA={fe.HorizontalAlignment},VA={fe.VerticalAlignment}" : "")
.Append(fe != null && fe.Margin != default ? $" Margin={fe.Margin}" : "")
.Append(fe != null && fe.TryGetBorderThickness(out var b) && b != default ? $" Border={b}" : "")
.Append(fe != null && fe.TryGetPadding(out var p) && p != default ? $" Padding={p}" : "")
.Append(uiElement != null ? $" DesiredSize={uiElement.DesiredSize}" : "")
.Append(uiElement?.NeedsClipToSlot ?? false ? " CLIPPED_TO_SLOT" : "")
.Append(innerView is TextBlock textBlock ? $" Text=\"{textBlock.Text}\"" : "")
.AppendLine();
Expand Down

0 comments on commit db1fba4

Please sign in to comment.