### Basic SimpleButton Usage Example Source: https://github.com/radekvym/simpletoolkit/blob/main/docs/SimpleToolkit.SimpleButton/README.md Define a SimpleButton with an Image and Label. This example shows how to set background, shape, and content for the button. ```xml ``` -------------------------------- ### SimpleButton with Visual States Source: https://github.com/radekvym/simpletoolkit/blob/main/docs/SimpleToolkit.SimpleButton/README.md Configure visual states (Normal, Pressed, PointerOver) for SimpleButton to provide touch feedback. This example changes the background color for each state. ```xml ``` -------------------------------- ### Setting Default Application Transitions Source: https://github.com/radekvym/simpletoolkit/blob/main/docs/SimpleToolkit.SimpleShell/Transitions.md Configure the default transition behavior for all pages within the application by calling SetTransition in the AppShell constructor. This example demonstrates custom logic for switching, pushing, and popping transitions, including opacity and translation animations. ```csharp public AppShell() { InitializeComponent(); Routing.RegisterRoute(nameof(YellowDetailPage), typeof(YellowDetailPage)); this.SetTransition( callback: static args => { switch (args.TransitionType) { case SimpleShellTransitionType.Switching: if (args.OriginShellSectionContainer == args.DestinationShellSectionContainer) { // Navigatating within the same ShellSection args.OriginPage.Opacity = 1 - args.Progress; args.DestinationPage.Opacity = args.Progress; } else { // Navigatating between different ShellSections (args.OriginShellSectionContainer ?? args.OriginPage).Opacity = 1 - args.Progress; (args.DestinationShellSectionContainer ?? args.DestinationPage).Opacity = args.Progress; } break; case SimpleShellTransitionType.Pushing: // Hide the page until it is fully measured args.DestinationPage.Opacity = args.DestinationPage.Width < 0 ? 0.01 : 1; // Slide the page in from right args.DestinationPage.TranslationX = (1 - args.Progress) * args.DestinationPage.Width; break; case SimpleShellTransitionType.Popping: // Slide the page out to right args.OriginPage.TranslationX = args.Progress * args.OriginPage.Width; break; } }, finished: static args => { args.OriginPage.Opacity = 1; args.OriginPage.TranslationX = 0; args.DestinationPage.Opacity = 1; args.DestinationPage.TranslationX = 0; if (args.OriginShellSectionContainer is not null) args.OriginShellSectionContainer.Opacity = 1; if (args.DestinationShellSectionContainer is not null) args.DestinationShellSectionContainer.Opacity = 1; }, destinationPageInFront: static args => args.TransitionType switch { SimpleShellTransitionType.Popping => false, _ => true }, duration: static args => args.TransitionType switch { SimpleShellTransitionType.Switching => 300u, _ => 200u }, easing: static args => args.TransitionType switch { SimpleShellTransitionType.Pushing => Easing.SinIn, SimpleShellTransitionType.Popping => Easing.SinOut, _ => Easing.Linear }); } ``` -------------------------------- ### Binding Custom Controls to SimpleShell Properties Source: https://context7.com/radekvym/simpletoolkit/llms.txt Examples of binding custom UI elements to SimpleShell's read-only bindable properties like CurrentShellContent and ShellContents. ```xml