-
Notifications
You must be signed in to change notification settings - Fork 39
FreakyChip
Gulam Ali H edited this page Dec 30, 2023
·
3 revisions
FreakyChip
is a ContentView
representing a customizable chip control with optional text, icons, and selection state.
- Type:
FontAttributes
- Description: Gets or sets the font attributes for the text displayed in the chip.
- Type:
bool
- Description: Gets or sets whether automatic font scaling is enabled for the text in the chip. The default value is
true
.
- Type:
string
- Description: Gets or sets the font family for the text in the chip.
- Type:
double
- Description: Gets or sets the font size for the text in the chip.
- Type:
TextDecorations
- Description: Gets or sets the text decorations for the text in the chip.
- Type:
string
- Description: Gets or sets the text content of the chip.
- Type:
TextTransform
- Description: Gets or sets the text transformation for the text in the chip.
- Type:
TextType
- Description: Gets or sets the text type for the chip.
- Type:
TextAlignment
- Description: Gets or sets the vertical text alignment within the chip. The default value is
TextAlignment.Center
.
- Type:
TextAlignment
- Description: Gets or sets the horizontal text alignment within the chip. The default value is
TextAlignment.Center
.
- Type:
ICommand
- Description: Gets or sets the command to be executed when the
IsSelected
property changes.
- Type:
bool
- Description: Gets or sets the selection state of the chip.
- Type:
CornerRadius
- Description: Gets or sets the corner radius for the chip.
- Type:
Color
- Description: Gets or sets the background color of the chip when it is selected. The default value is
Colors.LightGray
.
- Type:
Color
- Description: Gets or sets the background color of the chip when it is not selected. The default value is
Colors.White
.
- Type:
Color
- Description: Gets or sets the text color of the chip when it is selected. The default value is
Colors.Black
.
- Type:
Color
- Description: Gets or sets the text color of the chip when it is not selected. The default value is
Colors.Black
.
- Type:
string
- Description: Gets or sets the name of the chip.
- Type:
double
- Description: Gets or sets the size request for the chip. Changing this property also updates the size of the chip's icons.
- Type:
Assembly
- Description: Gets or sets the assembly containing SVG resources for the chip's icons.
- Type:
string
- Description: Gets or sets the resource ID for the leading icon in the chip.
- Type:
string
- Description: Gets or sets the Base64-encoded string for the leading icon in the chip.
- Type:
string
- Description: Gets or sets the resource ID for the trailing icon in the chip.
- Type:
string
- Description: Gets or sets the Base64-encoded string for the trailing icon in the chip.
- Type:
Color
- Description: Gets or sets the color of the chip's icons. The default value is
Colors.Transparent
.
- Type:
Color
- Description: Gets or sets the color used for chip animation effects. The default value is
ControlConstants.DefaultControlRipple
.
- Type:
Thickness
- Description: Gets or sets the padding for the chip. The default value is a
Thickness
of10
on all sides.
- Type:
Brush
- Description: Gets or sets the brush used for drawing the stroke of the chip.
- Type:
double
- Description: Gets or sets the thickness of the stroke for the chip.
- Type:
EventHandler<CheckedChangedEventArgs>
- Description: Raised when the
IsSelected
property changes.
- Description: Initializes a new instance of the
FreakyChip
class.
- Parameters:
-
bindable
:BindableObject
-
oldValue
:object
-
newValue
:object
-
- Description: Handles the change in the
IsSelected
property, updating visual states, and executing associated commands.
- Description: Overrides the base class method to change the visual state of the chip based on the selected state.
- The
FreakyChip
class provides a flexible and customizable chip control with support for text, icons, and selection state. - Icons can be provided either as SVG resources in a specified assembly or as Base64-encoded strings.