StatefulContentView
StatefulContentView is a typical ContentView that has Normal
, Pressed
, PointerOver
states. It is used to display a button, a checkbox, a radio button, etc. It's a useful when you want to create a custom button or a clickable area.
Usage
StatefulContentView is defined in UraniumUI.Views
namespace. You can use it in XAML like this:
Then you can use it with uranium:StatefulContentView
tag.
Windows (Dark) | MAC Catalyst (Light) |
---|---|
![]() |
![]() |
Hover over the view to see the
PointerOver
state. A mouse should be connected to see this state on mobile platforms.
Commands
PressedCommand
: A command that is executed when the view is pressed.HoverCommand
: A command that is executed when the view is hovered.HoverExitCommand
: A command that is executed when the view is hovered out.LongPressCommand
: A command that is executed when the view is long pressed.TappedCommand
: A command that is executed when the view is tapped.CommandParameter
: A parameter that is passed to the command.
Customizations
You can customize the StatefulContentView
by using the style properties. You can use the following template to create your own style:
Note: Make sure
xmlns:uranium="http://schemas.enisn-projects.io/dotnet/maui/uraniumui"
namespace exists in your XAML file.