TabPageItem.HeaderIcon Property
Gets an icon displayed in the item header.
Namespace: DevExpress.XamarinForms.Navigation
Assembly: DevExpress.XamarinForms.Navigation.dll
NuGet Package: DevExpress.XamarinForms.Navigation
Declaration
public ImageSource HeaderIcon { get; }
Property Value
Type | Description |
---|---|
ImageSource | The item header icon’s source. |
Remarks
In the item’s header, the TabPage displays the icon and text assigned to the Icon and Title properties of the item’s Content page.
The tab item’s HeaderIconColor and SelectedHeaderIconColor properties allow you to specify colors used to paint the header icon depending on whether the item is selected or not.
Example
The following code configures a TabPage‘s item according to Material Design guidelines.
<dxn:TabPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:TabPageExample"
xmlns:dxn="http://schemas.devexpress.com/xamarin/2014/forms/navigation"
x:Class="TabPageExample.MainPage">
<dxn:TabPageItem HeaderFontSize="14"
HeaderFontAttributes="Bold"
HeaderTextColor="#99191919"
HeaderIconColor="#99191919"
HeaderIconPosition="Top"
HeaderIconSpacing="4"
HeaderWidth="*"
HeaderMinWidth="90"
HeaderMaxWidth="360"
HeaderPadding="16,0,16,0"
HeaderVisibleElements="TextAndIcon"
SelectedHeaderTextColor="#1e88e5"
SelectedHeaderIconColor="#1e88e5"
SelectedHeaderBackgroundColor="Transparent">
<dxn:TabPageItem.Content>
<ContentPage Title="MAIL" Icon="ic_mail.png">
<Label Text="Mail List Here"
HorizontalOptions="Center"
VerticalOptions="CenterAndExpand"/>
</ContentPage>
</dxn:TabPageItem.Content>
</dxn:TabPageItem>
</dxn:TabPage>
The markup above uses the following properties of the TabPageItem object:
Property | Description |
---|---|
Gets or sets the size of the font for the item header’s text. | |
Gets or sets a value that indicates whether the font for the item header’s text is bold, italic, or neither. | |
Gets or sets the color the tab item uses in the default state to paint its header text. | |
Gets or sets the color the tab item uses in the default state to paint its header icon. | |
Gets or sets the position of the icon relative to the text in the item header. | |
Gets or sets spacing between the icon and the text in the item header. | |
Gets or sets the item header width when TabView.HeaderPanelPosition is set to Top or Bottom. | |
Gets or sets the minimum width of the item header when TabView.HeaderPanelPosition is set to Top or Bottom. | |
Gets or sets the maximum width of the item header when TabView.HeaderPanelPosition is set to Top or Bottom. | |
Gets or sets the inner padding of the item header. | |
Gets or sets a value that specifies elements the item header shows. | |
Gets or sets the color the tab item uses in the selected state to paint its header text. | |
Gets or sets the color the tab item uses in the selected state to paint its header icon. | |
Gets or sets the background color of the tab item header in the selected state. | |
Gets or sets a page that the TabPage displays in the content area when the item is selected. |
Note
TabPage contains the majority of the visual settings that TabPageItem provides. TabPage’s properties simultaneously configures the appearance of all tab items the page contains.