ComponentOne Extended Library for UWP
Adding Items to a Book
Extended Library for UWP > Book for UWP > Book for UWP Task-Based Help > Adding Items to a Book

You can add any sort of arbitrary content to a C1Book control. This includes text, images, layout panels, and other standard and 3rd-party controls. In this example, you'll add a TextBlock control to a C1Book control, but you can customize the steps to add other types of content instead.


For example, to add a TextBlock control to the book add <TextBlock Text="Hello World!"/> within the <Extended:C1Book> tag so that it appears similar to the following:

Copy Code
<Extended:C1Book Name="c1book1" Height="300" Width="450">
    <TextBlock Text="Hello World!"/>

In Code

For example, to add a TextBlock control to the book, add code to the page's constructor so it appears like the following:

Visual Basic
Copy Code
Public Sub New()
Dim c1book1 as New C1Book
    c1book1.Height = 300
    c1book1.Width = 450
    Dim txt1 as New TextBlock
    txt1.Text = "Hello World!"
End Sub

Copy Code
public MainPage()
    C1Book c1book1 = new C1Book();
    c1book1.Height = 300;
    c1book1.Width = 450;

    TextBlock txt1 = new TextBlock();
    txt1.Text = "Hello World!";

What You've Accomplished

You've added a control to the C1Book control. Run the application and observe that the TextBlock control has been added to the C1Book control. You can similarly add other content and controls.

See Also