Skip to content

Commit 0a1533d

Browse files
Merge pull request #257 from syncfusion-content/943738_UGUpdate
Add the image and update the code for the CenterButtonSettings.
2 parents c3e3b6a + 03c3342 commit 0a1533d

File tree

2 files changed

+17
-24
lines changed

2 files changed

+17
-24
lines changed

maui-toolkit/TabView/CenterButton-Customization.md

Lines changed: 17 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -46,20 +46,14 @@ 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+
ImageSource="image.png">
56+
</tabView:CenterButtonSettings>
6357
</tabView:SfTabView.CenterButtonSettings>
6458

6559
{% endhighlight %}
@@ -72,16 +66,13 @@ public MainPage()
7266
SfTabView tabView = new SfTabView();
7367
CenterButtonSettings centerButtonSettings = new CenterButtonSettings()
7468
{
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",
84-
CornerRadius = new CornerRadius(10),
69+
Height = 45,
70+
Width = 45,
71+
DisplayMode = CenterButtonDisplayMode.Image,
72+
ImageSize = 25,
73+
Background = Color.FromArgb("#6750A4");
74+
CornerRadius = new CornerRadius(50),
75+
ImageSource = "image.png"
8576
};
8677

8778
tabView.CenterButtonSettings = centerButtonSettings;
@@ -90,6 +81,8 @@ public MainPage()
9081

9182
{% endtabs %}
9283

84+
![.NET MAUI Customize the center button](images/CenterButton-Customizaton.jpg)
85+
9386
## Center button tapped event
9487

9588
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)