Questions tagged [toolbaritems]

50 questions
20
votes
3 answers

Add spacing between UIToolbar

I have a toolbar that looks like the following: The issue is that it is kind of cluttered and therefore I would like to add some spacing to it. I tried doing: UIBarButtonItem *spacer = [[UIBarButtonItem alloc]…
adit
  • 32,574
  • 72
  • 229
  • 373
18
votes
3 answers

How to remove or hide Toolbar item in specific page error: System.IndexOutOfRangeException: Index was outside the bounds of the array

I am trying to Remove() or Clear() ToolbarItems. Here is my code where I am creating ToolbarItem in MainPage.cs public partial class MainPage : MasterDetailPage { public ToolbarItem cCounter = new ToolbarItem() { Icon = "picture.png" }; …
BinaryTie
  • 281
  • 1
  • 21
  • 49
10
votes
1 answer

How to add a line separator between Page.Toolbaritems in Xamarin Forms

I'm adding toolbar item to the Page.ToolbarItems list, but I would like to add a line separator between certain toolbar item. I could add a new toolbar item with an image of a line, but I would need to prevent any Action when the line is pressed and…
J. Ha
  • 121
  • 10
9
votes
2 answers

Xamarin Forms ToolbarItem doesn't change IsEnabled from XAML

I'm facing a problem with ToolbarItem and IsEnabled property when trying to turn it on/off from XAML using triggers. ToolbarItem doesn't support triggers, so what I do is to create a Button (a hidden one) which supports triggers and then bind…
Saimel Saez
  • 319
  • 4
  • 8
5
votes
3 answers

Problem adding an image to the toolbar using UIBarButtonItem, displaying blank white box instead of image

Im not sure what im doing wrong. The file name is correct, the style is set to plain. But Im getting a bank white box the size of my image. Im using UINavigationController. Please assist and thank you thank you in advance. **FYI I am sorta new to…
4
votes
1 answer

SwiftUI: How to show some toolbar buttons only for iPhone

I have a set of toolbar buttons that should be presented only if the device is iPhone (not iPad). The following code fails with this error: Closure containing control flow statement cannot be used with result builder 'ToolbarContentBuilder' I do…
Satoshi Nakajima
  • 1,863
  • 18
  • 29
3
votes
2 answers

How can I push a view from a ToolbarItem?

ToolbarItem(placement: .bottomBar) { NavigationLink( destination: NoteView(note: Note()) ) { Image(systemName: "square.and.pencil") } } This code is not working as expected: no action is being performed when I tap on the…
Tulleb
  • 8,919
  • 8
  • 27
  • 55
3
votes
1 answer

Replicating the drop-down ToolbarItem "More" in Xamarin.Forms

I am struggling how I could replicate the drop-down ToolbarItem from Xamarin.Forms when a ToolbarItem's order is set to Secondary for IOS, in order for it to look like it does for Android. Here are some images to better explain what I am looking…
Daniel
  • 447
  • 5
  • 22
3
votes
0 answers

Xamarin ToolbarItem Icon color on Android

I have a TabbedPage with a ToolbarItems with Item that have an Icon. On iOS the icon's color is like a text (defined by iOS theme), but in Android the color of the icon is the color that tha physically image have. iOS: Android: How can I set the…
Hikari
  • 589
  • 7
  • 29
3
votes
2 answers

Toolbar icon in iOS app is having a tint for xamarin forms

I have a xamarin forms app where i need to add a toolbar item in the navigation bar. I have a multicolored image as the tool bar icon. When i run in android devices the exact image is being shown as the toolbar icon. However in iOS it is showing as…
hashimks
  • 1,205
  • 2
  • 11
  • 29
3
votes
1 answer

Xamarin Forms: ToolBarItem on left for both iOS and Android

I'm trying to find a way to put a close ToolBarItem on the left of my ToolBar. To be more explicit, here are some screenshots: For Android: For iOS: The problem is not about to display icon istead of text, I'm using Iconize for that. The problem…
Ben
  • 3,972
  • 8
  • 43
  • 82
3
votes
1 answer

Setting background color of xamarin toolbaritems

I'm using Xamarin's ToolbarItems class with XAML: Is there a way to change the…
paulina
  • 199
  • 3
  • 14
2
votes
1 answer

SwiftUI 2.0 ToolbarItem Labels showing sideways

Trying to figure out how to put the icons of the new SwiftUI toolbar on top of the text, like they are supposed to be on the bottom toolbar. Currently, they show up sideways, which is weird. This is my piece of code that shows them content.toolbar…
Michel Donais
  • 474
  • 4
  • 13
2
votes
1 answer

ToolbarItems do not look right in iOS

I have a Xamarin.Forms app with FreshMvvm, and am trying to use secondary ToolbarItems. Here is a part of my PageModel code: public override void Init(object initData) { CurrentPage.ToolbarItems.Add(new ToolbarItem() { Text = "About…
David Shochet
  • 5,035
  • 11
  • 57
  • 105
2
votes
1 answer

Xamarin.Forms: Extend CommonToolbarPage class with all pages

I am developing ToolbarItem in xamarin forms app. I need to have ToolbarItem throughout the app. For doing so I have created CommonToolbarPage class and extending with ContentPage to use in all pages. But Main.xaml.cs page is inherites with…
R15
  • 13,982
  • 14
  • 97
  • 173
1
2 3 4