<Resource>
  <Folder name="GacGenConfig">
    <Folder name="Cpp">
      <Text name="SourceFolder">Source</Text>
      <Text name="Resource">..\..\..\UIRes\BlackSkin.bin</Text>
      <Text name="NormalInclude">GacUI.h</Text>
      <Text name="Name">Demo</Text>
    </Folder>
  </Folder>
  <Instance name="MainWindowResource">
    <Instance ref.Class="demo::MainWindow" xmlns:demo="demo::*">
      <Window ref.Name="self" Text="GacUI 完整控件测试" ClientSize="x:640 y:480">
        <att.BoundsComposition-set PreferredMinSize="x:640 y:480"/>
        <Tab>
          <att.BoundsComposition-set AlignmentToParent="left:5 top:5 right:5 bottom:5"/>
          <att.Pages>
            <TabPage Alt="L" Text="List">
              <Tab>
                <att.BoundsComposition-set AlignmentToParent="left:5 top:5 right:5 bottom:5"/>
                <att.Pages>
                  <demo:TextListTabPage Alt="T"/>
                  <demo:ListViewTabPage Alt="L"/>
                  <demo:TreeViewTabPage Alt="T"/>
                  <demo:DataGridTabPage Alt="D"/>
                </att.Pages>
              </Tab>
            </TabPage>
            <TabPage Alt="L" Text="Layout">
              <Tab>
                <att.BoundsComposition-set AlignmentToParent="left:5 top:5 right:5 bottom:5"/>
                <att.Pages>
                  <demo:RepeatTabPage Alt="R"/>
                  <demo:ResponsiveTabPage Alt="R"/>
                </att.Pages>
              </Tab>
            </TabPage>
            <TabPage Alt="L" Text="Control">
              <Tab>
                <att.BoundsComposition-set AlignmentToParent="left:5 top:5 right:5 bottom:5"/>
                <att.Pages>
                  <TabPage Alt="D" Text-bind="editorRibbon.Text">
                    <demo:DocumentEditorRibbon ref.Name="editorRibbon">
                      <att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
                    </demo:DocumentEditorRibbon>
                  </TabPage>
                  <TabPage Alt="D" Text-bind="editorToolstrip.Text">
                    <demo:DocumentEditorToolstrip ref.Name="editorToolstrip">
                      <att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
                    </demo:DocumentEditorToolstrip>
                  </TabPage>
                  <demo:TextBoxTabPage Alt="T"/>
                </att.Pages>
              </Tab>
            </TabPage>
            <TabPage Alt="M" Text="Misc">
              <Tab>
                <att.BoundsComposition-set AlignmentToParent="left:5 top:5 right:5 bottom:5"/>
                <att.Pages>
                  <demo:ElementTabPage Alt="E"/>
                  <demo:AnimationTabPage Alt="A"/>
                  <demo:LocalizedStringsTabPage Alt="L"/>
                </att.Pages>
              </Tab>
            </TabPage>
          </att.Pages>
        </Tab>
      </Window>
    </Instance>
  </Instance>

  <Instance name="TextListTabPageResource" content="File">TextListTabPage.xml</Instance>
  <Instance name="ListViewTabPageResource" content="File">ListViewTabPage.xml</Instance>
  <Instance name="TreeViewTabPageResource" content="File">TreeViewTabPage.xml</Instance>
  <Instance name="DataGridTabPageResource" content="File">DataGridTabPage.xml</Instance>
  <Folder name="DataGridComponents" content="Link">DataGridComponents.xml</Folder>
  
  <Instance name="RepeatTabPageResource" content="File">RepeatTabPage.xml</Instance>
  <Folder name="ResponsiveTabPage" content="Link">ResponsiveTabPage.xml</Folder>
  <Folder name="RepeatComponents" content="Link">RepeatComponents.xml</Folder>
  
  <Folder name="TextBoxComponents" content="Link">TextBoxTabPage.xml</Folder>
  <Folder name="DocumentComponents" content="Link">DocumentComponents.xml</Folder>
  <Folder name="DocumentEditorBase" content="Link">DocumentEditorBase.xml</Folder>
  <Folder name="DocumentEditorRibbon" content="Link">DocumentEditorRibbon.xml</Folder>
  <Folder name="DocumentEditorToolstrip" content="Link">DocumentEditorToolstrip.xml</Folder>
  
  <Instance name="ElementTabPageResource" content="File">ElementTabPage.xml</Instance>
  <Folder name="AnimationTabPage" content="Link">AnimationTabPage.xml</Folder>
  <Folder name="LocalizedStringsTabPage" content="Link">LocalizedStringsTabPage.xml</Folder>
  
  <Folder name="LargeImages" content="Link">Images/LargeImages.xml</Folder>
  <Folder name="SmallImages" content="Link">Images/SmallImages.xml</Folder>
  <Folder name="MiscImages" content="Link">Images/MiscImages.xml</Folder>
  <Script name="ImageLoaderResource" content="File">Images/ImageLoader.xml</Script>
  <Folder name="ToolbarImages" content="Link">ToolbarImages/Images.xml</Folder>

  <Script name="ViewModelResource">
    <Workflow>
      <![CDATA[
        module viewmodel;
        
        using system::*;
        using presentation::*;
        
        namespace demo
        {
          class MyTextItem
          {
            prop Name : string = "" {not observe}
            prop Checked : bool = false {not observe}
          }
          
          enum MyCategory
          {
            Black = 0,
            Red = 1,
            Lime = 2,
            Blue = 3,
            White = 4,
          }
          
          enum MyGender
          {
            Male = 0,
            Female = 1,
          }
          
          class MyDataItem
          {
            prop Name : string = "" {not observe}
            prop Gender : MyGender = Male {not observe}
            prop Category : MyCategory = White {not observe}
            prop Birthday : DateTime = (cast DateTime "2000-01-01 00:00:00.000") {not observe}
            prop Website : string = "" {not observe}
            prop LargeImage : GuiImageData^ = null {not observe}
            prop SmallImage : GuiImageData^ = null {not observe}
            
            new()
            {
            }
            
            new(name : string, gender : MyGender, category : MyCategory, birthday : DateTime, website : string)
            {
              Name = name;
              Gender = gender;
              Category = category;
              Birthday = birthday;
              Website = website;
            }
          }
          
          func ToString(value : MyCategory) : string
          {
            switch (value)
            {
              case Black:   { return "Black";  }
              case Red:     { return "Red";    }
              case Lime:    { return "Lime";   }
              case Blue:    { return "Blue";   }
              case White:   { return "White";  }
            }
            return "";
          }
          
          func ToColor(value : MyCategory) : Color
          {
            switch (value)
            {
              case Red:     { return cast Color "#FF0000"; }
              case Lime:    { return cast Color "#00FF00"; }
              case Blue:    { return cast Color "#0000FF"; }
              case White:   { return cast Color "#FFFFFF"; }
            }
            return cast Color "#000000";
          }
          
          func ToString(value : MyGender) : string
          {
            switch (value)
            {
              case Male:    { return "Male";   }
              case Female:  { return "Female"; }
            }
            return "";
          }
          
          func ToString(value : DateTime) : string
          {
            return $"$(value.month)/$(value.day)/$(value.year)";
          }
        }
      ]]>
    </Workflow>
  </Script>
</Resource>