PrintDialog.PrintableAreaWidth 속성

정의

페이지에서 인쇄할 수 있는 영역의 너비를 가져옵니다.

public:
 property double PrintableAreaWidth { double get(); };
public double PrintableAreaWidth { get; }
member this.PrintableAreaWidth : double
Public ReadOnly Property PrintableAreaWidth As Double

속성 값

Double

인쇄할 수 있는 페이지 영역의 너비를 나타내는 Double입니다.

예제

다음 예제에서는 XAML(Extensible Application Markup Language) 태그 및 코드를 사용하여 속성 값을 PrintableAreaWidth 가져오는 방법을 보여 줍니다.

<Button Width="200" Click="GetWidth">Get the Printable Width</Button>

...

private void GetWidth(object sender, RoutedEventArgs e)
{
    PrintDialog pDialog = new PrintDialog();
    PrintQueue pq = pDialog.PrintQueue;     //force initialization of the dialog's PrintTicket or PrintQueue
    txt2.Text = pDialog.PrintableAreaWidth.ToString() + " is the printable width";
}
Private Sub GetWidth(ByVal sender As Object, ByVal e As RoutedEventArgs)
    Dim pDialog As New PrintDialog()
    Dim pq As PrintQueue = pDialog.PrintQueue 'force initialization of the dialog's PrintTicket or PrintQueue
    txt2.Text = pDialog.PrintableAreaWidth.ToString() & " is the printable width"
End Sub

적용 대상