FlowDocument.PageWidth 속성

정의

FlowDocument에서 페이지의 기본 너비를 가져오거나 설정합니다.

public:
 property double PageWidth { double get(); void set(double value); };
[System.ComponentModel.TypeConverter(typeof(System.Windows.LengthConverter))]
public double PageWidth { get; set; }
[<System.ComponentModel.TypeConverter(typeof(System.Windows.LengthConverter))>]
member this.PageWidth : double with get, set
Public Property PageWidth As Double

속성 값

FlowDocument에서 페이지의 기본 너비(디바이스 독립적 픽셀)입니다. 값이 NaN ("Auto"의 특성 값에 해당)이면 페이지 너비가 자동으로 결정됩니다. 기본값은 NaN입니다.

특성

예제

다음 예제에서는 설정 하는 방법을 보여 줍니다 합니다 PageWidth 특성을 FlowDocument 요소입니다.

<FlowDocumentReader>
  <FlowDocument
    PageHeight="Auto"
    PageWidth="Auto"
    MinPageHeight="3in"
    MinPageWidth="5in"
    MaxPageHeight="6in"
    MaxPageWidth="10in"
  >
    <Paragraph Background="BlanchedAlmond">
      This uses automatic page sizing with minimum page size of 3 by 5 inches,
      and a maximum page size of 6 by 10 inches.
    </Paragraph>
  </FlowDocument>
</FlowDocumentReader>

다음 예제에서는 설정 하는 방법의 PageWidth 속성 프로그래밍 방식으로 합니다.

FlowDocument flowDoc = new FlowDocument(new Paragraph(new Run("A bit of text content...")));
// Set PageHeight and PageWidth to "Auto".
flowDoc.PageHeight = Double.NaN;
flowDoc.PageWidth = Double.NaN;
// Specify minimum page sizes.
flowDoc.MinPageWidth = 680.0;
flowDoc.MinPageHeight = 480.0;
//Specify maximum page sizes.
flowDoc.MaxPageWidth = 1024.0;
flowDoc.MaxPageHeight = 768.0;
Dim flowDoc As New FlowDocument(New Paragraph(New Run("A bit of text content...")))
' Set PageHeight and PageWidth to "Auto".
flowDoc.PageHeight = Double.NaN
flowDoc.PageWidth = Double.NaN
' Specify minimum page sizes.
flowDoc.MinPageWidth = 680.0
flowDoc.MinPageHeight = 480.0
'Specify maximum page sizes.
flowDoc.MaxPageWidth = 1024.0
flowDoc.MaxPageHeight = 768.0

설명

continuum MinPageWidth 에서 볼 경우 속성이 속성보다 MaxPageWidth 우선하며, 이 속성이 속성보다 PageWidth 우선합니다. 세 가지 속성이 모두 지정된 페이지에 설정된 경우 속성이 평가되는 순서입니다.

XAML 특성 사용

<object PageWidth="double"/>  
- or -  
<object PageWidth="qualifiedDouble"/>  
- or -  
<object PageWidth="Auto"/>  

XAML 값

double
Double

문자열 표현 된 Double 보다는 작습니다 0.0 보다 크거나 같은 값 Double.PositiveInfinity합니다. 값을 정규화 되지 않은 디바이스 독립적 픽셀 단위로 측정 됩니다. 문자열 소수점이 하를 명시적으로 포함 되지 해야 합니다.

qualifiedDouble
위에서 설명한 대로 double 값, 다음 단위 지정자 px중 하나( , , in, cm) pt

px (기본값)은 디바이스 독립적 단위(단위당 1/96인치)입니다.

in 인치; 1에서 96px = =

cm 센티미터; 1cm==(96/2.54) px

pt 포인트; 1pt==(96/72) px

자동
페이지 너비가 자동으로 결정되도록 합니다. 속성 값에 해당 Double.NaN합니다.

종속성 속성 정보

식별자 필드 PageWidthProperty
메타 데이터 속성 설정 true AffectsMeasure

적용 대상