Click here to Skip to main content
15,884,237 members
Home / Discussions / Mobile
   

Mobile

 
GeneralRe: USB Cable Between PC And Android Pin
C-P-User-310-Mar-19 4:20
C-P-User-310-Mar-19 4:20 
AnswerRe: USB Cable Between PC And Android Pin
Richard Deeming8-Mar-19 9:43
mveRichard Deeming8-Mar-19 9:43 
QuestionXamarin forms and SQLIte database Pin
Mycroft Holmes25-Feb-19 19:37
professionalMycroft Holmes25-Feb-19 19:37 
SuggestionRe: Xamarin forms and SQLIte database Pin
David Crow26-Feb-19 4:15
David Crow26-Feb-19 4:15 
GeneralRe: Xamarin forms and SQLIte database Pin
Mycroft Holmes26-Feb-19 12:24
professionalMycroft Holmes26-Feb-19 12:24 
QuestionCross Platform Xamarin MVVM ListView binding to ViewModel List not working Pin
Stephen Holdorf19-Feb-19 2:46
Stephen Holdorf19-Feb-19 2:46 
AnswerRe: Cross Platform Xamarin MVVM ListView binding to ViewModel List not working Pin
Mycroft Holmes19-Feb-19 11:11
professionalMycroft Holmes19-Feb-19 11:11 
GeneralRe: Cross Platform Xamarin MVVM ListView binding to ViewModel List not working Pin
Stephen Holdorf20-Feb-19 4:48
Stephen Holdorf20-Feb-19 4:48 
I have it working. Yes ObservableCollections are the way to go but generic Lists are fine as well. The problem is that when the Model is bound the WebService call has not completed so when the List property is bound it is still null. Even when updated at this point the ObservableCollection won't work because it has not been seeded. The solution is to seed the ObservableCollection, or List, on the Page's OnAppearing event and bind the ViewModel as the BindingContext in this event. My solution is below:

protected override async void OnAppearing()
{
    var vm = new ViewModel.ViewModel();
    if (vm == null)
        return;

    HttpClient client = new HttpClient();
    HttpResponseMessage responseGet = await client.GetAsync(vm.Geturi);
    string response = await responseGet.Content.ReadAsStringAsync();

    //Xml Parsing
    var _objPizzaList = new ObservableCollection<XmlPizzaDetails>();
    XDocument doc = XDocument.Parse(response);

    vm.GetRequest(doc);

    this.BindingContext = vm;
}

QuestionXamarin Forms Picker binding Pin
Mycroft Holmes21-Dec-18 19:35
professionalMycroft Holmes21-Dec-18 19:35 
Questionmobile program Pin
Member 1408773812-Dec-18 20:07
Member 1408773812-Dec-18 20:07 
Questionreturn all html codes of page instead of one string (by B4A commands) Pin
Member 1352250115-Nov-18 20:38
Member 1352250115-Nov-18 20:38 
QuestionAdvice required Pin
Mycroft Holmes9-Nov-18 17:22
professionalMycroft Holmes9-Nov-18 17:22 
AnswerRe: Advice required Pin
Adrian Mikeliunas20-Nov-18 10:49
Adrian Mikeliunas20-Nov-18 10:49 
GeneralRe: Advice required Pin
Mycroft Holmes20-Nov-18 11:22
professionalMycroft Holmes20-Nov-18 11:22 
QuestionTapGestureRecognizer on an Image on Tab not work Pin
Vimalsoft(Pty) Ltd8-Nov-18 11:34
professionalVimalsoft(Pty) Ltd8-Nov-18 11:34 
Questionprayer time Pin
Sayed Gulab Hussain Shah3-Nov-18 22:30
Sayed Gulab Hussain Shah3-Nov-18 22:30 
AnswerRe: prayer time Pin
OriginalGriff3-Nov-18 22:32
mveOriginalGriff3-Nov-18 22:32 
AnswerRe: prayer time Pin
Afzaal Ahmad Zeeshan4-Nov-18 9:32
professionalAfzaal Ahmad Zeeshan4-Nov-18 9:32 
QuestionQuestion about copyright laws Pin
ericbruhaha23-Oct-18 15:21
ericbruhaha23-Oct-18 15:21 
AnswerRe: Question about copyright laws Pin
Richard MacCutchan23-Oct-18 22:36
mveRichard MacCutchan23-Oct-18 22:36 
AnswerRe: Question about copyright laws Pin
abayomicharm24-Oct-18 19:44
abayomicharm24-Oct-18 19:44 
AnswerRe: Question about copyright laws Pin
Eddy Vluggen25-Oct-18 1:10
professionalEddy Vluggen25-Oct-18 1:10 
GeneralRe: Question about copyright laws Pin
ericbruhaha25-Oct-18 6:42
ericbruhaha25-Oct-18 6:42 
GeneralRe: Question about copyright laws Pin
Eddy Vluggen25-Oct-18 7:48
professionalEddy Vluggen25-Oct-18 7:48 
GeneralRe: Question about copyright laws Pin
ericbruhaha25-Oct-18 8:05
ericbruhaha25-Oct-18 8:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.