2016-07-20 5 views
-2

私は正しい場所にテキストを置くようにテキストブロックを置くために1つの背景イメージを取っているので、私の要件を置く必要があります。プリンタにチェックして、私は私の意図は、それがボタンクリックの後ろにあなたのコードは、それが動作します。この希望ようにする必要があり、チェック cheque印刷する方法wpfで背景なしのチェックC#

private void Button_Click_1(object sender, RoutedEventArgs e) 
    { 
     PrintDialog dialog = new PrintDialog(); 
     if (dialog.ShowDialog() == true) 
     { 
      dialog.PrintVisual(stackPrinting, "stackPrinting"); 
     } 
    } 

答えて

1

上の画像を表示するべきではありません印刷した後であるので、チェック上の値を示さなければなりません。

grdCheque.Background = new SolidColorBrush(); 
     PrintDialog dialog = new PrintDialog(); 
     if (dialog.ShowDialog() == true) 
     { 
      dialog.PrintVisual(grdCheque, "grdCheque"); 
      this.Close(); 
     } 
関連する問題