語言

InlineUIContainer 建構函式

定義

初始化 InlineUIContainer 類別的新執行個體。

多載

名稱 Description
InlineUIContainer()

初始化一個新的、空的類別實例 InlineUIContainer 。

InlineUIContainer(UIElement)

初始化該類別的新實例 InlineUIContainer ,將指定 UIElement 物件作為新 InlineUIContainer的初始內容。

InlineUIContainer(UIElement, TextPointer)

初始化 InlineUIContainer 類別的新實例,以指定的 UIElement 對象作為新 InlineUIContainer的初始內容,以及指定新 TextPointer 專案插入位置的 InlineUIContainer。

InlineUIContainer()

初始化一個新的、空的類別實例 InlineUIContainer 。

public:
 InlineUIContainer();
public InlineUIContainer();
Public Sub New ()

適用於

InlineUIContainer(UIElement)

初始化該類別的新實例 InlineUIContainer ,將指定 UIElement 物件作為新 InlineUIContainer的初始內容。

public:
 InlineUIContainer(System::Windows::UIElement ^ childUIElement);
public InlineUIContainer(System.Windows.UIElement childUIElement);
new System.Windows.Documents.InlineUIContainer : System.Windows.UIElement -> System.Windows.Documents.InlineUIContainer
Public Sub New (childUIElement As UIElement)

參數

childUIElement
UIElement

一個 UIElement 指定新 InlineUIContainer的初始內容的物件。

範例

以下範例展示了此建構子的使用方法。

// A child UIElement element for the new InlineUIContainer element.
Button buttonx = new Button();
buttonx.Content = "Click me!";

// After this line executes, the new element "inlineUI"
// contains the specified Inline element, "runx".
InlineUIContainer inlineUI = new InlineUIContainer(buttonx);
' A child UIElement element for the new InlineUIContainer element.
Dim buttonx1 As New Button()
buttonx1.Content = "Click me!"

' After this line executes, the new element "inlineUI"
' contains the specified Inline element, "runx".
Dim inlineUI As New InlineUIContainer(buttonx1)

適用於

InlineUIContainer(UIElement, TextPointer)

初始化 InlineUIContainer 類別的新實例,以指定的 UIElement 對象作為新 InlineUIContainer的初始內容,以及指定新 TextPointer 專案插入位置的 InlineUIContainer。

public:
 InlineUIContainer(System::Windows::UIElement ^ childUIElement, System::Windows::Documents::TextPointer ^ insertionPosition);
public InlineUIContainer(System.Windows.UIElement childUIElement, System.Windows.Documents.TextPointer insertionPosition);
new System.Windows.Documents.InlineUIContainer : System.Windows.UIElement * System.Windows.Documents.TextPointer -> System.Windows.Documents.InlineUIContainer
Public Sub New (childUIElement As UIElement, insertionPosition As TextPointer)

參數

childUIElement
UIElement

一個 UIElement 指定新 InlineUIContainer的初始內容的物件。 此參數可為 null,此時插入 no UIElement 。

insertionPosition
TextPointer

TextPointer A 指定元件建立後插入InlineUIContainer的位置,或null不自動插入。

範例

以下範例展示了此建構子的使用方法。

// A child UIElement element for the new InlineUIContainer element.
Button buttonx = new Button();
buttonx.Content = "Click me!";

// An empty paragraph will serve as the container for the new InlineUIContainer element.
Paragraph parx = new Paragraph();

// After this line executes, the new element "inlineUI"
// contains the specified UIElement element, "buttonx".  Also, "inlineUI" is
// inserted at the point indicated by the insertionPosition parameter, 
// which in this case indicates the content start position in the Paragraph 
// element "parx".
InlineUIContainer inlineUI = new InlineUIContainer(buttonx, parx.ContentStart);
' A child UIElement element for the new InlineUIContainer element.
Dim buttonx2 As New Button()
buttonx2.Content = "Click me!"

' An empty paragraph will serve as the container for the new InlineUIContainer element.
Dim parx As New Paragraph()

' After this line executes, the new element "inlineUI"
' contains the specified UIElement element, "buttonx".  Also, "inlineUI" is
' inserted at the point indicated by the insertionPosition parameter, 
' which in this case indicates the content start position in the Paragraph 
' element "parx".
Dim inlineUI2 As New InlineUIContainer(buttonx2, parx.ContentStart)

適用於