我需要添加一个按下一个小弹出视图的按钮。我如何使用Forms来实现这一点,因此它是跨平台的?
更新
基于尝试使用XLabs的PopupLayout的建议,我一直试图让它发挥作用。现在我收到运行时错误说:
阵地14:4。键入popup:在xmlns clr-namespace中找不到PopupLayout:XLabs.Forms.Controls; assembly = ACS.FundRaising
我的XAML看起来像这样:
<?xml version="1.0" encoding="UTF-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="ACS.FundRaising.Views.TransactionsView"
xmlns:viewModels="clr-namespace:ACS.FundRaising.ViewModels;assembly=ACS.FundRaising"
xmlns:controls="clr-namespace:ACS.FundRaising.Controls;assembly=ACS.FundRaising"
xmlns:popup="clr-namespace:XLabs.Forms.Controls;assembly=ACS.FundRaising"
Padding="0,0,0,0"
BackgroundColor="#f6f6f6">
<ContentPage.BindingContext>
<viewModels:TransactionsViewModel />
</ContentPage.BindingContext>
<ContentPage.Content>
<popup:PopupLayout x:Name="_PopupLayout">
<popup:PopupLayout.Content>
.
.
.
</popup:PopupLayout.Content>
</popup:PopupLayout>
</ContentPage.Content>
</ContentPage>
如果我尝试在代码中实例化PopupLayout的副本,我不会收到任何错误。