<?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="OlapInitialView">
    <Screen.Attributes>
      <DisplayName
        Value="OLAP: Initial View" />
      <SaveChangesTo
        EntityContainer="NorthwindData" />
    </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="GridTab"
            Kind="Group">
            <ContentItem.Attributes>
              <DisplayName
                Value="Grid View" />
            </ContentItem.Attributes>
            <ContentItem
              Name="OlapGrid"
              Kind="ScreenContent"
              View="Wijmo.LightSwitch:ScreenCustomControl">
              <ContentItem.PropertySources>
                <ControlPropertySource
                  Property="Wijmo.LightSwitch:ScreenCustomControl/Properties[Widget]">
                  <ScreenExpressionTree>
                    <ChainExpression>
                      <ConstantExpression
                        Value="jsongrid"
                        ResultType=":String" />
                    </ChainExpression>
                  </ScreenExpressionTree>
                </ControlPropertySource>
              </ContentItem.PropertySources>
            </ContentItem>
            <ContentItem.CommandItems>
              <ContentItem
                Name="GridSettings"
                Kind="Command">
                <ContentItem.Attributes>
                  <DisplayName
                    Value="Settings" />
                </ContentItem.Attributes>
                <ContentItem.PropertySources>
                  <ControlPropertySource
                    Property="Microsoft.LightSwitch.MobileWeb:RootControl/Properties[Tap]">
                    <ScreenExpressionTree>
                      <ChainExpression>
                        <CallExpression
                          Target="OlapInitialView/Methods[showDialog]">
                          <ArgumentExpression
                            Parameter="dialogName">
                            <ConstantExpression
                              Value="Settings"
                              ResultType=":String" />
                          </ArgumentExpression>
                        </CallExpression>
                      </ChainExpression>
                    </ScreenExpressionTree>
                  </ControlPropertySource>
                  <ControlPropertySource
                    Property="Microsoft.LightSwitch.MobileWeb:RootCommand/Properties[Icon]">
                    <ScreenExpressionTree>
                      <ChainExpression>
                        <ConstantExpression
                          Value="msls-gear"
                          ResultType=":String" />
                      </ChainExpression>
                    </ScreenExpressionTree>
                  </ControlPropertySource>
                </ContentItem.PropertySources>
              </ContentItem>
            </ContentItem.CommandItems>
          </ContentItem>
          <ContentItem
            Name="ChartTab"
            IsHidden="True"
            Kind="Group">
            <ContentItem.Attributes>
              <DisplayName
                Value="Chart View" />
            </ContentItem.Attributes>
            <ContentItem
              Name="OlapChart"
              Kind="ScreenContent"
              View="Wijmo.LightSwitch:ScreenCustomControl">
              <ContentItem.PropertySources>
                <ControlPropertySource
                  Property="Wijmo.LightSwitch:ScreenCustomControl/Properties[Widget]">
                  <ScreenExpressionTree>
                    <ChainExpression>
                      <ConstantExpression
                        Value="jsonchart"
                        ResultType=":String" />
                    </ChainExpression>
                  </ScreenExpressionTree>
                </ControlPropertySource>
              </ContentItem.PropertySources>
            </ContentItem>
            <ContentItem.CommandItems>
              <ContentItem
                Name="ChartSettings"
                Kind="Command">
                <ContentItem.Attributes>
                  <DisplayName
                    Value="Settings" />
                </ContentItem.Attributes>
                <ContentItem.PropertySources>
                  <ControlPropertySource
                    Property="Microsoft.LightSwitch.MobileWeb:RootControl/Properties[Tap]">
                    <ScreenExpressionTree>
                      <ChainExpression>
                        <CallExpression
                          Target="OlapInitialView/Methods[showDialog]">
                          <ArgumentExpression
                            Parameter="dialogName">
                            <ConstantExpression
                              Value="Settings"
                              ResultType=":String" />
                          </ArgumentExpression>
                        </CallExpression>
                      </ChainExpression>
                    </ScreenExpressionTree>
                  </ControlPropertySource>
                  <ControlPropertySource
                    Property="Microsoft.LightSwitch.MobileWeb:RootCommand/Properties[Icon]">
                    <ScreenExpressionTree>
                      <ChainExpression>
                        <ConstantExpression
                          Value="msls-gear"
                          ResultType=":String" />
                      </ChainExpression>
                    </ScreenExpressionTree>
                  </ControlPropertySource>
                </ContentItem.PropertySources>
              </ContentItem>
            </ContentItem.CommandItems>
          </ContentItem>
        </ContentItem>
        <ContentItem
          Name="Popups"
          Kind="Group"
          View="Microsoft.LightSwitch.MobileWeb:DialogPages">
          <ContentItem
            Name="Settings"
            Kind="Group">
            <ContentItem
              Name="Invoices"
              Kind="Collection"
              DataType="CollectionView$Invoice"
              View="Microsoft.LightSwitch.MobileWeb:CollectionCustomControl">
              <ContentItem.DataSource>
                <ScreenExpressionTree>
                  <ChainExpression>
                    <MemberExpression
                      Member="OlapInitialView/Properties[Invoices]" />
                  </ChainExpression>
                </ScreenExpressionTree>
              </ContentItem.DataSource>
              <ContentItem
                Name="InvoicesTemplate"
                Kind="Details"
                DataType="Invoice">
                <ContentItem.DataSource>
                  <ScreenExpressionTree>
                    <ChainExpression />
                  </ScreenExpressionTree>
                </ContentItem.DataSource>
                <ContentItem
                  Name="CustomerName"
                  Kind="Value"
                  DataType=":String">
                  <ContentItem.DataSource>
                    <ScreenExpressionTree>
                      <ChainExpression>
                        <MemberExpression
                          Member="Invoice/Properties[CustomerName]" />
                      </ChainExpression>
                    </ScreenExpressionTree>
                  </ContentItem.DataSource>
                </ContentItem>
                <ContentItem
                  Name="City"
                  Kind="Value"
                  DataType=":String?">
                  <ContentItem.DataSource>
                    <ScreenExpressionTree>
                      <ChainExpression>
                        <MemberExpression
                          Member="Invoice/Properties[City]" />
                      </ChainExpression>
                    </ScreenExpressionTree>
                  </ContentItem.DataSource>
                </ContentItem>
                <ContentItem
                  Name="Region"
                  Kind="Value"
                  DataType=":String?">
                  <ContentItem.DataSource>
                    <ScreenExpressionTree>
                      <ChainExpression>
                        <MemberExpression
                          Member="Invoice/Properties[Region]" />
                      </ChainExpression>
                    </ScreenExpressionTree>
                  </ContentItem.DataSource>
                </ContentItem>
                <ContentItem
                  Name="Country"
                  Kind="Value"
                  DataType=":String?">
                  <ContentItem.DataSource>
                    <ScreenExpressionTree>
                      <ChainExpression>
                        <MemberExpression
                          Member="Invoice/Properties[Country]" />
                      </ChainExpression>
                    </ScreenExpressionTree>
                  </ContentItem.DataSource>
                </ContentItem>
                <ContentItem
                  Name="Salesperson"
                  Kind="Value"
                  DataType=":String">
                  <ContentItem.DataSource>
                    <ScreenExpressionTree>
                      <ChainExpression>
                        <MemberExpression
                          Member="Invoice/Properties[Salesperson]" />
                      </ChainExpression>
                    </ScreenExpressionTree>
                  </ContentItem.DataSource>
                </ContentItem>
                <ContentItem
                  Name="OrderDate"
                  Kind="Value"
                  DataType=":DateTime?">
                  <ContentItem.DataSource>
                    <ScreenExpressionTree>
                      <ChainExpression>
                        <MemberExpression
                          Member="Invoice/Properties[OrderDate]" />
                      </ChainExpression>
                    </ScreenExpressionTree>
                  </ContentItem.DataSource>
                </ContentItem>
                <ContentItem
                  Name="ShipperName"
                  Kind="Value"
                  DataType=":String">
                  <ContentItem.DataSource>
                    <ScreenExpressionTree>
                      <ChainExpression>
                        <MemberExpression
                          Member="Invoice/Properties[ShipperName]" />
                      </ChainExpression>
                    </ScreenExpressionTree>
                  </ContentItem.DataSource>
                </ContentItem>
                <ContentItem
                  Name="ProductName"
                  Kind="Value"
                  DataType=":String">
                  <ContentItem.DataSource>
                    <ScreenExpressionTree>
                      <ChainExpression>
                        <MemberExpression
                          Member="Invoice/Properties[ProductName]" />
                      </ChainExpression>
                    </ScreenExpressionTree>
                  </ContentItem.DataSource>
                </ContentItem>
                <ContentItem
                  Name="UnitPrice"
                  Kind="Value"
                  DataType=":Decimal">
                  <ContentItem.DataSource>
                    <ScreenExpressionTree>
                      <ChainExpression>
                        <MemberExpression
                          Member="Invoice/Properties[UnitPrice]" />
                      </ChainExpression>
                    </ScreenExpressionTree>
                  </ContentItem.DataSource>
                </ContentItem>
                <ContentItem
                  Name="Quantity"
                  Kind="Value"
                  DataType=":Int16">
                  <ContentItem.DataSource>
                    <ScreenExpressionTree>
                      <ChainExpression>
                        <MemberExpression
                          Member="Invoice/Properties[Quantity]" />
                      </ChainExpression>
                    </ScreenExpressionTree>
                  </ContentItem.DataSource>
                </ContentItem>
                <ContentItem
                  Name="Discount"
                  Kind="Value"
                  DataType=":Single">
                  <ContentItem.DataSource>
                    <ScreenExpressionTree>
                      <ChainExpression>
                        <MemberExpression
                          Member="Invoice/Properties[Discount]" />
                      </ChainExpression>
                    </ScreenExpressionTree>
                  </ContentItem.DataSource>
                </ContentItem>
                <ContentItem
                  Name="ExtendedPrice"
                  Kind="Value"
                  DataType=":Decimal?">
                  <ContentItem.DataSource>
                    <ScreenExpressionTree>
                      <ChainExpression>
                        <MemberExpression
                          Member="Invoice/Properties[ExtendedPrice]" />
                      </ChainExpression>
                    </ScreenExpressionTree>
                  </ContentItem.DataSource>
                </ContentItem>
                <ContentItem
                  Name="Freight"
                  Kind="Value"
                  DataType=":Decimal?">
                  <ContentItem.DataSource>
                    <ScreenExpressionTree>
                      <ChainExpression>
                        <MemberExpression
                          Member="Invoice/Properties[Freight]" />
                      </ChainExpression>
                    </ScreenExpressionTree>
                  </ContentItem.DataSource>
                </ContentItem>
              </ContentItem>
            </ContentItem>
            <ContentItem
              Name="Update"
              Kind="Command">
              <ContentItem.Attributes>
                <DisplayName
                  Value="Update Views" />
              </ContentItem.Attributes>
              <ContentItem.PropertySources>
                <ControlPropertySource
                  Property="Microsoft.LightSwitch.MobileWeb:RootControl/Properties[Tap]">
                  <ScreenExpressionTree>
                    <ChainExpression>
                      <CallExpression
                        Target="OlapInitialView/Methods[Update]" />
                    </ChainExpression>
                  </ScreenExpressionTree>
                </ControlPropertySource>
                <ControlPropertySource
                  Property="Microsoft.LightSwitch.MobileWeb:RootControl/Properties[WidthSizingMode]">
                  <ScreenExpressionTree>
                    <ChainExpression>
                      <ConstantExpression
                        Value="StretchToContainer"
                        ResultType=":String" />
                    </ChainExpression>
                  </ScreenExpressionTree>
                </ControlPropertySource>
              </ContentItem.PropertySources>
            </ContentItem>
          </ContentItem>
        </ContentItem>
        <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>
      <ScreenMethod
        Name="Update" />
    </Screen.Methods>
    <Screen.Properties>
      <ScreenCollectionProperty
        Name="Invoices"
        PageSize="1"
        PropertyType="CollectionView$Invoice">
        <ScreenCollectionProperty.Query>
          <ScreenQueryDefinition
            Name="InvoicesQuery"
            ReturnType="Invoice*">
            <ScreenQueryDefinition.FilterExpression>
              <QueryFilterExpressionTree />
            </ScreenQueryDefinition.FilterExpression>
            <ScreenQueryDefinition.Source>
              <QuerySourceExpressionTree>
                <MemberExpression
                  Member="NorthwindData/Members[Invoices]" />
              </QuerySourceExpressionTree>
            </ScreenQueryDefinition.Source>
          </ScreenQueryDefinition>
        </ScreenCollectionProperty.Query>
        <ScreenExpressionTree>
          <ChainExpression>
            <CallExpression
              Target="OlapInitialView/Properties[Invoices]/Query" />
          </ChainExpression>
        </ScreenExpressionTree>
      </ScreenCollectionProperty>
      <ScreenProperty
        Name="RowField"
        PropertyType=":String?" />
      <ScreenProperty
        Name="ColumnField"
        PropertyType=":String?" />
      <ScreenProperty
        Name="ValueField"
        PropertyType=":String?" />
      <ScreenProperty
        Name="ShowTotals"
        PropertyType=":String?" />
    </Screen.Properties>
  </Screen>
  <Application.Methods>
    <ApplicationMethod
      Name="showOlapInitialView">
      <ApplicationMethod.Attributes>
        <ShowScreenMethod
          TargetScreen="OlapInitialView" />
      </ApplicationMethod.Attributes>
    </ApplicationMethod>
  </Application.Methods>
</Application>