第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

Xamarin Forms - 如何創(chuàng)建一個(gè)顯示警報(bào),您可以在其中輸入數(shù)量?

Xamarin Forms - 如何創(chuàng)建一個(gè)顯示警報(bào),您可以在其中輸入數(shù)量?

白衣非少年 2021-11-21 14:45:32
我的應(yīng)用程序是一個(gè)在線預(yù)訂,您可以立即在線選擇您的訂單并在指定的時(shí)間為您服務(wù)。如何制作這種顯示警報(bào)?而不是“添加”,我還想要“取消”按鈕,您輸入的數(shù)量也將轉(zhuǎn)移到局部變量這是我的代碼立即訂購(gòu)菜單.xaml<ListView x:Name="MyOrder" ItemSelected="MyOrder_ItemSelected" RowHeight="100">        <ListView.ItemTemplate>            <DataTemplate>                <ViewCell>                    <Grid ColumnSpacing="0" RowSpacing="0">                        <Grid.RowDefinitions>                            <RowDefinition Height="*" />                        </Grid.RowDefinitions>                        <Grid.ColumnDefinitions>                            <ColumnDefinition Width="*" />                            <ColumnDefinition Width="*" />                        </Grid.ColumnDefinitions>                        <StackLayout Grid.Row="0" Grid.Column="0" >                            <Image Source="{Binding menu_image ,StringFormat='https://i.imgur.com/{0:F0}.png'}"  Aspect="AspectFill"/>                        </StackLayout>                        <StackLayout Grid.Row="0" Grid.Column="1" VerticalOptions="Center">                            <Label Text="{Binding menu_name}" Font="30"/>                            <Label Text="{Binding menu_price,StringFormat='? {0:F0}'}" Font="20"/>                            <Label Text="{Binding menu_availability} " Font="10" />                        </StackLayout>                    </Grid>                </ViewCell>            </DataTemplate>        </ListView.ItemTemplate>    </ListView>
查看完整描述

3 回答

?
SMILET

TA貢獻(xiàn)1796條經(jīng)驗(yàn) 獲得超4個(gè)贊

您可以創(chuàng)建自己的輸入框?qū)υ捒蚍椒?,而不是使?DisplayAlert 或任何插件。官方 Xamarin.Form 論壇中有一個(gè)關(guān)于這個(gè)主題的好帖子。

Thomas Flemming 回答了該線程的鏈接https://forums.xamarin.com/discussion/comment/110002/#Comment_110002


查看完整回答
反對(duì) 回復(fù) 2021-11-21
?
人到中年有點(diǎn)甜

TA貢獻(xiàn)1895條經(jīng)驗(yàn) 獲得超7個(gè)贊

最簡(jiǎn)單的方法是使用 NuGet 的 Acr.UserDialogs 包:https ://www.nuget.org/packages/Acr.UserDialogs/

將包包含在您的共享代碼庫(kù)和您的本機(jī)實(shí)現(xiàn)中,您可以通過一個(gè)簡(jiǎn)單的調(diào)用來啟動(dòng)對(duì)話框。

此外,我還描述了一種無需使用外部插件即可創(chuàng)建自定義對(duì)話框的方法:Display a popup with xamarin forms


查看完整回答
反對(duì) 回復(fù) 2021-11-21
?
RISEBY

TA貢獻(xiàn)1856條經(jīng)驗(yàn) 獲得超5個(gè)贊

我建議你使用這個(gè)不錯(cuò)的插件:


https://github.com/rotorgames/Rg.Plugins.Popup


它讓你創(chuàng)建一個(gè)完全自定義的彈出窗口(它在某處派生自 Xamarin.Forms.ContentPage),使用 XAML 或 C#,你可以像為任何其他頁(yè)面那樣創(chuàng)建布局。


然后點(diǎn)擊“添加”按鈕,我會(huì)向彈出窗口的調(diào)用者返回一些東西。我有一個(gè)基本的彈出實(shí)現(xiàn),你可以指定一個(gè)返回值。如果您需要該代碼,我可以在此處分享(或在此處查看我的舊答案:獲取彈出頁(yè)面的公共變量)


基本實(shí)現(xiàn):


//Create a base callback-popup. Let any popup that should return something on a button click inherit from this

public class CallbackPopup<T> : PopupPage

{

    public Task<T> PagePoppedTask { get { return tcs.Task; } }

    private TaskCompletionSource<T> tcs;


    public CallbackPopup()

    {

        tcs = new TaskCompletionSource<T>();

    }


    //Deriving classes have to call this method in the "OnDisappearing" or when a specific button was clicked

    public void SetPopupResult(T result)

    {

        if (PagePoppedTask.IsCompleted == false)

            tcs.SetResult(result);

    }

}


//Asyncly call this popup

public async void OpenPopup(){

        var popup = new YourPopup<bool>();

        await Rg.Plugins.Popup.Services.PopupNavigation.Instance.PushAsync(popup);

        bool result = await popup.PagePoppedTask;

}


查看完整回答
反對(duì) 回復(fù) 2021-11-21
  • 3 回答
  • 0 關(guān)注
  • 260 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)