Skip to content

Commit 7b3c0d6

Browse files
author
SivakumarVairamuthu
committed
Added the image for centerButton.
1 parent bdfbc44 commit 7b3c0d6

File tree

2 files changed

+24
-23
lines changed

2 files changed

+24
-23
lines changed

maui-toolkit/TabView/CenterButton-Customization.md

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -46,20 +46,17 @@ You can customize the center button using the properties of `CenterButtonSetting
4646
{% highlight xaml %}
4747

4848
<tabView:SfTabView.CenterButtonSettings>
49-
<tabView:CenterButtonSettings Title="Home"
50-
Height="70"
51-
Width="80"
52-
Background="White"
53-
Stroke="HotPink"
54-
StrokeThickness="3"
55-
CornerRadius="10"
56-
TextColor="Green"
57-
ImageSource="image.png"
58-
ImageSize="24"
59-
DisplayMode="ImageWithText"
60-
FontFamily="SevillanaRegular"
61-
FontAttributes="Bold"
62-
FontSize="16" />
49+
<tabView:CenterButtonSettings Height="45"
50+
Width="45"
51+
CornerRadius="50"
52+
Background="#6750A4"
53+
ImageSize="25"
54+
DisplayMode="Image">
55+
<tabView:CenterButtonSettings.ImageSource>
56+
<FontImageSource Glyph="&#xe73d;"
57+
Color="#FFFBFE" FontFamily="MauiSampleFontIcon"/>
58+
</tabView:CenterButtonSettings.ImageSource>
59+
</tabView:CenterButtonSettings>
6360
</tabView:SfTabView.CenterButtonSettings>
6461

6562
{% endhighlight %}
@@ -72,16 +69,18 @@ public MainPage()
7269
SfTabView tabView = new SfTabView();
7370
CenterButtonSettings centerButtonSettings = new CenterButtonSettings()
7471
{
75-
Height = 80,
76-
Width = 100,
77-
Title = "Center Button",
78-
FontAttributes = FontAttributes.Bold,
79-
TextColor = Colors.Green,
80-
DisplayMode = CenterButtonDisplayMode.ImageWithText,
81-
ImageSource = "Home.png",
82-
ImageSize = 24,
83-
FontFamily = "SevillanaRegular",
72+
Height = 45,
73+
Width = 45,
74+
DisplayMode = CenterButtonDisplayMode.Image,
75+
ImageSize = 25,
76+
Background = Color.FromArgb("#6750A4");
8477
CornerRadius = new CornerRadius(10),
78+
ImageSource = new FontImageSource
79+
{
80+
Glyph = "\uE73D",
81+
Color = Color.FromArgb("#FFFBFE"),
82+
FontFamily = "MauiSampleFontIcon"
83+
}
8584
};
8685

8786
tabView.CenterButtonSettings = centerButtonSettings;
@@ -90,6 +89,8 @@ public MainPage()
9089

9190
{% endtabs %}
9291

92+
![.NET MAUI Customize the center button](/TabView/images/CenterButton-Customizaton.jpg)
93+
9394
## Center button tapped event
9495

9596
When the center button is tapped, the `CenterButtonTapped` event occurs. Using this event we can set alert messages.
28.9 KB
Loading

0 commit comments

Comments
 (0)