PrinterSettings.PaperSources Özellik

Tanım

Yazıcıda bulunan kağıt kaynağı tepsilerini alır.

public:
 property System::Drawing::Printing::PrinterSettings::PaperSourceCollection ^ PaperSources { System::Drawing::Printing::PrinterSettings::PaperSourceCollection ^ get(); };
public System.Drawing.Printing.PrinterSettings.PaperSourceCollection PaperSources { get; }
member this.PaperSources : System.Drawing.Printing.PrinterSettings.PaperSourceCollection
Public ReadOnly Property PaperSources As PrinterSettings.PaperSourceCollection

Özellik Değeri

PrinterSettings.PaperSourceCollection Bu yazıcıda bulunan kağıt kaynağı tepsilerini temsil eden bir.

Örnekler

Aşağıdaki kod örneği, birleşik giriş kutusunu yazıcının desteklenen kağıt kaynaklarıyla doldurur comboPaperSource . SourceName, birleşik giriş kutusunun özelliği aracılığıyla DisplayMember eklenen öğe için görüntü dizesi sağlayan özellik olarak tanımlanır. Örnek, adlı printDoc bir değişkenin mevcut olmasını ve belirli bir PrintDocument birleşik giriş kutusunun mevcut olmasını gerektirir.

// Add list of paper sources found on the printer to the combo box.
// The DisplayMember property is used to identify the property that will provide the display String*.
comboPaperSource->DisplayMember = "SourceName";
PaperSource^ pkSource;
for ( int i = 0; i < printDoc->PrinterSettings->PaperSources->Count; i++ )
{
   pkSource = printDoc->PrinterSettings->PaperSources[ i ];
   comboPaperSource->Items->Add( pkSource );
}
// Add list of paper sources found on the printer to the combo box.
// The DisplayMember property is used to identify the property that will provide the display string.
comboPaperSource.DisplayMember="SourceName";

PaperSource pkSource;
for (int i = 0; i < printDoc.PrinterSettings.PaperSources.Count; i++){
    pkSource = printDoc.PrinterSettings.PaperSources[i];
    comboPaperSource.Items.Add(pkSource);
}
' Add list of paper sources found on the printer to the combo box.
' The DisplayMember property is used to identify the property that will provide the display string.
comboPaperSource.DisplayMember = "SourceName"

Dim pkSource As PaperSource
For i = 0 to printDoc.PrinterSettings.PaperSources.Count - 1
    pkSource = printDoc.PrinterSettings.PaperSources.Item(i)
    comboPaperSource.Items.Add(pkSource)
Next

Açıklamalar

özelliği PrinterSettings.PaperSourceCollection aracılığıyla PaperSource.Kind kağıt kaynak tepsilerini temsil eden örnekler içerir PaperSource ve bu da değerlerden birini PaperSourceKind içerir.

Genellikle, özelliği aracılığıyla bir sayfanın kağıt kaynağını koleksiyon aracılığıyla PageSettings.PaperSourcePaperSources geçerli PaperSource bir kullanılabilir olacak şekilde ayarlarsınız.

Şunlara uygulanır

Ayrıca bkz.