Browse Source

TextBox and TestPresenter use AddOwner from TextBlock for LineHeight

pull/8139/head
Brett Story 4 years ago
parent
commit
8b9883e0d3
  1. 2
      src/Avalonia.Controls/Presenters/TextPresenter.cs
  2. 2
      src/Avalonia.Controls/TextBox.cs

2
src/Avalonia.Controls/Presenters/TextPresenter.cs

@ -69,7 +69,7 @@ namespace Avalonia.Controls.Presenters
/// Defines the <see cref="LineHeight"/> property.
/// </summary>
public static readonly StyledProperty<double> LineHeightProperty =
AvaloniaProperty.Register<TextPresenter, double>(nameof(LineHeight), defaultValue: double.NaN);
TextBlock.LineHeightProperty.AddOwner<TextBox>();
/// <summary>
/// Defines the <see cref="Background"/> property.

2
src/Avalonia.Controls/TextBox.cs

@ -110,7 +110,7 @@ namespace Avalonia.Controls
/// Defines see <see cref="TextPresenter.LineHeight"/> property.
/// </summary>
public static readonly StyledProperty<double> LineHeightProperty =
TextPresenter.LineHeightProperty.AddOwner<TextBox>();
TextBlock.LineHeightProperty.AddOwner<TextBox>();
public static readonly StyledProperty<string?> WatermarkProperty =
AvaloniaProperty.Register<TextBox, string?>(nameof(Watermark));

Loading…
Cancel
Save