Excellent video. Only change I had to make was adding a foreach with a List.Add for dynamically adding the elements in the Picker at runtime. Worked on the first shot
Thank you, I have a question. Already my project has MainPage. Example: "MainPage = new NavigationPage(new Page1());" this is the root page; how can i add page for picker, for example I applied the picker in Page5() Example: "MainPage = new NavigationPage(new Page5());"
@@c_forcoding Thank you for response, NO need a button. when I applied your code in the same steps. it gave error. Can not resolve reference: `System.Diagnostics.PerformanceCounter`, referenced by `Microsoft.VisualStudio.Telemetry`. Please add a NuGet package or assembly reference for `System.Diagnostics.PerformanceCounter`, or remove the reference to `Microsoft.VisualStudio.Telemetry`. But, already 'System.Diagnostics.PerformanceCounter' NuGet package installed. In my project the NavigationPage (root) in App.xml.cs is "MainPage = new NavigationPage(new Page1());"
use "Command" for click events.... go through the link it might help you docs.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/button#using-the-command-interface
This video helps me a lot just got a problem if I pass the i.d instead like what if i pass the selected id of the choices to the display method (like the choices are 1=isactive and 0=isnotactive but instead of passing the string , i pass the int id instead and display it) hope you or someone help me
I'm learning Xamarin and would like to know how to populate the picker with data from an Enum from Item. public class Item { public string Id { get; set; } public string Name { get; set; } public string Description { get; set; } public bool Done { get; set; } public ItemType ItemType { get; set; } public ItemPriority ItemPriority { get; set; } } public enum ItemType { Personal, Professional } public enum ItemPriority { High, Low }
Tried so many eventhandlers, this was the only one that worked for me, thanks!!
Excellent video. Only change I had to make was adding a foreach with a List.Add for dynamically adding the elements in the Picker at runtime. Worked on the first shot
glad to hear that it is helpful for you.. :)
Impressive how complicated this is in Xamarin. Thank you for this tutorial. I miss windows forms C# where it was as simple as Dropdown.content.
cool :)
Thanks! Great example!
Thank you
Thanks guy, Great job
Thanks, helped a bunch.
Cities not showing in the picker when I open the app. Like at 2:56 mark. It shows blank.
May be some data binding issue.. please check your code once
How to select all items in xamarin?
how to set a value by default in picker in mvvm
Set selectedItem to the default value, it will work.. like SelectedCity = CitiesList[1]; in the constructor
Thank you, I have a question. Already my project has MainPage. Example: "MainPage = new NavigationPage(new Page1());" this is the root page; how can i add page for picker,
for example I applied the picker in Page5() Example: "MainPage = new NavigationPage(new Page5());"
I didn't understand your question clearly...
If you mean navigating to a page on button click:
await Navigation.PushAsync (new Page5());
@@c_forcoding Thank you for response, NO need a button. when I applied your code in the same steps. it gave error.
Can not resolve reference: `System.Diagnostics.PerformanceCounter`, referenced by `Microsoft.VisualStudio.Telemetry`. Please add a NuGet package or assembly reference for `System.Diagnostics.PerformanceCounter`, or remove the reference to `Microsoft.VisualStudio.Telemetry`.
But, already 'System.Diagnostics.PerformanceCounter' NuGet package installed. In my project the NavigationPage (root) in App.xml.cs is "MainPage = new NavigationPage(new Page1());"
@@shurooqaldaja912 This seems to be a project setup issue.. create a new project and try implementing Picker
@@c_forcoding Thank you a lot
Great job man
Hi Thanks for the video. Its help me too much. I have a question. I want clear label text with button click. How i can do this?
use "Command" for click events.... go through the link it might help you
docs.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/button#using-the-command-interface
By selecting the items I want to hide or change my grid content ...how to do that ?
Add that logic on the "SelectedItem" event
Thanks,How the picker selection is cleaned?
Set SelectedItem to NULL.. It clears the SelectedItem
Great video.
This video helps me a lot just got a problem if I pass the i.d instead like what if i pass the selected id of the choices to the display method (like the choices are 1=isactive and 0=isnotactive but instead of passing the string , i pass the int id instead and display it) hope you or someone help me
Hi, Where can i find source code. Thanks.
@@loka1253 sure.. will update definetly
worked..thanks
👌
awesome
I'm learning Xamarin and would like to know how to populate the picker with data from an Enum from Item.
public class Item
{
public string Id { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public bool Done { get; set; }
public ItemType ItemType { get; set; }
public ItemPriority ItemPriority { get; set; }
}
public enum ItemType
{
Personal, Professional
}
public enum ItemPriority
{
High, Low
}