PrinterSettings.PaperSourceCollection クラス
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
PaperSource オブジェクトのコレクションを含んでいます。
public: ref class PrinterSettings::PaperSourceCollection : System::Collections::ICollection
public class PrinterSettings.PaperSourceCollection : System.Collections.ICollection
type PrinterSettings.PaperSourceCollection = class
interface ICollection
interface IEnumerable
Public Class PrinterSettings.PaperSourceCollection
Implements ICollection
- 継承
-
PrinterSettings.PaperSourceCollection
- 実装
次のコード例では、コンボ ボックスに comboPaperSource
プリンターでサポートされている用紙ソースを設定します。
SourceNameは、コンボ ボックスの プロパティを介して追加される項目の表示文字列をDisplayMember提供する プロパティとして識別されます。 この例では、 という名前printDoc
のPrintDocument変数が存在し、特定のコンボ ボックスが存在する必要があります。
// 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
PrinterSettings.PaperSourceCollectionには、 PaperSource プロパティを通じてPaperSource.Kind用紙ソース トレイを表すインスタンスが含まれます。このインスタンスには、いずれかの値がPaperSourceKind含まれます。
通常、 プロパティを使用してページの用紙ソースを PageSettings.PaperSource 、コレクションから使用できる有効な PaperSource インスタンスに PaperSources 設定します。
Printer |
PrinterSettings.PaperSourceCollection クラスの新しいインスタンスを初期化します。 |
Count |
コレクション内の異なる給紙方法の数を取得します。 |
Item[Int32] |
指定したインデックスにある PaperSource を取得します。 |
Add(Paper |
指定した PaperSource を PrinterSettings.PaperSourceCollection の末尾に追加します。 |
Copy |
指定したインデックスを開始位置として、指定した配列に現在の PrinterSettings.PaperSourceCollection の内容をコピーします。 |
Equals(Object) |
指定されたオブジェクトが現在のオブジェクトと等しいかどうかを判断します。 (継承元 Object) |
Get |
このコレクションを反復処理できる列挙子を返します。 |
Get |
既定のハッシュ関数として機能します。 (継承元 Object) |
Get |
現在のインスタンスの Type を取得します。 (継承元 Object) |
Memberwise |
現在の Object の簡易コピーを作成します。 (継承元 Object) |
To |
現在のオブジェクトを表す文字列を返します。 (継承元 Object) |
ICollection. |
このメンバーの詳細については、「CopyTo(Array, Int32)」をご覧ください。 |
ICollection. |
このメンバーの詳細については、「Count」をご覧ください。 |
ICollection. |
このメンバーの詳細については、「IsSynchronized」をご覧ください。 |
ICollection. |
このメンバーの詳細については、「SyncRoot」をご覧ください。 |
IEnumerable. |
この API は製品インフラストラクチャをサポートします。コードから直接使用するものではありません。 このメンバーの詳細については、「GetEnumerator()」をご覧ください。 |
Cast<TResult>(IEnumerable) |
IEnumerable の要素を、指定した型にキャストします。 |
Of |
指定された型に基づいて IEnumerable の要素をフィルター処理します。 |
As |
クエリの並列化を有効にします。 |
As |
IEnumerable を IQueryable に変換します。 |
製品 | バージョン |
---|---|
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9 |
.NET に関するフィードバック
.NET はオープンソース プロジェクトです。 フィードバックを提供するにはリンクを選択します。