<Folder>
  <Text name="Text">
    <![CDATA[I am the bone of my sword
Steel is my body and fire is my blood
I have created over a thousand blades
Unknown to Death, Nor known to Life
Have withstood pain to create many weapons
Yet, those hands will never hold anything
So as I pray, unlimited blade works.]]>
  </Text>

  <Doc name="DocFixed">
    <Doc>
      <Content>
        <p>
          <font size="24">Fixed Size Title</font>
        </p>
        <p>
          <nop>I am the bone of my sword</nop>
          <br/>
          <nop>Steel is my body and fire is my blood</nop>
          <br/>
          <nop>I have created over a thousand blades</nop>
          <br/>
          <nop>Unknown to Death, Nor known to Life</nop>
          <br/>
          <nop>Have withstood pain to create many weapons</nop>
          <br/>
          <nop>Yet, those hands will never hold anything</nop>
          <br/>
          <nop>So as I pray, unlimited blade works.</nop>
          <br/>
        </p>
      </Content>
    </Doc>
  </Doc>

  <Doc name="DocRelative">
    <Doc>
      <Content>
        <p>
          <font size="2x">Relative Size Title</font>
        </p>
        <p>
          <nop>I am the bone of my sword</nop>
          <br/>
          <nop>Steel is my body and fire is my blood</nop>
          <br/>
          <nop>I have created over a thousand blades</nop>
          <br/>
          <nop>Unknown to Death, Nor known to Life</nop>
          <br/>
          <nop>Have withstood pain to create many weapons</nop>
          <br/>
          <nop>Yet, those hands will never hold anything</nop>
          <br/>
          <nop>So as I pray, unlimited blade works.</nop>
          <br/>
        </p>
      </Content>
    </Doc>
  </Doc>

  <Script name="FontHelper">
    <Workflow>
      <![CDATA[
        module fontHelper;
        using presentation::*;
        
        func ChangeFontSize(oldFont : FontProperties, deltaSize : int) : FontProperties
        {
          return {fontFamily:oldFont.fontFamily size:(oldFont.size + deltaSize) antialias:true};
        }
      ]]>
    </Workflow>
  </Script>

  <Instance name="TextBoxTabPageResource">
    <Instance ref.CodeBehind="false" ref.Class="demo::TextBoxTabPage">
      <ref.Members>
        <![CDATA[
          @cpp:Protected
          var flag : bool = false;
          
          event OnMakeFontLarger();
          event OnMakeFontSmaller();
          
          @cpp:Protected
          func UpdateFont(newFont : FontProperties) : void
          {
            textBoxS.Font = newFont;
            textBoxM.Font = newFont;
            documentTextBox.Font = newFont;
            documentViewer.Font = newFont;
            documentLabel.Font = newFont;
          }
        ]]>
      </ref.Members>
      <TabPage ref.Name="self" Text="TextBox">
        <ev.OnMakeFontLarger-eval>
          <![CDATA[
            self.UpdateFont(ChangeFontSize(textBoxS.Font, 5));
          ]]>
        </ev.OnMakeFontLarger-eval>
        <ev.OnMakeFontSmaller-eval>
          <![CDATA[
            self.UpdateFont(ChangeFontSize(textBoxS.Font, -5));
          ]]>
        </ev.OnMakeFontSmaller-eval>

        <Table CellPadding="5" AlignmentToParent="left:0 top:0 right:0 bottom:0">
          <att.Rows>
            <CellOption>composeType:Percentage percentage:1.0</CellOption>
            <CellOption>composeType:MinSize</CellOption>
          </att.Rows>
          <att.Columns>
            <CellOption>composeType:MinSize</CellOption>
            <CellOption>composeType:MinSize</CellOption>
            <CellOption>composeType:MinSize</CellOption>
            <CellOption>composeType:Percentage percentage:1.0</CellOption>
          </att.Columns>

          <Cell Site="row:0 column:0 columnSpan:4">
            <Tab>
              <att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>

              <att.Pages>
                <TabPage Text="TextBox" Alt="T">
                  <Table CellPadding="5" AlignmentToParent="left:0 top:0 right:0 bottom:0">
                    <att.Rows>
                      <CellOption>composeType:MinSize</CellOption>
                      <CellOption>composeType:Percentage percentage:1.0</CellOption>
                    </att.Rows>
                    <att.Columns>
                      <CellOption>composeType:Percentage percentage:1.0</CellOption>
                    </att.Columns>

                    <Cell Site="row:0 column:0">
                      <SinglelineTextBox ref.Name="textBoxS" Text="Archer" Alt="S">
                        <att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
                      </SinglelineTextBox>
                    </Cell>

                    <Cell Site="row:1 column:0">
                      <MultilineTextBox ref.Name="textBoxM" Text-uri="res://TextBoxComponents/Text" Alt="M" HorizontalAlwaysVisible="false" VerticalAlwaysVisible="false">
                        <att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
                      </MultilineTextBox>
                    </Cell>
                  </Table>
                </TabPage>

                <TabPage Text="Document" Alt="D">
                  <Table CellPadding="5" AlignmentToParent="left:0 top:0 right:0 bottom:0">
                    <att.Rows>
                      <CellOption>composeType:MinSize</CellOption>
                      <CellOption>composeType:Percentage percentage:1.0</CellOption>
                    </att.Rows>
                    <att.Columns>
                      <CellOption>composeType:Percentage percentage:0.5</CellOption>
                      <CellOption>composeType:Percentage percentage:0.5</CellOption>
                    </att.Columns>

                    <Cell Site="row:0 column:0 columnSpan:2">
                      <DocumentTextBox ref.Name="documentTextBox" EditMode="Editable" Text="Archer" Alt="T">
                        <att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
                      </DocumentTextBox>
                    </Cell>

                    <Cell Site="row:1 column:0">
                      <DocumentViewer ref.Name="documentViewer" EditMode="Editable" Document-uri="res://TextBoxComponents/DocFixed" Alt="V">
                        <att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
                      </DocumentViewer>
                    </Cell>
                    <Cell Site="row:1 column:1">
                      <DocumentLabel ref.Name="documentLabel" EditMode="Editable" Document-uri="res://TextBoxComponents/DocRelative" Alt="L">
                        <att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
                      </DocumentLabel>
                    </Cell>
                  </Table>
                </TabPage>
              </att.Pages>
            </Tab>
          </Cell>

          <Cell Site="row:1 column:0">
            <Button Text="Make Font Larger" Alt="L" ev.Clicked-eval="self.OnMakeFontLarger();"/>
          </Cell>
          <Cell Site="row:1 column:1">
            <Button Text="Make Font Smaller" Alt="S" Enabled-bind="textBoxS.Font.size &gt; 5" ev.Clicked-eval="self.OnMakeFontSmaller();"/>
          </Cell>
        </Table>
      </TabPage>
    </Instance>
  </Instance>

</Folder>