зеркало из https://github.com/DeGsoft/maui-linux.git
[Controls] Add more info to reproduction of 39359
This commit is contained in:
Родитель
e359268755
Коммит
9aa0e92435
|
@ -40,22 +40,31 @@ namespace Xamarin.Forms.Controls
|
|||
var idLabel = new Label() { StyleId = "id", TextColor = Color.White };
|
||||
idLabel.SetBinding(Label.TextProperty, nameof(Item.Id));
|
||||
|
||||
var stackLayout = new StackLayout {
|
||||
var stackLayout = new StackLayout
|
||||
{
|
||||
Children = {
|
||||
new Label { Text = "Target" },
|
||||
new Label { Text = "Stack" }
|
||||
//new Label { Text = "Target" },
|
||||
//new Label { Text = "Stack" }
|
||||
},
|
||||
BackgroundColor = Color.Red
|
||||
};
|
||||
|
||||
var button = CreateButton ("Hide Target Stack", () => {
|
||||
var button = CreateButton("Hide Target Stack", () =>
|
||||
{
|
||||
stackLayout.IsVisible = false;
|
||||
});
|
||||
|
||||
Content = new StackLayout {
|
||||
var buttonImage = CreateButton("AddImage", () =>
|
||||
{
|
||||
stackLayout.IsVisible = true;
|
||||
stackLayout.Children.Add(new Image { Source = "menuIcon.png" });
|
||||
});
|
||||
Content = new StackLayout
|
||||
{
|
||||
Children = {
|
||||
idLabel,
|
||||
button,
|
||||
buttonImage,
|
||||
stackLayout,
|
||||
}
|
||||
};
|
||||
|
@ -65,7 +74,8 @@ namespace Xamarin.Forms.Controls
|
|||
{
|
||||
var button = new Button();
|
||||
button.Text = text;
|
||||
button.Clicked += (s, e) => {
|
||||
button.Clicked += (s, e) =>
|
||||
{
|
||||
clicked();
|
||||
};
|
||||
return button;
|
||||
|
@ -79,7 +89,8 @@ namespace Xamarin.Forms.Controls
|
|||
|
||||
Button CreateButton(string text, Action onClicked = null)
|
||||
{
|
||||
var button = new Button {
|
||||
var button = new Button
|
||||
{
|
||||
Text = text
|
||||
};
|
||||
|
||||
|
@ -93,14 +104,16 @@ namespace Xamarin.Forms.Controls
|
|||
{
|
||||
BackgroundColor = Color.Blue;
|
||||
|
||||
var carouselView = new CarouselView {
|
||||
var carouselView = new CarouselView
|
||||
{
|
||||
BackgroundColor = Color.Purple,
|
||||
ItemsSource = Items,
|
||||
ItemTemplate = new DataTemplate(typeof(ItemView)),
|
||||
Position = 0
|
||||
};
|
||||
|
||||
var moveBar = new StackLayout {
|
||||
var moveBar = new StackLayout
|
||||
{
|
||||
Orientation = StackOrientation.Horizontal,
|
||||
HorizontalOptions = LayoutOptions.FillAndExpand,
|
||||
Children = {
|
||||
|
@ -111,12 +124,13 @@ namespace Xamarin.Forms.Controls
|
|||
}
|
||||
};
|
||||
|
||||
Content = new StackLayout {
|
||||
Content = new StackLayout
|
||||
{
|
||||
Children = {
|
||||
carouselView,
|
||||
moveBar,
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#if UITEST
|
||||
|
|
Загрузка…
Ссылка в новой задаче