dotnet/maui

[Enhancement] Label Autofit Font

Open

#10,884 opened on 2022年10月25日

GitHub で見る
 (5 comments) (13 reactions) (0 assignees)C# (1,951 forks)batch import
area-fontsgood first issueproposal/open

Repository metrics

Stars
 (23,245 stars)
PR merge metrics
 (平均マージ 47d 9h) (30d で 248 merged PRs)

説明

Description

Add new properties to the label control to enable auto-scaling font based on available width

A PR was done in Xamarin.Forms, but was closed as its a new feature - https://github.com/xamarin/Xamarin.Forms/pull/7981

Public API Changes

  • (enum) AutoFitTextMode Label.AutofitText{ get; set; } //Bindable Property
  • double Label.MaxAutoFitSize { get; set;} //Bindable Property
  • double Label.MinAutoFitSize {get; set;} //Bindable Property

Intended Use-Case

When you want to scale font based on the given space

コントリビューターガイド