<?xml version="1.0" encoding="utf-8"?>
<Include
    xmlns="www.team-mediaportal.com/2008/mpf/directx"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Source="screens\master_configuration_menu.xaml"
    >
  <Include.Resources>

    <!-- Shares configuration model -->
    <Model x:Key="Model" Id="1768FC91-86B9-4f78-8A4C-E204F0D51502"/>

    <!-- Header -->
    <ResourceWrapper x:Key="Header_Text" EnableBindings="True"
        Resource="{Binding Source={StaticResource Model},Path=ShareProxy.ConfigShareTitle,Mode=OneTime}"/>

    <!-- Contents -->
    <ControlTemplate x:Key="Contents_Template">
      <Grid Margin="10" DataContext="{Binding Source={StaticResource Model}}">
        <Grid.RowDefinitions>
          <RowDefinition Height="Auto"/>
          <RowDefinition Height="*"/>
          <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Label Grid.Row="0" Content="[SharesConfig.ChooseShareCategories]" Color="{ThemeResource TextColor}" Wrap="True"/>
        <TreeView Grid.Row="1" Margin="0,10,0,0"
            Style="{ThemeResource MultiMarkableExpandedTreeViewStyle}"
            ItemsSource="{Binding Path=ShareProxy.AllMediaCategories,Mode=OneTime}"/>
        <Grid Grid.Row="2" Margin="10,10,10,0">
          <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
          </Grid.RowDefinitions>
          <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="10"/>
            <ColumnDefinition Width="*"/>
          </Grid.ColumnDefinitions>
          <Button x:Name="BackButton" Grid.Row="0" Grid.Column="0" Style="{ThemeResource DialogButtonStyle}"
              Content="[System.Back]"
              Command="{Command Source={Service WorkflowManager},Path=NavigatePop,Parameters=1}"/>
          <Button x:Name="FinishButton" Grid.Row="0" Grid.Column="2" Style="{ThemeResource DialogButtonStyle}"
              Content="[System.Finish]" IsEnabled="{Binding ShareProxy.IsMediaCategoriesSelected}"
              Command="{Command Source={StaticResource Model},Path=FinishShareConfiguration}"/>
        </Grid>
      </Grid>
    </ControlTemplate>

  </Include.Resources>
</Include>
