<?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="DropDownFilter">
    <Screen.Attributes>
      <SaveChangesTo
        EntityContainer="NorthwindData" />
      <DisplayName
        Value="DROP DOWN: Filter" />
    </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="RegionList"
            Kind="Group"
            View="Microsoft.LightSwitch.MobileWeb:ColumnsLayout">
            <ContentItem
              Name="Group"
              Kind="Group">
              <ContentItem
                Name="Categories"
                Kind="Collection"
                DataType="CollectionView$Category"
                View="Wijmo.LightSwitch:CollectionCustomControl">
                <ContentItem.DataSource>
                  <ScreenExpressionTree>
                    <ChainExpression>
                      <MemberExpression
                        Member="DropDownFilter/Properties[Categories]" />
                    </ChainExpression>
                  </ScreenExpressionTree>
                </ContentItem.DataSource>
                <ContentItem
                  Name="CategoriesTemplate"
                  Kind="Details"
                  DataType="Category">
                  <ContentItem.DataSource>
                    <ScreenExpressionTree>
                      <ChainExpression />
                    </ScreenExpressionTree>
                  </ContentItem.DataSource>
                  <ContentItem
                    Name="CategoryName"
                    Kind="Value"
                    DataType=":String">
                    <ContentItem.DataSource>
                      <ScreenExpressionTree>
                        <ChainExpression>
                          <MemberExpression
                            Member="Category/Properties[CategoryName]" />
                        </ChainExpression>
                      </ScreenExpressionTree>
                    </ContentItem.DataSource>
                  </ContentItem>
                  <ContentItem
                    Name="CategoryID"
                    Kind="Value"
                    DataType=":Int32">
                    <ContentItem.DataSource>
                      <ScreenExpressionTree>
                        <ChainExpression>
                          <MemberExpression
                            Member="Category/Properties[CategoryID]" />
                        </ChainExpression>
                      </ScreenExpressionTree>
                    </ContentItem.DataSource>
                  </ContentItem>
                </ContentItem>
                <ContentItem.PropertySources>
                  <ControlPropertySource
                    Property="Wijmo.LightSwitch:CollectionCustomControl/Properties[Widget]">
                    <ScreenExpressionTree>
                      <ChainExpression>
                        <ConstantExpression
                          Value="htmlselect"
                          ResultType=":String" />
                      </ChainExpression>
                    </ScreenExpressionTree>
                  </ControlPropertySource>
                  <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="400"
                          ResultType=":Double" />
                      </ChainExpression>
                    </ScreenExpressionTree>
                  </ControlPropertySource>
                </ContentItem.PropertySources>
              </ContentItem>
              <ContentItem
                Name="Products"
                Kind="Collection"
                DataType="CollectionView$Product"
                View="Wijmo.LightSwitch:CollectionCustomControl">
                <ContentItem.DataSource>
                  <ScreenExpressionTree>
                    <ChainExpression>
                      <MemberExpression
                        Member="DropDownFilter/Properties[Products]" />
                    </ChainExpression>
                  </ScreenExpressionTree>
                </ContentItem.DataSource>
                <ContentItem
                  Name="ProductsTemplate"
                  Kind="Details"
                  DataType="Product">
                  <ContentItem.DataSource>
                    <ScreenExpressionTree>
                      <ChainExpression />
                    </ScreenExpressionTree>
                  </ContentItem.DataSource>
                  <ContentItem
                    Name="ProductName"
                    Kind="Value"
                    DataType=":String">
                    <ContentItem.DataSource>
                      <ScreenExpressionTree>
                        <ChainExpression>
                          <MemberExpression
                            Member="Product/Properties[ProductName]" />
                        </ChainExpression>
                      </ScreenExpressionTree>
                    </ContentItem.DataSource>
                  </ContentItem>
                  <ContentItem
                    Name="ProductID"
                    Kind="Value"
                    DataType=":Int32">
                    <ContentItem.DataSource>
                      <ScreenExpressionTree>
                        <ChainExpression>
                          <MemberExpression
                            Member="Product/Properties[ProductID]" />
                        </ChainExpression>
                      </ScreenExpressionTree>
                    </ContentItem.DataSource>
                  </ContentItem>
                </ContentItem>
                <ContentItem.PropertySources>
                  <ControlPropertySource
                    Property="Wijmo.LightSwitch:CollectionCustomControl/Properties[Widget]">
                    <ScreenExpressionTree>
                      <ChainExpression>
                        <ConstantExpression
                          Value="htmlselect"
                          ResultType=":String" />
                      </ChainExpression>
                    </ScreenExpressionTree>
                  </ControlPropertySource>
                  <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="400"
                          ResultType=":Double" />
                      </ChainExpression>
                    </ScreenExpressionTree>
                  </ControlPropertySource>
                </ContentItem.PropertySources>
              </ContentItem>
              <ContentItem
                Name="Group1"
                Kind="Group"
                View="Microsoft.LightSwitch.MobileWeb:ColumnsLayout">
                <ContentItem
                  Name="Products_selectedItem_UnitsInStock"
                  Kind="Value"
                  DataType=":Int16?"
                  View="Wijmo.LightSwitch:ValueCustomControl">
                  <ContentItem.DataSource>
                    <ScreenExpressionTree>
                      <ChainExpression>
                        <MemberExpression
                          Member="DropDownFilter/Properties[Products]" />
                        <MemberExpression
                          Member="selectedItem" />
                        <MemberExpression
                          Member="UnitsInStock" />
                      </ChainExpression>
                    </ScreenExpressionTree>
                  </ContentItem.DataSource>
                  <ContentItem.PropertySources>
                    <ControlPropertySource
                      Property="Wijmo.LightSwitch:ValueCustomControl/Properties[Widget]">
                      <ScreenExpressionTree>
                        <ChainExpression>
                          <ConstantExpression
                            Value="wijradialgauge"
                            ResultType=":String" />
                        </ChainExpression>
                      </ScreenExpressionTree>
                    </ControlPropertySource>
                  </ContentItem.PropertySources>
                </ContentItem>
                <ContentItem
                  Name="Products_selectedItem_UnitsOnOrder"
                  Kind="Value"
                  DataType=":Int16?"
                  View="Wijmo.LightSwitch:ValueCustomControl">
                  <ContentItem.DataSource>
                    <ScreenExpressionTree>
                      <ChainExpression>
                        <MemberExpression
                          Member="DropDownFilter/Properties[Products]" />
                        <MemberExpression
                          Member="selectedItem" />
                        <MemberExpression
                          Member="UnitsOnOrder" />
                      </ChainExpression>
                    </ScreenExpressionTree>
                  </ContentItem.DataSource>
                  <ContentItem.PropertySources>
                    <ControlPropertySource
                      Property="Wijmo.LightSwitch:ValueCustomControl/Properties[Widget]">
                      <ScreenExpressionTree>
                        <ChainExpression>
                          <ConstantExpression
                            Value="wijradialgauge"
                            ResultType=":String" />
                        </ChainExpression>
                      </ScreenExpressionTree>
                    </ControlPropertySource>
                  </ContentItem.PropertySources>
                </ContentItem>
              </ContentItem>
              <ContentItem
                Name="Products_selectedItem_ReorderLevel"
                Kind="Value"
                DataType=":Int16?"
                View="Wijmo.LightSwitch:ValueCustomControl">
                <ContentItem.DataSource>
                  <ScreenExpressionTree>
                    <ChainExpression>
                      <MemberExpression
                        Member="DropDownFilter/Properties[Products]" />
                      <MemberExpression
                        Member="selectedItem" />
                      <MemberExpression
                        Member="ReorderLevel" />
                    </ChainExpression>
                  </ScreenExpressionTree>
                </ContentItem.DataSource>
                <ContentItem.PropertySources>
                  <ControlPropertySource
                    Property="Wijmo.LightSwitch:ValueCustomControl/Properties[Widget]">
                    <ScreenExpressionTree>
                      <ChainExpression>
                        <ConstantExpression
                          Value="wijrating"
                          ResultType=":String" />
                      </ChainExpression>
                    </ScreenExpressionTree>
                  </ControlPropertySource>
                </ContentItem.PropertySources>
              </ContentItem>
            </ContentItem>
          </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.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="Categories"
        PageSize="45"
        PropertyType="CollectionView$Category">
        <ScreenCollectionProperty.Query>
          <ScreenQueryDefinition
            Name="CategoriesQuery"
            ReturnType="Category*">
            <ScreenQueryDefinition.FilterExpression>
              <QueryFilterExpressionTree />
            </ScreenQueryDefinition.FilterExpression>
            <ScreenQueryDefinition.Source>
              <QuerySourceExpressionTree>
                <MemberExpression
                  Member="NorthwindData/Members[Categories]" />
              </QuerySourceExpressionTree>
            </ScreenQueryDefinition.Source>
          </ScreenQueryDefinition>
        </ScreenCollectionProperty.Query>
        <ScreenExpressionTree>
          <ChainExpression>
            <CallExpression
              Target="DropDownFilter/Properties[Categories]/Query" />
          </ChainExpression>
        </ScreenExpressionTree>
      </ScreenCollectionProperty>
      <ScreenCollectionProperty
        Name="Products"
        PageSize="45"
        PropertyType="CollectionView$Product">
        <ScreenCollectionProperty.Query>
          <ScreenQueryDefinition
            Name="ProductsQuery"
            ReturnType="Product*">
            <ScreenQueryDefinition.FilterExpression>
              <QueryFilterExpressionTree />
            </ScreenQueryDefinition.FilterExpression>
            <ScreenQueryDefinition.Source>
              <QuerySourceExpressionTree>
                <ChainExpression>
                  <MemberExpression
                    Member="DropDownFilter/Properties[Categories]" />
                  <MemberExpression
                    Member="selectedItem" />
                  <MemberExpression
                    Member="Products" />
                </ChainExpression>
              </QuerySourceExpressionTree>
            </ScreenQueryDefinition.Source>
          </ScreenQueryDefinition>
        </ScreenCollectionProperty.Query>
        <ScreenExpressionTree>
          <ChainExpression>
            <CallExpression
              Target="DropDownFilter/Properties[Products]/Query" />
          </ChainExpression>
        </ScreenExpressionTree>
      </ScreenCollectionProperty>
    </Screen.Properties>
  </Screen>
  <Application.Methods>
    <ApplicationMethod
      Name="showDropDownFilter">
      <ApplicationMethod.Attributes>
        <ShowScreenMethod
          TargetScreen="DropDownFilter" />
      </ApplicationMethod.Attributes>
    </ApplicationMethod>
  </Application.Methods>
</Application>