Class PickerHeaderView
Represents a class which is used to customize all the properties of header view of the picker.
Inheritance
Namespace: Syncfusion.Maui.Toolkit.Picker
Assembly: Syncfusion.Maui.Toolkit.dll
Syntax
public class PickerHeaderView : Element
Constructors
PickerHeaderView()
Initializes a new instance of the PickerHeaderView class.
Declaration
public PickerHeaderView()
Fields
BackgroundProperty
Identifies the Background dependency property.
Declaration
public static readonly BindableProperty BackgroundProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for Background dependency property. |
DividerColorProperty
Identifies the DividerColor dependency property.
Declaration
public static readonly BindableProperty DividerColorProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for DividerColor dependency property. |
HeightProperty
Identifies the Height dependency property.
Declaration
public static readonly BindableProperty HeightProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for Height dependency property. |
TextProperty
Identifies the Text dependency property.
Declaration
public static readonly BindableProperty TextProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for Text dependency property. |
TextStyleProperty
Identifies the TextStyle dependency property.
Declaration
public static readonly BindableProperty TextStyleProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for TextStyle dependency property. |
Properties
Background
Gets or sets the background of the header view in picker.
Declaration
public Brush Background { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.Maui.Controls.Brush | The default value of Background is Brush.Transparent. |
Examples
The following example demonstrates how to set the background of the header view.
<picker:SfPicker>
<picker:SfPicker.HeaderView>
<picker:PickerHeaderView Background="Blue" />
</picker:SfPicker.HeaderView>
</picker:SfPicker>
DividerColor
Gets or sets the color of the header separator line in picker.
Declaration
public Color DividerColor { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.Maui.Graphics.Color | The default value of DividerColor is "#CAC4D0". |
Examples
The following example demonstrates how to set the divider color of the header view.
<picker:SfPicker>
<picker:SfPicker.HeaderView>
<picker:PickerHeaderView DividerColor="Gray" />
</picker:SfPicker.HeaderView>
</picker:SfPicker>
Height
Gets or sets the value to specify the height of header view on picker.
Declaration
public double Height { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The default value of Height is 0d. |
Examples
The following example demonstrates how to set the height of the header view.
<picker:SfPicker>
<picker:SfPicker.HeaderView>
<picker:PickerHeaderView Height="50" />
</picker:SfPicker.HeaderView>
</picker:SfPicker>
Text
Gets or sets the value to specify the text of header view on picker.
Declaration
public string Text { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value of Text is string.Empty. |
Examples
The following example demonstrates how to set the text of the header view.
<picker:SfPicker>
<picker:SfPicker.HeaderView>
<picker:PickerHeaderView Text="Select an item" />
</picker:SfPicker.HeaderView>
</picker:SfPicker>
TextStyle
Gets or sets the text style of the header text in picker.
Declaration
public PickerTextStyle TextStyle { get; set; }
Property Value
Type |
---|
PickerTextStyle |
Examples
The following example demonstrates how to set the text style of the header view.