-1
我相信這是很容易做的,但我卡住....我期待各地找到一種方法來填充Xamarin Android中的列表視圖。 這是我的代碼:如何填充列表視圖Xamarin使用WCF服務
public class MainActivity : Activity { WipService.BasicHttpBinding_IWipService client; protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); // Set our view from the "main" layout resource SetContentView(Resource.Layout.Main); // Get our button from the layout resource, // and attach an event to it Button getsomebtn = FindViewById<Button>(Resource.Id.GetSomeBtn); ListView applist = FindViewById<ListView>(Resource.Id.AppList); getsomebtn.Click += Getsomebtn_Click; } private void Getsomebtn_Click(object sender, EventArgs e) { client = new WipService.BasicHttpBinding_IWipService(); client.GetWorkerListCompleted += Client_GetWorkerListCompleted; client.GetWorkerListAsync(); } public void Client_GetWorkerListCompleted(object sender, WipService.GetWorkerListCompletedEventArgs e) { var x = e.Result; }
WCF服務是偉大的工作!我在「x」列表中看到下面的圖片。
我的問題是,如何填充我的ListView被稱爲APPLIST ???
你得幫我...我知道你想讓我讀,但這沒有道理。 'var items = new string [] {e.result}' – IMAK
本教程的哪些內容沒有意義?什麼是'e.result'類型?它是一個字符串嗎? –
它是一個列表...看到最後一個圖像 – IMAK