Created
October 29, 2024 22:36
-
-
Save jorgesanabria/3acf16dd61715f97a8a4bfbdc43f091f to your computer and use it in GitHub Desktop.
failed test of SwipeView
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using MauiReactor; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace MauiReactor1.Pages | |
{ | |
internal class MainPageState | |
{ | |
public int Counter { get; set; } | |
} | |
internal class MainPage : Component<MainPageState> | |
{ | |
public override VisualNode Render() | |
=> ContentPage( | |
ScrollView( | |
VStack( | |
Image("dotnet_bot.png") | |
.HeightRequest(200) | |
.HCenter() | |
.Set(MauiControls.SemanticProperties.DescriptionProperty, "Cute dot net bot waving hi to you!"), | |
Label("Hello, World!") | |
.FontSize(32) | |
.HCenter(), | |
SwipeView( | |
Label("Test swipe") | |
) | |
.LeftItems( | |
SwipeItems( | |
SwipeItem( | |
Label("test left item") | |
) | |
.BackgroundColor(Colors.Red) | |
) | |
) | |
, | |
Label("Welcome to MauiReactor: MAUI with superpowers!") | |
.FontSize(18) | |
.HCenter(), | |
Button(State.Counter == 0 ? "Click me" : $"Clicked {State.Counter} times!") | |
.OnClicked(() => SetState(s => s.Counter++)) | |
.HCenter() | |
) | |
.VCenter() | |
.Spacing(25) | |
.Padding(30, 0) | |
) | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment