<?xml version="1.0" encoding="utf-8"?>
<Application
  Name="LightSwitchApplication.HowTo" xmlns="http://schemas.microsoft.com/LightSwitch/2010/xaml/model">
  <Application.Attributes>
    <Partial />
  </Application.Attributes>
  <Screen
    Name="GridFormatColumn">
    <Screen.Attributes>
      <SaveChangesTo
        EntityContainer="DemoServiceData" />
      <DisplayName
        Value="GRID: Format Column" />
    </Screen.Attributes>
    <Screen.RootContentItem>
      <ContentItem
        Name="RootContentItem"
        Kind="Screen"
        View="Microsoft.LightSwitch.MobileWeb:Screen">
        <ContentItem
          Name="Tabs"
          Kind="Group"
          View="Microsoft.LightSwitch.MobileWeb:TabPages">
          <ContentItem
            Name="Item List"
            Kind="Group">
            <ContentItem
              Name="WijmoGrid"
              Kind="Collection"
              DataType="CollectionView$GDPItem"
              View="Wijmo.LightSwitch:CollectionCustomControl">
              <ContentItem.DataSource>
                <ScreenExpressionTree>
                  <ChainExpression>
                    <MemberExpression
                      Member="GridFormatColumn/Properties[GDPItems]" />
                  </ChainExpression>
                </ScreenExpressionTree>
              </ContentItem.DataSource>
              <ContentItem
                Name="RowTemplate"
                Kind="Details"
                DataType="GDPItem">
                <ContentItem.DataSource>
                  <ScreenExpressionTree>
                    <ChainExpression />
                  </ScreenExpressionTree>
                </ContentItem.DataSource>
                <ContentItem
                  Name="FIPS"
                  Kind="Value"
                  DataType=":Int32">
                  <ContentItem.DataSource>
                    <ScreenExpressionTree>
                      <ChainExpression>
                        <MemberExpression
                          Member="GDPItem/Properties[FIPS]" />
                      </ChainExpression>
                    </ScreenExpressionTree>
                  </ContentItem.DataSource>
                </ContentItem>
                <ContentItem
                  Name="GeoName"
                  Kind="Value"
                  DataType=":String?">
                  <ContentItem.DataSource>
                    <ScreenExpressionTree>
                      <ChainExpression>
                        <MemberExpression
                          Member="GDPItem/Properties[GeoName]" />
                      </ChainExpression>
                    </ScreenExpressionTree>
                  </ContentItem.DataSource>
                </ContentItem>
                <ContentItem
                  Name="IndustryID"
                  Kind="Value"
                  DataType=":Int32">
                  <ContentItem.DataSource>
                    <ScreenExpressionTree>
                      <ChainExpression>
                        <MemberExpression
                          Member="GDPItem/Properties[IndustryID]" />
                      </ChainExpression>
                    </ScreenExpressionTree>
                  </ContentItem.DataSource>
                </ContentItem>
                <ContentItem
                  Name="IndustryName"
                  Kind="Value"
                  DataType=":String?">
                  <ContentItem.DataSource>
                    <ScreenExpressionTree>
                      <ChainExpression>
                        <MemberExpression
                          Member="GDPItem/Properties[IndustryName]" />
                      </ChainExpression>
                    </ScreenExpressionTree>
                  </ContentItem.DataSource>
                </ContentItem>
                <ContentItem
                  Name="Year"
                  Kind="Value"
                  DataType=":Int32">
                  <ContentItem.DataSource>
                    <ScreenExpressionTree>
                      <ChainExpression>
                        <MemberExpression
                          Member="GDPItem/Properties[Year]" />
                      </ChainExpression>
                    </ScreenExpressionTree>
                  </ContentItem.DataSource>
                </ContentItem>
                <ContentItem
                  Name="Value"
                  Kind="Value"
                  DataType=":Double">
                  <ContentItem.DataSource>
                    <ScreenExpressionTree>
                      <ChainExpression>
                        <MemberExpression
                          Member="GDPItem/Properties[Value]" />
                      </ChainExpression>
                    </ScreenExpressionTree>
                  </ContentItem.DataSource>
                </ContentItem>
              </ContentItem>
            </ContentItem>
          </ContentItem>
        </ContentItem>
        <ContentItem
          Name="Popups"
          Kind="Group"
          View="Microsoft.LightSwitch.MobileWeb:DialogPages" />
        <ContentItem.PropertySources>
          <ControlPropertySource
            Property="Microsoft.LightSwitch.MobileWeb:Screen/Properties[ScreenType]">
            <ScreenExpressionTree>
              <ChainExpression>
                <ConstantExpression
                  Value="Browse"
                  ResultType=":String" />
              </ChainExpression>
            </ScreenExpressionTree>
          </ControlPropertySource>
        </ContentItem.PropertySources>
      </ContentItem>
    </Screen.RootContentItem>
    <Screen.Methods>
      <ScreenMethod
        Name="showTab">
        <ScreenMethod.Attributes>
          <DisplayMethodByDefault
            Display="True" />
          <Generated />
        </ScreenMethod.Attributes>
        <ScreenMethodParameter
          Name="tabName"
          ParameterType=":String" />
      </ScreenMethod>
      <ScreenMethod
        Name="showDialog">
        <ScreenMethod.Attributes>
          <DisplayMethodByDefault
            Display="True" />
          <Generated />
        </ScreenMethod.Attributes>
        <ScreenMethodParameter
          Name="dialogName"
          ParameterType=":String" />
      </ScreenMethod>
    </Screen.Methods>
    <Screen.Properties>
      <ScreenCollectionProperty
        Name="GDPItems"
        DisableSearch="True"
        PageSize="45"
        PropertyType="CollectionView$GDPItem">
        <ScreenCollectionProperty.Query>
          <ScreenQueryDefinition
            Name="GDPItemsQuery"
            ReturnType="GDPItem*">
            <ScreenQueryDefinition.FilterExpression>
              <QueryFilterExpressionTree />
            </ScreenQueryDefinition.FilterExpression>
            <ScreenQueryDefinition.Source>
              <QuerySourceExpressionTree>
                <MemberExpression
                  Member="DemoServiceData/Members[GDPItems]" />
              </QuerySourceExpressionTree>
            </ScreenQueryDefinition.Source>
          </ScreenQueryDefinition>
        </ScreenCollectionProperty.Query>
        <ScreenExpressionTree>
          <ChainExpression>
            <CallExpression
              Target="GridFormatColumn/Properties[GDPItems]/Query" />
          </ChainExpression>
        </ScreenExpressionTree>
      </ScreenCollectionProperty>
    </Screen.Properties>
  </Screen>
  <Application.Methods>
    <ApplicationMethod
      Name="showGridFormatColumn">
      <ApplicationMethod.Attributes>
        <ShowScreenMethod
          TargetScreen="GridFormatColumn" />
      </ApplicationMethod.Attributes>
    </ApplicationMethod>
  </Application.Methods>
</Application>