maui-linux/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issu.../Issue1026.cs

99 строки
2.8 KiB
C#
Исходник Обычный вид История

2016-03-22 23:02:25 +03:00
using Xamarin.Forms.CustomAttributes;
using Xamarin.Forms.Internals;
2016-03-22 23:02:25 +03:00
namespace Xamarin.Forms.Controls.Issues
2016-03-22 23:02:25 +03:00
{
[Preserve (AllMembers=true)]
[Issue (IssueTracker.Github, 1026, "Label cropping", PlatformAffected.iOS | PlatformAffected.WinPhone, NavigationBehavior.PushModalAsync)]
public class Issue1026 : ContentPage
{
public Issue1026 ()
{
var instructions = new Label { Text = "The label at the bottom of the form should read 'by subscribing," +
" you accept the general conditions.'; if the label is truncated, this test has failed." };
var scrollView =
2016-03-22 23:02:25 +03:00
new ScrollView {
BackgroundColor = Color.FromHex("#dae1eb"),
Content =
2016-03-22 23:02:25 +03:00
new StackLayout {
Padding = new Thickness (0, 18),
Spacing = 10,
Orientation = StackOrientation.Vertical,
Children = {
new Button {
BackgroundColor = Color.FromHex ("#006599"),
TextColor = Color.White,
Text = "Subscribe with LinkedIn",
WidthRequest = 262,
HorizontalOptions = LayoutOptions.Center,
[Android] Button Border can be set independent of other properties and will not change the size of the Button. fixes #1436 **behavior change** (#1570) * Revert "Revert "Fix border on android buttons (#941)"" This reverts commit a4c7f31d1215174aa86d7647bcbce0dd5e719a9a. * Add repro for 1436 Fix typo * [Core] Use 2dp for Android default Button BorderRadius * [Android] Add shadow & padding to ButtonDrawable * [Android] Set BackgroundDrawable on Button when BorderWidth, BorderRadius, and BorderColor are changed Also add RippleDrawable when supported for the nice ripple effect on press, and set the PaddingTop for the ButtonDrawable. fixes #1436 * [Android] Default Color for Button is specified for AppCompat and AppAct * [Android] Check BorderRadius value against proper default * Fix test case number * grumble grumble this branch is still vs2015 grumble * [Android] Get button color from resources * [Core] Obsolete Button.BorderRadius in favor of CornerRadius * [Core] Added VisualElement.DefaultBackgroundColor * Update tests to ignore obsolete prop warning * [Android] Use Button.CornerRadius instead of BorderRadius * [iOS] Use Button.CornerRadius instead of BorderRadius * [macOS] Use Button.CornerRadius instead of BorderRadius * [UWP] Use Button.CornerRadius instead of BorderRadius * Update docs * Fix more cases of BorderRadius obsolete warnings * [UWP] Use BP.DefaultValue instead of abstracted const * [Android] Use BP.DefaultValue instead of abstracted const * [Core] Remove unnecessary abstracted consts from Button * [Android] Fix default corner radius on ButtonDrawable * Unit tests for Button.CornerRadius/BorderRadius * [iOS] Restore default Button.CornerRadius * [UWP] Add todo
2018-02-08 20:55:08 +03:00
#pragma warning disable 0618
2016-03-22 23:02:25 +03:00
BorderRadius = 0,
[Android] Button Border can be set independent of other properties and will not change the size of the Button. fixes #1436 **behavior change** (#1570) * Revert "Revert "Fix border on android buttons (#941)"" This reverts commit a4c7f31d1215174aa86d7647bcbce0dd5e719a9a. * Add repro for 1436 Fix typo * [Core] Use 2dp for Android default Button BorderRadius * [Android] Add shadow & padding to ButtonDrawable * [Android] Set BackgroundDrawable on Button when BorderWidth, BorderRadius, and BorderColor are changed Also add RippleDrawable when supported for the nice ripple effect on press, and set the PaddingTop for the ButtonDrawable. fixes #1436 * [Android] Default Color for Button is specified for AppCompat and AppAct * [Android] Check BorderRadius value against proper default * Fix test case number * grumble grumble this branch is still vs2015 grumble * [Android] Get button color from resources * [Core] Obsolete Button.BorderRadius in favor of CornerRadius * [Core] Added VisualElement.DefaultBackgroundColor * Update tests to ignore obsolete prop warning * [Android] Use Button.CornerRadius instead of BorderRadius * [iOS] Use Button.CornerRadius instead of BorderRadius * [macOS] Use Button.CornerRadius instead of BorderRadius * [UWP] Use Button.CornerRadius instead of BorderRadius * Update docs * Fix more cases of BorderRadius obsolete warnings * [UWP] Use BP.DefaultValue instead of abstracted const * [Android] Use BP.DefaultValue instead of abstracted const * [Core] Remove unnecessary abstracted consts from Button * [Android] Fix default corner radius on ButtonDrawable * Unit tests for Button.CornerRadius/BorderRadius * [iOS] Restore default Button.CornerRadius * [UWP] Add todo
2018-02-08 20:55:08 +03:00
#pragma warning restore
2016-03-22 23:02:25 +03:00
},
new Entry {
Placeholder = "Professional email",
WidthRequest = 262,
HorizontalOptions = LayoutOptions.Center,
Keyboard = Keyboard.Email,
},
new Entry {
Placeholder = "Firstname",
WidthRequest = 262,
HorizontalOptions = LayoutOptions.Center,
},
new Entry {
Placeholder = "Lastname",
WidthRequest = 262,
HorizontalOptions = LayoutOptions.Center,
},
new Entry {
Placeholder = "Company",
WidthRequest = 262,
HorizontalOptions = LayoutOptions.Center,
},
new Entry {
Placeholder = "Password",
WidthRequest = 262,
IsPassword = true,
HorizontalOptions = LayoutOptions.Center,
},
new Entry {
Placeholder = "Confirm password",
WidthRequest = 262,
IsPassword = true,
HorizontalOptions = LayoutOptions.Center,
},
new Button {
BackgroundColor = Color.FromHex ("#05addc"),
TextColor = Color.White,
Text = "Create an account",
WidthRequest = 262,
HorizontalOptions = LayoutOptions.Center,
[Android] Button Border can be set independent of other properties and will not change the size of the Button. fixes #1436 **behavior change** (#1570) * Revert "Revert "Fix border on android buttons (#941)"" This reverts commit a4c7f31d1215174aa86d7647bcbce0dd5e719a9a. * Add repro for 1436 Fix typo * [Core] Use 2dp for Android default Button BorderRadius * [Android] Add shadow & padding to ButtonDrawable * [Android] Set BackgroundDrawable on Button when BorderWidth, BorderRadius, and BorderColor are changed Also add RippleDrawable when supported for the nice ripple effect on press, and set the PaddingTop for the ButtonDrawable. fixes #1436 * [Android] Default Color for Button is specified for AppCompat and AppAct * [Android] Check BorderRadius value against proper default * Fix test case number * grumble grumble this branch is still vs2015 grumble * [Android] Get button color from resources * [Core] Obsolete Button.BorderRadius in favor of CornerRadius * [Core] Added VisualElement.DefaultBackgroundColor * Update tests to ignore obsolete prop warning * [Android] Use Button.CornerRadius instead of BorderRadius * [iOS] Use Button.CornerRadius instead of BorderRadius * [macOS] Use Button.CornerRadius instead of BorderRadius * [UWP] Use Button.CornerRadius instead of BorderRadius * Update docs * Fix more cases of BorderRadius obsolete warnings * [UWP] Use BP.DefaultValue instead of abstracted const * [Android] Use BP.DefaultValue instead of abstracted const * [Core] Remove unnecessary abstracted consts from Button * [Android] Fix default corner radius on ButtonDrawable * Unit tests for Button.CornerRadius/BorderRadius * [iOS] Restore default Button.CornerRadius * [UWP] Add todo
2018-02-08 20:55:08 +03:00
#pragma warning disable 0618
2016-03-22 23:02:25 +03:00
BorderRadius = 0,
[Android] Button Border can be set independent of other properties and will not change the size of the Button. fixes #1436 **behavior change** (#1570) * Revert "Revert "Fix border on android buttons (#941)"" This reverts commit a4c7f31d1215174aa86d7647bcbce0dd5e719a9a. * Add repro for 1436 Fix typo * [Core] Use 2dp for Android default Button BorderRadius * [Android] Add shadow & padding to ButtonDrawable * [Android] Set BackgroundDrawable on Button when BorderWidth, BorderRadius, and BorderColor are changed Also add RippleDrawable when supported for the nice ripple effect on press, and set the PaddingTop for the ButtonDrawable. fixes #1436 * [Android] Default Color for Button is specified for AppCompat and AppAct * [Android] Check BorderRadius value against proper default * Fix test case number * grumble grumble this branch is still vs2015 grumble * [Android] Get button color from resources * [Core] Obsolete Button.BorderRadius in favor of CornerRadius * [Core] Added VisualElement.DefaultBackgroundColor * Update tests to ignore obsolete prop warning * [Android] Use Button.CornerRadius instead of BorderRadius * [iOS] Use Button.CornerRadius instead of BorderRadius * [macOS] Use Button.CornerRadius instead of BorderRadius * [UWP] Use Button.CornerRadius instead of BorderRadius * Update docs * Fix more cases of BorderRadius obsolete warnings * [UWP] Use BP.DefaultValue instead of abstracted const * [Android] Use BP.DefaultValue instead of abstracted const * [Core] Remove unnecessary abstracted consts from Button * [Android] Fix default corner radius on ButtonDrawable * Unit tests for Button.CornerRadius/BorderRadius * [iOS] Restore default Button.CornerRadius * [UWP] Add todo
2018-02-08 20:55:08 +03:00
#pragma warning restore
2016-03-22 23:02:25 +03:00
},
new Label {
Text = "by subscribing, you accept the general conditions.",
TextColor = Color.White,
#pragma warning disable 618
2016-03-22 23:02:25 +03:00
XAlign = TextAlignment.Center,
#pragma warning restore 618
#pragma warning disable 618
2016-03-22 23:02:25 +03:00
Font = Font.SystemFontOfSize (NamedSize.Micro),
#pragma warning restore 618
2016-03-22 23:02:25 +03:00
WidthRequest = 262,
HorizontalOptions = LayoutOptions.Center,
},
},
},
};
Content = new StackLayout { Children = { instructions, scrollView } };
2016-03-22 23:02:25 +03:00
}
}
}