<?xml version="1.0" encoding="utf-8"?>
<Application
  Name="LightSwitchApplication.HowTo.HTMLClient" xmlns="http://schemas.microsoft.com/LightSwitch/2010/xaml/model">
  <Application.Attributes>
    <Partial />
  </Application.Attributes>
  <Screen
    Name="LinearGaugeDirection">
    <Screen.Attributes>
      <SaveChangesTo
        EntityContainer="ApplicationData" />
    </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="FruitList"
            Kind="Group">
            <ContentItem
              Name="Fruits"
              Kind="Collection"
              DataType="CollectionView$Fruit"
              View="Microsoft.LightSwitch.MobileWeb:TileList">
              <ContentItem.Attributes>
                <DisplayName
                  Value="Fruits" />
              </ContentItem.Attributes>
              <ContentItem.DataSource>
                <ScreenExpressionTree>
                  <ChainExpression>
                    <MemberExpression
                      Member="LinearGaugeDirection/Properties[Fruits]" />
                  </ChainExpression>
                </ScreenExpressionTree>
              </ContentItem.DataSource>
              <ContentItem
                Name="rows"
                Kind="Details"
                DataType="Fruit"
                View="Microsoft.LightSwitch.MobileWeb:RowsLayout">
                <ContentItem.Attributes>
                  <DisplayName
                    Value="rows" />
                </ContentItem.Attributes>
                <ContentItem.DataSource>
                  <ScreenExpressionTree>
                    <ChainExpression />
                  </ScreenExpressionTree>
                </ContentItem.DataSource>
                <ContentItem
                  Name="Name"
                  Kind="Value"
                  DataType=":String?">
                  <ContentItem.DataSource>
                    <ScreenExpressionTree>
                      <ChainExpression>
                        <MemberExpression
                          Member="Fruit/Properties[Name]" />
                      </ChainExpression>
                    </ScreenExpressionTree>
                  </ContentItem.DataSource>
                  <ContentItem.PropertySources>
                    <ControlPropertySource
                      Property="Microsoft.LightSwitch.MobileWeb:RootControl/Properties[FontStyle]">
                      <ScreenExpressionTree>
                        <ChainExpression>
                          <ConstantExpression
                            Value="Large"
                            ResultType=":String" />
                        </ChainExpression>
                      </ScreenExpressionTree>
                    </ControlPropertySource>
                    <ControlPropertySource
                      Property="Microsoft.LightSwitch.MobileWeb:RootControl/Properties[AttachedLabelPosition]">
                      <ScreenExpressionTree>
                        <ChainExpression>
                          <ConstantExpression
                            Value="Top"
                            ResultType=":String" />
                        </ChainExpression>
                      </ScreenExpressionTree>
                    </ControlPropertySource>
                  </ContentItem.PropertySources>
                </ContentItem>
                <ContentItem
                  Name="Group"
                  Kind="Group">
                  <ContentItem
                    Name="LinearGauge"
                    Kind="Value"
                    DataType=":Int32?"
                    View="Wijmo.CBA.BulletGraph:ValueCustomControl">
                    <ContentItem.Attributes>
                      <DisplayName
                        Value="Price (LinearGauge)" />
                    </ContentItem.Attributes>
                    <ContentItem.DataSource>
                      <ScreenExpressionTree>
                        <ChainExpression>
                          <MemberExpression
                            Member="Fruit/Properties[AprPrice]" />
                        </ChainExpression>
                      </ScreenExpressionTree>
                    </ContentItem.DataSource>
                    <ContentItem.PropertySources>
                      <ControlPropertySource
                        Property="Microsoft.LightSwitch.MobileWeb:RootControl/Properties[FontStyle]">
                        <ScreenExpressionTree>
                          <ChainExpression>
                            <ConstantExpression
                              Value="Small"
                              ResultType=":String" />
                          </ChainExpression>
                        </ScreenExpressionTree>
                      </ControlPropertySource>
                      <ControlPropertySource
                        Property="Microsoft.LightSwitch.MobileWeb:RootControl/Properties[AttachedLabelPosition]">
                        <ScreenExpressionTree>
                          <ChainExpression>
                            <ConstantExpression
                              Value="Top"
                              ResultType=":String" />
                          </ChainExpression>
                        </ScreenExpressionTree>
                      </ControlPropertySource>
                      <ControlPropertySource
                        Property="Wijmo.CBA.LinearGauge:ValueCustomControl/Properties[max]">
                        <ScreenExpressionTree>
                          <ChainExpression>
                            <ConstantExpression
                              Value="10"
                              ResultType=":Double" />
                          </ChainExpression>
                        </ScreenExpressionTree>
                      </ControlPropertySource>
                      <ControlPropertySource
                        Property="Microsoft.LightSwitch.MobileWeb:RootControl/Properties[MaxWidth]">
                        <ScreenExpressionTree>
                          <ChainExpression>
                            <ConstantExpression
                              Value="210"
                              ResultType=":Double" />
                          </ChainExpression>
                        </ScreenExpressionTree>
                      </ControlPropertySource>
                      <ControlPropertySource
                        Property="Wijmo.CBA.BulletGraph:ValueCustomControl/Properties[max]">
                        <ScreenExpressionTree>
                          <ChainExpression>
                            <ConstantExpression
                              Value="10"
                              ResultType=":Double" />
                          </ChainExpression>
                        </ScreenExpressionTree>
                      </ControlPropertySource>
                    </ContentItem.PropertySources>
                  </ContentItem>
                  <ContentItem.PropertySources>
                    <ControlPropertySource
                      Property="Microsoft.LightSwitch.MobileWeb:RootControl/Properties[Height]">
                      <ScreenExpressionTree>
                        <ChainExpression>
                          <ConstantExpression
                            Value="64"
                            ResultType=":Double" />
                        </ChainExpression>
                      </ScreenExpressionTree>
                    </ControlPropertySource>
                    <ControlPropertySource
                      Property="Microsoft.LightSwitch.MobileWeb:RootControl/Properties[MinHeight]">
                      <ScreenExpressionTree>
                        <ChainExpression>
                          <ConstantExpression
                            Value="64"
                            ResultType=":Double" />
                        </ChainExpression>
                      </ScreenExpressionTree>
                    </ControlPropertySource>
                  </ContentItem.PropertySources>
                </ContentItem>
                <ContentItem.PropertySources>
                  <ControlPropertySource
                    Property="Microsoft.LightSwitch.MobileWeb:TileList/Properties[IsDynamicTile]">
                    <ScreenExpressionTree>
                      <ChainExpression>
                        <ConstantExpression
                          Value="False"
                          ResultType=":Boolean" />
                      </ChainExpression>
                    </ScreenExpressionTree>
                  </ControlPropertySource>
                </ContentItem.PropertySources>
              </ContentItem>
              <ContentItem.PropertySources>
                <ControlPropertySource
                  Property="Microsoft.LightSwitch.MobileWeb:RootCollectionControl/Properties[ItemTap]">
                  <ScreenExpressionTree>
                    <ChainExpression>
                      <MemberExpression
                        Member="LinearGaugeDirection/Properties[Fruits]" />
                      <CallExpression
                        Target="viewSelected" />
                    </ChainExpression>
                  </ScreenExpressionTree>
                </ControlPropertySource>
              </ContentItem.PropertySources>
            </ContentItem>
            <ContentItem
              Name="Settings"
              Kind="Group"
              View="Microsoft.LightSwitch.MobileWeb:ColumnsLayout">
              <ContentItem
                Name="Direction"
                Kind="ScreenContent">
                <ContentItem.PropertySources>
                  <ControlPropertySource
                    Property="Microsoft.LightSwitch.MobileWeb:RootControl/Properties[WidthSizingMode]">
                    <ScreenExpressionTree>
                      <ChainExpression>
                        <ConstantExpression
                          Value="FixedSize"
                          ResultType=":String" />
                      </ChainExpression>
                    </ScreenExpressionTree>
                  </ControlPropertySource>
                  <ControlPropertySource
                    Property="Microsoft.LightSwitch.MobileWeb:RootControl/Properties[Width]">
                    <ScreenExpressionTree>
                      <ChainExpression>
                        <ConstantExpression
                          Value="120"
                          ResultType=":Double" />
                      </ChainExpression>
                    </ScreenExpressionTree>
                  </ControlPropertySource>
                </ContentItem.PropertySources>
              </ContentItem>
            </ContentItem>
            <ContentItem.CommandItems>
              <ContentItem
                Name="SearchFruits"
                Kind="Command">
                <ContentItem.Attributes>
                  <DisplayName
                    Value="Search" />
                </ContentItem.Attributes>
                <ContentItem.PropertySources>
                  <ControlPropertySource
                    Property="Microsoft.LightSwitch.MobileWeb:RootControl/Properties[Tap]">
                    <ScreenExpressionTree>
                      <ChainExpression>
                        <MemberExpression
                          Member="LinearGaugeDirection/Properties[Fruits]" />
                        <CallExpression
                          Target="showSearch" />
                      </ChainExpression>
                    </ScreenExpressionTree>
                  </ControlPropertySource>
                  <ControlPropertySource
                    Property="Microsoft.LightSwitch.MobileWeb:RootCommand/Properties[Icon]">
                    <ScreenExpressionTree>
                      <ChainExpression>
                        <ConstantExpression
                          Value="msls-search"
                          ResultType="Microsoft.LightSwitch:String" />
                      </ChainExpression>
                    </ScreenExpressionTree>
                  </ControlPropertySource>
                </ContentItem.PropertySources>
              </ContentItem>
            </ContentItem.CommandItems>
          </ContentItem>
          <ContentItem.PropertySources>
            <ControlPropertySource
              Property="Microsoft.LightSwitch.MobileWeb:RootControl/Properties[BrowseOnly]">
              <ScreenExpressionTree>
                <ChainExpression>
                  <ConstantExpression
                    Value="True"
                    ResultType=":Boolean" />
                </ChainExpression>
              </ScreenExpressionTree>
            </ControlPropertySource>
          </ContentItem.PropertySources>
        </ContentItem>
        <ContentItem
          Name="Popups"
          Kind="Group"
          View="Microsoft.LightSwitch.MobileWeb:DialogPages" />
      </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="Fruits"
        PageSize="45"
        PropertyType="CollectionView$Fruit">
        <ScreenCollectionProperty.Query>
          <ScreenQueryDefinition
            Name="FruitsQuery"
            ReturnType="Fruit*">
            <ScreenQueryDefinition.FilterExpression>
              <QueryFilterExpressionTree>
                <BinaryExpression
                  NodeType="LessThanOrEqual">
                  <BinaryExpression.Left>
                    <ChainExpression>
                      <MemberExpression
                        Member="Fruit/Properties[Id]" />
                    </ChainExpression>
                  </BinaryExpression.Left>
                  <BinaryExpression.Right>
                    <ConstantExpression
                      Value="3"
                      ResultType=":Int32" />
                  </BinaryExpression.Right>
                </BinaryExpression>
              </QueryFilterExpressionTree>
            </ScreenQueryDefinition.FilterExpression>
            <ScreenQueryDefinition.Source>
              <QuerySourceExpressionTree>
                <MemberExpression
                  Member="ApplicationData/Members[Fruits]" />
              </QuerySourceExpressionTree>
            </ScreenQueryDefinition.Source>
          </ScreenQueryDefinition>
        </ScreenCollectionProperty.Query>
        <ScreenExpressionTree>
          <ChainExpression>
            <CallExpression
              Target="LinearGaugeDirection/Properties[Fruits]/Query" />
          </ChainExpression>
        </ScreenExpressionTree>
      </ScreenCollectionProperty>
    </Screen.Properties>
  </Screen>
  <Application.Methods>
    <ApplicationMethod
      Name="showLinearGaugeDirection">
      <ApplicationMethod.Attributes>
        <ShowScreenMethod
          TargetScreen="LinearGaugeDirection" />
      </ApplicationMethod.Attributes>
    </ApplicationMethod>
  </Application.Methods>
</Application>