Empty space occurs in secondary toolbar item MAUI

Gnana 5 Reputation points
2023-09-25T15:16:08.6066667+00:00

Here is my toolbar item

In secondary toolbar item, empty space occurs before first element.

 <Shell.ToolbarItems>
     <ToolbarItem IconImageSource="fontsize"  Order="Primary"/>
     <ToolbarItem IconImageSource="search" Order="Primary"/>

     <ToolbarItem x:Name="menulist" Order="Secondary"/>
     <ToolbarItem  Order="Secondary" Text="About" Priority="0"/>
     <ToolbarItem  Order="Secondary" Text="Settings" Priority="1"/>
     <ToolbarItem  Order="Secondary" Text="Logout" Priority="2"/>
 </Shell.ToolbarItems>

PFA Image for reference.

Could anyone help me find the cause .

Thanks, Gnana

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,369 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Gnana 5 Reputation points
    2023-09-26T13:08:08.1766667+00:00

    Thanks for addressing. One item without neither image not text caused this issue.

    Resolved now.

    1 person found this answer helpful.

  2. Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 30,416 Reputation points Microsoft Vendor
    2023-09-27T01:33:09.8433333+00:00

    Hello,

    There are two ToolbarItems whose order is Primary, you could try to check if the issue is related to this. As you Gnana said, one item without neither image not text caused this issue. Thanks for your sharing.

    Best Regards,

    Wenyan Zhang


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.