Browse Source

add relativepoint tostring

pull/3329/head
Andrey Kunchev 7 years ago
parent
commit
29be26a882
  1. 11
      src/Avalonia.Visuals/RelativePoint.cs

11
src/Avalonia.Visuals/RelativePoint.cs

@ -177,5 +177,16 @@ namespace Avalonia
unit);
}
}
/// <summary>
/// Returns a String representing this RelativePoint instance.
/// </summary>
/// <returns>The string representation.</returns>
public override string ToString()
{
return _unit == RelativeUnit.Absolute ?
_point.ToString() :
string.Format(CultureInfo.InvariantCulture, "{0}%, {1}%", _point.X * 100, _point.Y * 100);
}
}
}

Loading…
Cancel
Save