Clickable toolbar in Xamarin - xamarin

I am newest in Xamarin and have question for developers with more experiences.
I want to hide custom picker when user clicks anywhere any view in app. This working with view where is custom picker opened, but when I click on toolbar he remains opened. This problem is existing only on iOS, Android work as expected.
Could i make whole toolbar to be clickable and how?
Thanks in advance

In the Picker Toolbar you can set UIBarButtonItem to add Done button. Then you can add a Click Event for the Done button and write following code in it.
YourPicker.RemoveFromSuperview();
YourPickerView.RemoveFromSuperview();
textField.ResignFirstResponder();

Related

How to connect a button and collectionview in tvos application?

I am trying to connect a Button and Collectionview in my tvos application (Xamarin - Visual Studio Mac). I need to show the collectionview when tap the button.
I am following this blog for the implementation of collectionview in my project. The 6th step on this blog tells how to connect the Button and collectionview , Control-drag from the Button to the Collection View Controller and select Push from the popup:
Screenshot
I tried a lot by dragging the Button to Collectionview, but there is no popup and they are not getting connected. I am a beginner on tv os application development. So anybody please explain this mechanism? If provide a gif file, it will be easy. :)
Focus on the button and click the Control on the keyboard at same time .
Move the mouse from the button to the CollectionViewControl .
Now the popup will display.

How do I add code behind a button in a Detail view Controller of a the Storyboard in a Visual Studio Xamarin.IOS project?

I want a button to update a text field in my app, which runs on an iPad.
I created a Xamarin.IOS master details project, and added a button and textfield.
But can't find out to add the code behind that executes when button clicked.
In Visual Basic, I could just double-click the button and the event handling function (code behind) pops up. Can't figure out how to do this in XAMARIN.
After you add a button or a textfield to the storyboard, you can select the button in the storyboard and then you can give it a name in the properties(right corner of visual studio), you can see the screenshot here:
Then, you can access the button or textField in code behind and add click event for them.
You can read the document for more information :how-the-ios-designer-works and storyboards

Xamarin Forms: Single button that opens a dropdown menu

Hi does anybody knows if I can make a button in Xamarin Forms that opens a small dropdown menu? I did this in android studio but I can't find a way how this could work in Xamarin.
It should look like this:
And like this if the button is clicked:
And the Button should not be in the navigation bar because this page don't have one.
So if anybody could help me I would be very grateful and sorry for my bad english.
The closest API in Xamarin that does that is to display a pop-up using DisplayActionSheet, but the dropdown menu will be at the bottom of the screen. Or you can use a Picker (link to documentation).
If you want to implement something that look exactly like the image in your post, you can create a StackLayout that contains a few buttons, and show it when the drop down menu button is clicked.
i think that you can do it not directly but if we let some things be together we can achieve it, you have to add toolbar item for the button and for the menu list it's a popup page that has transparent background and list menu on the top right !

Xamarin.Forms how to change the navigation back button to an image?

I am building an app in Visual studio with crossed platform in Xamarin.Forms.
I have been trying to change the back arrow button in the navigation UI to an image in stead of the arrow, but I haven't found any good examples.
Is there anyone here who can help me?
Back arrow button in navigation bar is default feature. I think it can't be changed. If you want to change it then you should use a custom navigation bar.

Xamarin pop up with default close button in Xamarin form pcl

Can anyone suggest a best method to show pop up with close button by default in Xamarin forms with animations. To be more specific, if we are clicking on a card, it should come from the location of tap or click.
I have used xlabs for the same. Is there any other packages that I can use?
Could you share a sample code if possible?

Resources