1 instantiation of Button
Microsoft.Maui.Controls (1)
Internals\ProfilePage.cs (1)
117
var buttonA = new
Button
() { Text = "0s", HeightRequest = 62 };
65 references to Button
Microsoft.Maui.Controls (43)
Button\Button.cs (15)
17
public partial class Button : View, IFontElement, ITextElement, IBorderElement, IButtonController, IElementConfiguration<
Button
>, IPaddingElement, IImageController, IViewController, IButtonElement, ICommandElement, IImageElement, IButton, ITextButton, IImageButton
35
nameof(ContentLayout), typeof(ButtonContentLayout), typeof(
Button
), new ButtonContentLayout(ButtonContentLayout.ImagePosition.Left, DefaultSpacing),
36
propertyChanged: (bindable, oldVal, newVal) => ((
Button
)bindable).InvalidateMeasureInternal(InvalidationTrigger.MeasureChanged));
42
nameof(Text), typeof(string), typeof(
Button
), null,
43
propertyChanged: (bindable, oldVal, newVal) => ((
Button
)bindable).InvalidateMeasureInternal(InvalidationTrigger.MeasureChanged));
83
public static readonly BindableProperty BorderWidthProperty = BindableProperty.Create(nameof(BorderWidth), typeof(double), typeof(
Button
), -1d);
93
public static readonly BindableProperty CornerRadiusProperty = BindableProperty.Create(nameof(CornerRadius), typeof(int), typeof(
Button
), defaultValue: BorderElement.DefaultCornerRadius);
109
nameof(LineBreakMode), typeof(LineBreakMode), typeof(
Button
), LineBreakMode.NoWrap,
110
propertyChanged: (bindable, oldvalue, newvalue) => ((
Button
)bindable).InvalidateMeasureInternal(InvalidationTrigger.MeasureChanged));
138
internal static readonly BindablePropertyKey IsPressedPropertyKey = BindableProperty.CreateReadOnly(nameof(IsPressed), typeof(bool), typeof(
Button
), default(bool));
145
readonly Lazy<PlatformConfigurationRegistry<
Button
>> _platformConfigurationRegistry;
350
/// Initializes a new instance of the <see cref="
Button
"/> class.
354
_platformConfigurationRegistry = new Lazy<PlatformConfigurationRegistry<
Button
>>(() => new PlatformConfigurationRegistry<
Button
>(this));
358
public IPlatformElementConfiguration<T,
Button
> On<T>() where T : IConfigPlatform
Button\Button.Mapper.cs (7)
17
ButtonHandler.Mapper.ReplaceMapping<
Button
, IButtonHandler>(nameof(ContentLayout), MapContentLayout);
25
ButtonHandler.Mapper.ReplaceMapping<
Button
, IButtonHandler>(nameof(Text), MapText);
27
ButtonHandler.Mapper.ReplaceMapping<
Button
, IButtonHandler>(nameof(TextTransform), MapText);
28
ButtonHandler.Mapper.ReplaceMapping<
Button
, IButtonHandler>(nameof(
Button
.LineBreakMode), MapLineBreakMode);
36
public static void MapContentLayout(IButtonHandler handler,
Button
button)
41
public static void MapContentLayout(ButtonHandler handler,
Button
button) =>
Button\Button.Standard.cs (4)
11
public static void MapText(ButtonHandler handler,
Button
button) { }
18
public static void MapLineBreakMode(ButtonHandler handler,
Button
button) { }
20
public static void MapText(IButtonHandler handler,
Button
button) { }
22
public static void MapLineBreakMode(IButtonHandler handler,
Button
button) { }
DragAndDrop\DropGestureRecognizer.cs (1)
141
else if (Parent is
Button
b)
Element\Element.cs (1)
45
/// <description>The lower part of the diagram shows the Microsoft.Maui.Controls classes for universally-available controls, such as <see cref = "
Button
"/> and <see cref="TableView"/>.</description>
Hosting\AppHostBuilderExtensions.cs (2)
69
handlersCollection.AddHandler<
Button
, ButtonHandler>();
248
Button
.RemapForControls();
Internals\ProfilePage.cs (1)
117
var
buttonA = new Button() { Text = "0s", HeightRequest = 62 };
Platform\Standard\Extensions\ButtonExtensions.cs (2)
4
using static Microsoft.Maui.Controls.
Button
;
10
public static void UpdateContentLayout(this object platformButton,
Button
button)
PlatformConfiguration\AndroidSpecific\Button.cs (7)
4
using FormsElement = Maui.Controls.
Button
;
26
public static bool UseDefaultPadding(this IPlatformElementConfiguration<Android,
FormsElement
> config)
32
public static IPlatformElementConfiguration<Android,
FormsElement
> SetUseDefaultPadding(this IPlatformElementConfiguration<Android,
FormsElement
> config, bool value)
56
public static bool UseDefaultShadow(this IPlatformElementConfiguration<Android,
FormsElement
> config)
62
public static IPlatformElementConfiguration<Android,
FormsElement
> SetUseDefaultShadow(this IPlatformElementConfiguration<Android,
FormsElement
> config, bool value)
Properties\AssemblyInfo.cs (2)
89
[assembly: StyleProperty("border-radius", typeof(
Button
), nameof(
Button
.CornerRadiusProperty))]
View\View.cs (1)
174
/// For example, adding a <see cref="TapGestureRecognizer"/> to a <see cref="
Button
"/> may lead to unexpected results.
Microsoft.Maui.Controls.Compatibility (22)
iOS\Renderers\BorderElementManager.cs (3)
32
if (e.PropertyName ==
Button
.BorderWidthProperty.PropertyName || e.PropertyName ==
Button
.CornerRadiusProperty.PropertyName || e.PropertyName ==
Button
.BorderColorProperty.PropertyName)
iOS\Renderers\ButtonLayoutManager.cs (14)
22
Button
_element;
150
void OnElementChanged(object sender, ElementChangedEventArgs<
Button
> e)
158
if (e.NewElement is
Button
button)
172
if (e.PropertyName ==
Button
.PaddingProperty.PropertyName)
174
else if (e.PropertyName ==
Button
.ImageSourceProperty.PropertyName)
176
else if (e.PropertyName ==
Button
.TextProperty.PropertyName ||
177
e.PropertyName ==
Button
.TextTransformProperty.PropertyName ||
178
e.PropertyName ==
Button
.CharacterSpacingProperty.PropertyName)
180
else if (e.PropertyName ==
Button
.ContentLayoutProperty.PropertyName)
182
else if (e.PropertyName ==
Button
.BorderWidthProperty.PropertyName && _borderAdjustsPadding)
184
else if (e.PropertyName ==
Button
.LineBreakModeProperty.PropertyName)
385
if (layout.Position ==
Button
.ButtonContentLayout.ImagePosition.Left)
393
else if (layout.Position ==
Button
.ButtonContentLayout.ImagePosition.Right)
420
if (layout.Position ==
Button
.ButtonContentLayout.ImagePosition.Bottom)
iOS\Renderers\ButtonRenderer.cs (3)
14
public class ButtonRenderer : ViewRenderer<
Button
, UIButton>, IImageVisualElementRenderer, IButtonLayoutRenderer
98
protected override void OnElementChanged(ElementChangedEventArgs<
Button
> e)
138
if (e.PropertyName ==
Button
.TextColorProperty.PropertyName)
iOS\Renderers\IButtonLayoutRenderer.cs (2)
11
Button
Element { get; }
14
event EventHandler<ElementChangedEventArgs<
Button
>> ElementChanged;