I am using picker in Xamarin Forms and I want seleted text of picker in a string variable. Like-
string name = picker.SeletedItem.Text;(in WPF)
How to access text of picker in Xamarin Forms?
Use :
picker.Items[picker.SelectedIndex];
Related
I am using xamarin forms for my project.
I am using Picker in forms. When the picker items has long text, then it will wrap like multilines.
But it shows like below image:
I am using Renderer Page in android and add the below code:
Control.SetSingleLine(false);
But it is not working. Can anyone please help to resolve this issue.
The UI object Xamarin.Forms.Label object supports the property FormattedText.
Unfortunately there is only a simple property Text on the UI object Xamarin.Forms.Buttons.
Is there a way to have a button appear with formatted text ?
Not without creating a custom renderer.
You can treat the string in the ViewModel and Bind to the Button Text Property;
I am creating an android app using xamarin forms. When I crate APK, its name looks like com.companyname.projectname.apk
I want to have it like XYZ.ABC.projectname.apk
How to do this ???
Please help. I am new to Xamarin.
1st method
right click on your android project (not pcl or .net)
select properties
go to android manifest
there is a text box for Application name
enter your app name
2nd method
Change label name of your main activity
3nd method
Remove the Label of the MainActivity and add the name in the Manifest.xml via Code
Read this for more
Xamarin.Forms change Android application name
I want to use a picker for selecting question from list of questions in picker item for mobile devices in Xamarin Forms. Some of these questions are long strings which does not fit in one line and so picker could not able to display complete question. Is there a way to handle this long string to adjust it into multi line based upon device width.
What about ListView + SearcBar (modal page)?
I want to increase list View's Separator length(spacing between two cells).
I am not getting how can I do it in xamarin forms by using custom renderer and I am looking for iOS only.
I want to create card view in iOS (by using xamarin forms) just like facebook application.
I Implemented it with frame control.
1.I created one customized cell in List View (Using ViewCell).
Then Added frame in it.
2.Removed Separator in a List View by Using Custom Renderer.
Use HasUnevenRows="True" in your ListView and it should adapt to your item height.