情況: 使用Xamarin Forms和MasterDetail組件構建應用程序。Xamarin形式MasterDetail和PageRenderer
問題: 如何基於PageRender呈現Android上的特定頁面?並保持抽屜?
編輯
public class MasterBacASable : MasterDetailPage
{
public MasterBacASable()
{
Icon = null;
Title = "The title";
Detail = (new FirstPage());
Master = new AppMenuPage();
}
}
[組件:ExportRenderer(typeof運算(BacASable.FirstPage)的typeof(BacASable.Droid.FirstPageContentRennderer))] 命名空間BacASable.Droid { 公共類FirstPageContentRennderer:PageRenderer { 公共FirstPageContentRennderer() {
}
protected override void OnElementChanged (ElementChangedEventArgs<Page> e)
{
base.OnElementChanged (e);
var activity = this.Context as Activity;
var v = activity.LayoutInflater.Inflate (Resource.Layout.AndroidView,this,false);
AddView (v);
}
}
}
http://stackoverflow.com/questions/36390545/can-you-make-a-clickevent-with-the-masterdetailpage-icon-text/36396688#36396688 –
嗨和Thx。我的問題是當試圖獲得Spcecific androidView。 – Ramah