9 instantiations of Label
Microsoft.Maui.Controls (9)
BindableLayout\BindableLayout.cs (2)
235 var label = new Label { HorizontalTextAlignment = TextAlignment.Center }; 499 return new Label { Text = emptyView?.ToString(), HorizontalTextAlignment = TextAlignment.Center };
ContentConverter.cs (1)
49 var label = new Label
ElementTemplate.cs (1)
81 return new Label();
Internals\ProfilePage.cs (1)
114 var label = new Label();
ListView\ListView.cs (1)
676 view = new Label { Text = dataObject.ToString() };
Shell\BaseShellItem.cs (1)
482 var label = new Label();
TitleBar\TitleBar.cs (2)
428 var titleLabel = new Label() 481 var subtitleLabel = new Label()
105 references to Label
Microsoft.Maui.Controls (105)
BindableLayout\BindableLayout.cs (2)
235 var label = new Label { HorizontalTextAlignment = TextAlignment.Center }; 236 label.SetBinding(Label.TextProperty, static (object o) => o);
ContentConverter.cs (2)
47 static Label ConvertToLabel(string textContent, ContentPresenter presenter) 49 var label = new Label
Device.cs (6)
165 public static readonly Style TitleStyle = new Style(typeof(Label)) { BaseResourceKey = TitleStyleKey }; 167 public static readonly Style SubtitleStyle = new Style(typeof(Label)) { BaseResourceKey = SubtitleStyleKey }; 169 public static readonly Style BodyStyle = new Style(typeof(Label)) { BaseResourceKey = BodyStyleKey }; 171 public static readonly Style ListItemTextStyle = new Style(typeof(Label)) { BaseResourceKey = ListItemTextStyleKey }; 173 public static readonly Style ListItemDetailTextStyle = new Style(typeof(Label)) { BaseResourceKey = ListItemDetailTextStyleKey }; 175 public static readonly Style CaptionStyle = new Style(typeof(Label)) { BaseResourceKey = CaptionStyleKey };
FontSizeConverter.cs (12)
57 var type = serviceProvider.GetService(typeof(IProvideValueTarget)) is IProvideValueTarget valueTargetProvider ? valueTargetProvider.TargetObject.GetType() : typeof(Label); 77 return Device.GetNamedSize(NamedSize.Default, typeof(Label), false); 79 return Device.GetNamedSize(NamedSize.Micro, typeof(Label), false); 81 return Device.GetNamedSize(NamedSize.Small, typeof(Label), false); 83 return Device.GetNamedSize(NamedSize.Medium, typeof(Label), false); 85 return Device.GetNamedSize(NamedSize.Large, typeof(Label), false); 87 return Device.GetNamedSize(NamedSize.Body, typeof(Label), false); 89 return Device.GetNamedSize(NamedSize.Caption, typeof(Label), false); 91 return Device.GetNamedSize(NamedSize.Header, typeof(Label), false); 93 return Device.GetNamedSize(NamedSize.Subtitle, typeof(Label), false); 95 return Device.GetNamedSize(NamedSize.Title, typeof(Label), false); 97 return Device.GetNamedSize(namedSize, typeof(Label), false);
Hosting\AppHostBuilderExtensions.cs (2)
76 handlersCollection.AddHandler<Label, LabelHandler>(); 247 Label.RemapForControls();
Internals\ProfilePage.cs (1)
114 var label = new Label();
Label\Label.cs (22)
18 public partial class Label : View, IFontElement, ITextElement, ITextAlignmentElement, ILineHeightElement, IElementConfiguration<Label>, IDecorableTextElement, IPaddingElement, ILabel 24 public static readonly BindableProperty VerticalTextAlignmentProperty = BindableProperty.Create(nameof(VerticalTextAlignment), typeof(TextAlignment), typeof(Label), TextAlignment.Start); 33 public static readonly BindableProperty TextProperty = BindableProperty.Create(nameof(Text), typeof(string), typeof(Label), default(string), propertyChanged: OnTextPropertyChanged); 54 public static readonly BindableProperty FormattedTextProperty = BindableProperty.Create(nameof(FormattedText), typeof(FormattedString), typeof(Label), default(FormattedString), 60 var label = ((Label)bindable); 71 var label = ((Label)bindable); 101 public static readonly BindableProperty LineBreakModeProperty = BindableProperty.Create(nameof(LineBreakMode), typeof(LineBreakMode), typeof(Label), LineBreakMode.WordWrap, 102 propertyChanged: (bindable, oldvalue, newvalue) => ((Label)bindable).InvalidateMeasureIfLabelSizeable()); 108 public static readonly BindableProperty MaxLinesProperty = BindableProperty.Create(nameof(MaxLines), typeof(int), typeof(Label), -1, 109 propertyChanged: (bindable, oldvalue, newvalue) => ((Label)bindable).InvalidateMeasureIfLabelSizeable()); 115 public static readonly BindableProperty TextTypeProperty = BindableProperty.Create(nameof(TextType), typeof(TextType), typeof(Label), TextType.Text, 116 propertyChanged: (bindable, oldvalue, newvalue) => ((Label)bindable).InvalidateMeasureIfLabelSizeable()); 118 readonly Lazy<PlatformConfigurationRegistry<Label>> _platformConfigurationRegistry; 123 _platformConfigurationRegistry = new Lazy<PlatformConfigurationRegistry<Label>>(() => new PlatformConfigurationRegistry<Label>(this)); 364 var label = (Label)bindable; 374 public IPlatformElementConfiguration<T, Label> On<T>() where T : IConfigPlatform 437 internal static bool IsLabelSizeable(Label label) 460 internal static bool TextChangedShouldInvalidateMeasure(Label label)
Label\Label.Mapper.cs (15)
19 LabelHandler.Mapper.ReplaceMapping<Label, ILabelHandler>(nameof(TextType), MapTextType); 20 LabelHandler.Mapper.ReplaceMapping<Label, ILabelHandler>(nameof(TextTransform), MapTextTransform); 23 LabelHandler.Mapper.ReplaceMapping<Label, ILabelHandler>(nameof(Text), MapText); 24 LabelHandler.Mapper.ReplaceMapping<Label, ILabelHandler>(nameof(FormattedText), MapText); 26 LabelHandler.Mapper.ReplaceMapping<Label, ILabelHandler>(nameof(LineBreakMode), MapLineBreakMode); 27 LabelHandler.Mapper.ReplaceMapping<Label, ILabelHandler>(nameof(MaxLines), MapMaxLines); 51 public static void MapTextType(LabelHandler handler, Label label) => 53 public static void MapTextType(ILabelHandler handler, Label label) => 55 static void MapTextTransform(ILabelHandler handler, Label label) => 57 static void MapTextOrFormattedText(ILabelHandler handler, Label label) 161 static bool IsPlainText(Label label) 172 static bool IsDefaultFont(Label label) 174 if (label.IsSet(Label.FontAttributesProperty)) 177 if (label.IsSet(Label.FontFamilyProperty)) 180 if (label.IsSet(Label.FontSizeProperty))
Label\Label.Standard.cs (6)
9 public static void MapText(ILabelHandler handler, Label label) { } 10 public static void MapLineBreakMode(ILabelHandler handler, Label label) { } 11 public static void MapMaxLines(ILabelHandler handler, Label label) { } 13 public static void MapText(LabelHandler handler, Label label) => MapText((ILabelHandler)handler, label); 14 public static void MapLineBreakMode(LabelHandler handler, Label label) => MapLineBreakMode((ILabelHandler)handler, label); 15 public static void MapMaxLines(LabelHandler handler, Label label) => MapMaxLines((ILabelHandler)handler, label);
PlatformConfiguration\TizenSpecific\Label.cs (5)
4 using FormsElement = Maui.Controls.Label; 10 public static readonly BindableProperty FontWeightProperty = BindableProperty.Create("FontWeight", typeof(string), typeof(FormsElement), FontWeight.None); 25 public static string GetFontWeight(this IPlatformElementConfiguration<Tizen, FormsElement> config) 31 public static IPlatformElementConfiguration<Tizen, FormsElement> SetFontWeight(this IPlatformElementConfiguration<Tizen, FormsElement> config, string weight)
PlatformConfiguration\WindowsSpecific\Label.cs (5)
6 using FormsElement = Maui.Controls.Label; 12 public static readonly BindableProperty DetectReadingOrderFromContentProperty = BindableProperty.Create("DetectReadingOrderFromContent", typeof(bool), typeof(FormsElement), false); 21 public static bool GetDetectReadingOrderFromContent(this IPlatformElementConfiguration<Windows, FormsElement> config) 33 public static IPlatformElementConfiguration<Windows, FormsElement> SetDetectReadingOrderFromContent( 34 this IPlatformElementConfiguration<Windows, FormsElement> config, bool value)
Properties\AssemblyInfo.cs (3)
114[assembly: StyleProperty("max-lines", typeof(Label), nameof(Label.MaxLinesProperty))] 163[assembly: StyleProperty("-maui-vertical-text-alignment", typeof(Label), nameof(TextAlignmentElement.VerticalTextAlignmentProperty))]
Shell\BaseShellItem.cs (15)
329 flyoutItemCell.Children.OfType<Label>().First() 365 var defaultLabelClass = new Style(typeof(Label)) 368 new Setter { Property = Label.VerticalTextAlignmentProperty, Value = TextAlignment.Center } 482 var label = new Label(); 483 defaultLabelClass.Setters.Add(new Setter { Property = Label.TextProperty, Value = labelBinding }); 500 defaultLabelClass.Setters.Add(new Setter { Property = Label.FontSizeProperty, Value = 14 }); 501 defaultLabelClass.Setters.Add(new Setter { Property = Label.TextColorProperty, Value = textColor }); 502 defaultLabelClass.Setters.Add(new Setter { Property = Label.FontFamilyProperty, Value = "sans-serif-medium" }); 503 defaultLabelClass.Setters.Add(new Setter { Property = Label.MarginProperty, Value = new Thickness(20, 0, 0, 0) }); 507 defaultLabelClass.Setters.Add(new Setter { Property = Label.FontSizeProperty, Value = 14 }); 508 defaultLabelClass.Setters.Add(new Setter { Property = Label.FontAttributesProperty, Value = FontAttributes.Bold }); 512 defaultLabelClass.Setters.Add(new Setter { Property = Label.HorizontalOptionsProperty, Value = LayoutOptions.Start }); 513 defaultLabelClass.Setters.Add(new Setter { Property = Label.HorizontalTextAlignmentProperty, Value = TextAlignment.Start }); 517 defaultLabelClass.Setters.Add(new Setter { Property = Label.HorizontalOptionsProperty, Value = LayoutOptions.Start }); 518 defaultLabelClass.Setters.Add(new Setter { Property = Label.HorizontalTextAlignmentProperty, Value = TextAlignment.Start });
TitleBar\TitleBar.cs (8)
428 var titleLabel = new Label() 443 Label.TextProperty, 448 Label.TextColorProperty, 456 Property = Label.OpacityProperty, 465 Property = Label.OpacityProperty, 481 var subtitleLabel = new Label() 497 Label.TextProperty, 502 Label.TextColorProperty,
ViewExtensions.cs (1)
418 if (element is Label label)