2013-01-09 59 views

回答

0

我不知道這是否幫助你,但是當我需要我把所有的信息膨脹的自定義axml,如果你正在使用一個的WindowsPhone或Windows 8應用程序的自定義控制,它就像一個用戶控制

 LinearLayout linearImages = FindViewById<LinearLayout>(Resource.Id.LinearLayoutImages); 

     LayoutInflater layoutInflater = (LayoutInflater)LayoutInflater.Context.GetSystemService(Context.LayoutInflaterService); 

     foreach (Image image in images) 
     { 
      var view = layoutInflater.Inflate(Resource.Layout.ImageControl, null); 

      TextView txtView = view.FindViewById<TextView>(Resource.Id.textView); 
      txtView.Text = image.Title; 

      ... 

      linearImages.AddView(view); 
     } 
相關問題