0
この例のようにしたいが、できない。 私は多くのプラグインを試して、実装方法を見つけることができません。ToolbarItemアイコン付きのXamarinメニュー
誰かが知っているか、私にどのように教えてもらえますか?
MasterDetailPageで1つのToolbarItemをクリックすると、表示ポップアップメニューが表示されます。
私の実際のアプリ:
私が欲しいもの:
この例のようにしたいが、できない。 私は多くのプラグインを試して、実装方法を見つけることができません。ToolbarItemアイコン付きのXamarinメニュー
誰かが知っているか、私にどのように教えてもらえますか?
MasterDetailPageで1つのToolbarItemをクリックすると、表示ポップアップメニューが表示されます。
私の実際のアプリ:
私が欲しいもの:
私はあなたがそうでなければでSlideOverKit
public SlideDownMenuView()
{
InitializeComponent();
// You must set HeightRequest in this case
this.HeightRequest = 600;
// You must set IsFullScreen in this case,
// otherwise you need to set WidthRequest,
// just like the QuickInnerMenu sample
this.IsFullScreen = true;
this.MenuOrientations = MenuOrientation.TopToBottom;
// You must set BackgroundColor,
// and you cannot put another layout with background color cover the whole View
// otherwise, it cannot be dragged on Android
this.BackgroundColor = Color.FromHex ("#D8DDE7");
}
に見てみることができると思います3210
あなたは...このコードで
public partial class App : Application
{
public App()
{
InitializeComponent();
MasterDetailPage mdpage = new MasterDetailPage();
mdpage.Master = new ContentPage() { Title = "Master", BackgroundColor = Color.Red };
ToolbarItem tbi = new ToolbarItem() { Text = "POPUP" };
tbi.Clicked += async (object sender, System.EventArgs e) => {
StackLayout sl = new StackLayout() { HorizontalOptions = LayoutOptions.End, VerticalOptions = LayoutOptions.Start, BackgroundColor = Color.Pink, WidthRequest = 100, HeightRequest = 200 };
Rg.Plugins.Popup.Pages.PopupPage mypopup = new Rg.Plugins.Popup.Pages.PopupPage() {BackgroundColor = Color.Transparent };
mypopup.Content = sl;
await MainPage.Navigation.PushPopupAsync(mypopup);
};
ContentPage detail = new ContentPage() { Title = "Detail", BackgroundColor = Color.Green, };
detail.ToolbarItems.Add(tbi);
mdpage.Detail = new NavigationPage(detail);
MainPage = mdpage;
}
protected override void OnStart()
{
// Handle when your app starts
}
protected override void OnSleep()
{
// Handle when your app sleeps
}
protected override void OnResume()
{
// Handle when your app resumes
}
}
私はTabbedpageでメニューBottomToTopを表示するSlideOverKitを使用して[OK]を動作しますが、あなたはそのMasterDetailPageので言うようtoptobottomするためにそれをasignカント、およびIを試すことができますそれを実装する方法を知らない。 – kvaldes
このプラグインを試してみましたかhttps://github.com/rotorgames/Rg.Plugins.Popup –
はい、動作しません。ひどく表示され、バックウィンドウが暗くなります。ドロップダウンメニューを表示したいだけです。 \t \t \t \t MasterDetailPage> –
kvaldes