1

リスト ピッカー用Toolkit-Windows Phone 8 をコンボ ボックス オプションの選択コントロールとして使用していますが、特定の時間にリスト ピッカー コントロールがポップアップ ウィンドウを閉じないことがありました (主にフル スクリーン モード)。リスト ピッカーは戻るキーを押すイベントを処理するため、アプリでは機能しません。また、アプリのレジュームを処理した場合、このウィンドウで立ち往生しており、アプリケーションがどの URL アプリケーションに移動しているかを確認しました。すると、RootFrame_Navigating Method から以下の URL を見つけました。

Microsoft.Phone.Controls.Toolkit;コンポーネント/ListPicker/ListPickerPage.xaml

さらに、このエラーを再現しようとしましたが、再現できない場合があります。したがって、誰もがこのエラーを経験していることを知りたいのですが、これに対する解決策は何ですか? ありがとう

ここに画像の説明を入力

Listpicker 関連のコード

<toolkit:ListPicker x:Name="cmbinvoice"  
                                            ItemsSource="{Binding Path=listinvoices}"                                              
                                            Grid.Column ="0" 
                                            Grid.ColumnSpan="2"   
                                            RenderTransformOrigin="0.5,0.5" 
                                            ExpansionMode="FullscreenOnly" 
                                            Foreground="Black" 
                                            Background="White"  
                            FullModeHeader="Invoice"
                                            Margin="15,90,10,-123" FontWeight="Bold" TabIndex="2147483645" Tag="" SelectionChanged="cmbinvoice_SelectionChanged"    >
                <toolkit:ListPicker.ItemTemplate>
                    <DataTemplate>
                        <TextBlock Text="{Binding invoiceno}" />
                    </DataTemplate>
                </toolkit:ListPicker.ItemTemplate>
                <toolkit:ListPicker.FullModeItemTemplate>
                    <DataTemplate>
                        <StackPanel Margin="16 15 0 15"  Orientation="Horizontal" >
                            <TextBlock Text="{Binding invoiceno}"
                                       Margin="0 0 0 0"
                                       FontSize="30" 
                                       FontFamily="{StaticResource PhoneFontFamilyLight}"/>
                        </StackPanel>
                    </DataTemplate>
                </toolkit:ListPicker.FullModeItemTemplate>
            </toolkit:ListPicker>

コードビハインド

     cmbinvoice.ItemsSource = vm.invoiceh; //When the Page Starts 

private void cmbinvoice_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            invoiceno = "";
            vm.invoiced.Clear();
            vm.invoicep.Clear();
            if (cmbinvoice.SelectedIndex != -1 && vm.invoiceh[cmbinvoice.SelectedIndex].invoiceno != "Select One")
            {
                invoiceno = vm.invoiceh[cmbinvoice.SelectedIndex].invoiceno;
                vm.cancelphase2setup(invoiceno);
                invpayments.ItemsSource = vm.invoicep;
                invitems.ItemsSource = vm.invoiced;
                lblcustomer.Text = vm.invoiceh[cmbinvoice.SelectedIndex].customer;
                lbltotal.Text = vm.invoiceh[cmbinvoice.SelectedIndex].amount.ToString("N2");
                lbldate.Text = string.Format("{0:dd-MMM-yyyy}", vm.invoiceh[cmbinvoice.SelectedIndex].invoicedate.Date);
            }
            else
            {
                lbldate.Text = "";
                lbltotal.Text = "";
                lblcustomer.Text = "";
            }
        }

ViewModel コード

ページの開始時

public void cancelsetup()
        {
            int customer = APPCommon.customerid;
            //var query = from InvoiceHeader oh in APPCommon.SFADB where oh.CustomerID == customer && oh.Deleted == false && oh.InvoiceDate == APPCommon.TransactionDate select oh;

            invoiceh.Add(new InvHead() { customerid = 0, amount = 0, customer = "", invoicedate = APPCommon.TransactionDate, invoiceno = "Select One" });

            foreach (string x in APPCommon.invnos)
                foreach (InvoiceHeader oh in from InvoiceHeader oh in APPCommon.SFADB where oh.CustomerID == customer && oh.Deleted == false && oh.InvoiceDate == APPCommon.TransactionDate && oh.InvoiceNo == x orderby oh.InvoiceNo descending select oh)
                    if (!(from OutstandingSettlementsDetail O in APPCommon.SFADB where O.InvoiceNo == oh.InvoiceNo select O).Any())
                        invoiceh.Add(new InvHead() { customerid = oh.CustomerID, amount = oh.NetAmount, customer = APPCommon.CustomerName, invoicedate = oh.InvoiceDate, invoiceno = oh.InvoiceNo });
        }

リストピッカーを選択した場合

public void cancelphase2setup(string invoiceno)
        {
            if (invoiceno == "") return;

            foreach (InvoicePayment ip in from InvoicePayment ip in APPCommon.SFADB where ip.InvoiceNo == invoiceno select ip)
            {
                string pt = (from PaymentType p in APPCommon.SFADB where p.ID == ip.PaymentTypeID select p.Name).FirstOrDefault();
                invoicep.Add(new InvPayment() { Amount = ip.Amount, invoiceno = ip.InvoiceNo, invpaymentno = ip.InvoicePaymentNo, type = pt, typeid = ip.PaymentTypeID });
                pt = null;
            }

            foreach (InvoiceDetail id in from InvoiceDetail id in APPCommon.SFADB where id.InvoiceNo == invoiceno select id)
            {
                string im = (from ItemMaster i in APPCommon.SFADB where i.ID == id.ItemMasterID select i.Name).FirstOrDefault();
                invoiced.Add(new InvDetail() { BatchNo=id.BatchNo, DiscountPercentage = id.DiscountPerc, invoiceno = id.InvoiceNo, ItemMasterID = id.ItemMasterID, ItemMasterName = im, NBT = id.NBTPerc, Quantity = id.Qty, Total = id.NetAmount, UnitPrice = id.Price, VAT = id.VATPerc });
                im = null;
            }

            string key = (from ExchangeHeader e in APPCommon.SFADB where e.InvoiceNo == invoiceno select e.ExchangeNo).FirstOrDefault();

            if (key != null)
                foreach (var e in from ExchangeDetail e in APPCommon.SFADB where e.ExchangeNo == key select e)
                {
                    string im = (from ItemMaster i in APPCommon.SFADB where i.ID == e.ItemMasterID select i.Name).FirstOrDefault();
                    invoiced.Add(new InvDetail() { exchange = true, rtn = false, BatchNo = e.BatchNo, DiscountPercentage = 0, invoiceno = invoiceno, ItemMasterID = e.ItemMasterID, ItemMasterName = im, NBT = 0, Quantity = (double)e.Qty, Total = (decimal)e.NetAmount, UnitPrice = (decimal)e.UnitPrice, VAT = 0 });
                    im = null;
                }

            key = (from ReturnHeader e in APPCommon.SFADB where e.InvoiceNo == invoiceno select e.ReturnNo).FirstOrDefault();

            if (key != null)
                foreach (var e in from ReturnDetail e in APPCommon.SFADB where e.ReturnNo == key select e)
                {
                    string im = (from ItemMaster i in APPCommon.SFADB where i.ID == e.ItemMasterID select i.Name).FirstOrDefault();
                    invoiced.Add(new InvDetail() { exchange = false, rtn = true, BatchNo = e.BatchNo, DiscountPercentage = 0, invoiceno = invoiceno, ItemMasterID = e.ItemMasterID, ItemMasterName = im, NBT = 0, Quantity = (double)e.Qty, Total = (decimal)e.NetAmount, UnitPrice = (decimal)e.Price, VAT = 0 });
                    im = null;
                }
        }
4

1 に答える 1