Press ESC to close

Xamarin Tool Bar Item

You may want to create items on some of your pages. You can add it to the settings item, the search bar, or whatever you need. These items that work very useful on your page can take advantage of removing the buttons that take up space. For example, we can save pages by putting them at the top of the page instead of putting a settings button, edit button, insertion button or a toolbar.

Using Xamarin’s tool bar item is very simple. First, you open the xaml section of your page. My page creation Content Page can be your master detail page or tabbed page. You can use the page structure without notice. We say that we will assign an item to this content page because it is a content page.

First we create a toolbar item. We can name this tool bar itema. After giving the name, I want to give a picture. That’s why I wrote it on the iconic picture. If you do not want to give a picture, you can leave the icon blank. It only appears as text. The Order option is a feature that you can decide whether your item will appear in options within 3 points or directly in the bar. If we do the primary, we will go directly to the bar and if we make secondary we will be placed under 3 points item. The primary feature is the priority feature. If you want to add another tool bar item, you decide with which order it will stop with the primary feature. The clicked feature is the part we will perform when the tool bar item is clicked.

<ContentPage.ToolbarItems>
        <ToolbarItem Name="Profili Düzenle"
                     Icon="edit.png" 
                     Priority="0" 
                     Order="Primary"
                     Text="Profili Düzenle"
                     Clicked="buttonTakimDuzenle_Clicked"/>
    </ContentPage.ToolbarItems>

In this way you may have used a tool bar item. You can ask your questions by email or comment.

Comments (4)

Leave a Reply

Your email address will not be published. Required fields are marked *