Ejemplo n.º 1
0
 public void PrintBtn_Click_1(object sender, RoutedEventArgs e)
 {
     if (ReceiptCol.Width == new GridLength(0))
     {
         // unhide the colums to print
         ReceiptCol.Width = new GridLength(400);
         ReceiptGrd.UpdateLayout();
         SalesVM.Print(ref ReceiptGrd);
         ReceiptCol.Width = new GridLength(0);
         //hide it back
     }
     else
     {
         SalesVM.Print(ref ReceiptGrd);
     }
 }
Ejemplo n.º 2
0
        public async void PrintBtn_Click_1(object sender, RoutedEventArgs e)
        {
            if (ReceiptCol != null && ReceiptCol.Width == new GridLength(0))
            {
                // unhide the colums to print
                ReceiptCol.Width = new GridLength(400);
                ReceiptGrd.UpdateLayout();

                await Print().ConfigureAwait(false);

                ReceiptCol.Width = new GridLength(0);
                //hide it back
            }
            else
            {
                await Print().ConfigureAwait(false);
            }
        }