-
Notifications
You must be signed in to change notification settings - Fork 76
FloatingButtonBuilder
appleneko2001 edited this page Dec 21, 2021
·
1 revision
This class used for create FloatingButton
instance with some setters.
public FloatingButtonBuilder SetSpacing(double spacing = 12.0)
// Set spacing between icon and text views.
// Examples:
// Create builder instance and set spacing to 8.
var builder = new FloatingButtonBuilder().SetSpacing(8);
public FloatingButtonBuilder SetIcon(Control view)
// Attach a view to builder and set it as icon for further use.
// Examples:
// Create builder instance and attach a "Add" icon with Material.Icon to it.
var builder = new FloatingButtonBuilder().SetIcon(new MaterialIcon
{
Kind = MaterialIconKind.Plus
});
public FloatingButtonBuilder SetText(string text)
// Create text view and attach it to floating action button later.
// This method have some overloads to allows you attach your own text control / styles or custom view. Please look below to know which overloads included:
public FloatingButtonBuilder SetText(TextBlock textBlock) // attach a textblock view with custom properties and styles.
public FloatingButtonBuilder SetText(Control view) // attach a custom view to floating button.
// Examples:
// Create builder instance, attach a "Add" icon and create a TextBlock "CREATE SOMETHING" to it.
var builder = new FloatingButtonBuilder().SetIcon(new MaterialIcon
{
Kind = MaterialIconKind.Plus
}).SetText("CREATE SOMETHING");
public FloatingButton Build()
// Build and return FloatingButton instance with current settings.
// This method should use after all setter methods to apply changes.
// Examples:
// Create FloatingButton instance with "Add" icon and text "CREATE SOMETHING"
var button = new FloatingButtonBuilder().SetIcon(new MaterialIcon
{
Kind = MaterialIconKind.Plus
}).SetText("CREATE SOMETHING").Build();
For more information about styling, please take look this entry
Material.Avalonia Wiki pages is still WIP (work in progress), Pages could not ready for show if they unclickable.
Main section
- Main page
- Getting started
- Screenshots of Demo
- FAQ (frequently asked questions)
- Breaking changes
- Nightly builds
Widgets / Controls
- Buttons
- Inputs
- TextBox
- Switchable
- CheckBox
- RadioButton
- ToggleButton
- ToggleSwitch
- Selectable
- ListBox
- ComboBox
- Pickers
- Feedbacks
- ProgressBar
- Snackbar
- Dialogs
- AlertDialog
- TextFieldDialog
- CustomDialog
- Containers / Layouts
- ColorZone
- Card
- Expander
- DataGrid
Theming
Builders
Assist for widgets
- ButtonAssist
- SelectionControlAssist
- ShadowAssist
- SliderAssist
- TextFieldAssist
- TransitionAssist