<!-- 
This resource dictionary is used by the MainWindow. 
-->
<ResourceDictionary
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:vm="clr-namespace:TradeBlotter.ViewModels"
  xmlns:vw="clr-namespace:TradeBlotter.Views"
  xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
  >

  <DataTemplate DataType="{x:Type vm:DividendRiskParityViewModel}">
    <vw:DividendRiskParityView />
  </DataTemplate>

  <DataTemplate DataType="{x:Type vm:FeedStatisticsViewModel}">
    <vw:FeedStatisticsView />
  </DataTemplate>
  
  <DataTemplate DataType="{x:Type vm:DividendPaymentViewModel}">
        <vw:DividendPaymentView />
    </DataTemplate>
    
    <DataTemplate DataType="{x:Type vm:WatchListViewModel}">
		<vw:WatchListView />
	</DataTemplate>

  <DataTemplate DataType="{x:Type vm:CMTTrendViewModel}">
    <vw:CMTTrendView />
  </DataTemplate>

  <DataTemplate DataType="{x:Type vm:MomentumViewModel}">
		<vw:MomentumView />
	</DataTemplate>

  <DataTemplate DataType="{x:Type vm:MGSHMomentumViewModel}">
    <vw:MGSHMomentumView />
  </DataTemplate>

  <DataTemplate DataType="{x:Type vm:CMMomentumViewModel}">
    <vw:CMMomentumView />
  </DataTemplate>

  <DataTemplate DataType="{x:Type vm:HeadlinesViewModel}">
		<vw:HeadlinesView />
	</DataTemplate>

	<DataTemplate DataType="{x:Type vm:OptionsWorksheetViewModel}">
    <vw:OptionsWorksheetView />
  </DataTemplate>

  <DataTemplate DataType="{x:Type vm:DividendHistoryViewModel}">
    <vw:DividendView />
  </DataTemplate>

  <DataTemplate DataType="{x:Type vm:EarningsAnnouncementViewModel}">
    <vw:EarningsAnnouncementView />
  </DataTemplate>

  <DataTemplate DataType="{x:Type vm:PricingViewModel}">
    <vw:PricingView />
  </DataTemplate>

  <DataTemplate DataType="{x:Type vm:BlotterViewModel}">
    <vw:BlotterView />
  </DataTemplate>

  <DataTemplate DataType="{x:Type vm:SectorViewModel}">
    <vw:SectorView />
  </DataTemplate>

  <DataTemplate DataType="{x:Type vm:RiskProfileViewModel}">
    <vw:RiskProfileView />
  </DataTemplate>

  <DataTemplate DataType="{x:Type vm:TradeEntryViewModel}">
    <vw:TradeEntryView />
  </DataTemplate>

  <DataTemplate DataType="{x:Type vm:BollingerBandViewModel}">
        <vw:BollingerBandView />
  </DataTemplate>

  <DataTemplate DataType="{x:Type vm:BollingerBandPositionViewModel}">
    <vw:BollingerBandPositionView />
  </DataTemplate>

  <DataTemplate DataType="{x:Type vm:YieldCurveViewModel}">
        <vw:YieldCurveView />
  </DataTemplate>
    
  <DataTemplate DataType="{x:Type vm:StochasticsViewModel}">
        <vw:StochasticsView />
  </DataTemplate>

	<DataTemplate DataType="{x:Type vm:RSIViewModel}">
		<vw:RSIView />
	</DataTemplate>

	<DataTemplate DataType="{x:Type vm:MovingAverageViewModel}">
     <vw:MovingAverageView />
  </DataTemplate>
    
  <DataTemplate DataType="{x:Type vm:MACDViewModel}">
     <vw:MACDView />
  </DataTemplate>

  <DataTemplate DataType="{x:Type vm:HistoricalViewModel}">
    <vw:HistoricalView />
  </DataTemplate>

  <DataTemplate DataType="{x:Type vm:ValuationsViewModel}">
    <vw:ValuationsView />
  </DataTemplate>

  <DataTemplate DataType="{x:Type vm:SECFilingViewModel}">
    <vw:SECFilingView />
  </DataTemplate>

  <DataTemplate DataType="{x:Type vm:ResistanceAndSupportViewModel}">
    <vw:ResistanceAndSupportView />
  </DataTemplate>

  <DataTemplate DataType="{x:Type vm:GainLossViewModel}">
    <vw:GainLossView />
  </DataTemplate>

  <DataTemplate DataType="{x:Type vm:TradeModelViewModel}">
    <vw:TradeModelView />
  </DataTemplate>

  <DataTemplate DataType="{x:Type vm:ETFHoldingViewModel}">
    <vw:ETFHoldingView />
  </DataTemplate>

  <DataTemplate DataType="{x:Type vm:OptionsViewModel}">
    <vw:OptionsView />
  </DataTemplate>

  <DataTemplate DataType="{x:Type vm:AnalystRatingsViewModel}">
    <vw:AnalystRatingsView />
  </DataTemplate>

  <DataTemplate DataType="{x:Type vm:ValueAtRiskViewModel}">
    <vw:ValueAtRiskView />
  </DataTemplate>

  <DataTemplate DataType="{x:Type vm:StickerPriceViewModel}">
    <vw:StickerPriceView />
  </DataTemplate>

  <DataTemplate DataType="{x:Type vm:DCFValuationViewModel}">
    <vw:DCFValuationView />
  </DataTemplate>

	<!-- 
  This style configures both of the main content areas in the main window.
  -->
	<!--<ContextMenu x:Key="MyMenu">
		<MenuItem Header="A" />
		<MenuItem Header="B" />
		<MenuItem Header="C" />
	</ContextMenu>-->

	<Style x:Key="MainHCCStyle" TargetType="{x:Type HeaderedContentControl}">
    <Setter Property="HeaderTemplate">
      <Setter.Value>
        <DataTemplate>
            <Border 
            Background="{StaticResource Brush_HeaderBackground}" 
            BorderBrush="Black" 
            BorderThickness="1" 
            CornerRadius="5" 
            Margin="4" 
            Padding="4" 
            SnapsToDevicePixels="True" 
            >
						<TextBlock 
              FontSize="10"
              FontWeight="Bold"
              Foreground="WhiteSmoke" 
              HorizontalAlignment="Center"  
              Text="{TemplateBinding Content}">
						</TextBlock>
          </Border>
        </DataTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="IsTabStop" Value="False" />
    <Setter Property="Template">
      <Setter.Value>
        <!-- 
        This template ensures that content of a HeaderedContentControl 
        fills the available vertical space. 
        -->
        <ControlTemplate TargetType="{x:Type HeaderedContentControl}">
          <DockPanel>
            <ContentPresenter 
              DockPanel.Dock="Top"
              ContentSource="Header" 
              ContentTemplate="{TemplateBinding HeaderTemplate}" 
              />
            <ContentPresenter 
              ContentSource="Content" 
              ContentTemplate="{TemplateBinding ContentTemplate}" 
              />
          </DockPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <!--
  This style ensures that the borders in the main window are consistent.
  -->
  <Style x:Key="MainBorderStyle" TargetType="{x:Type Border}">
    <Setter Property="Background" Value="#303030" />
    <Setter Property="BorderBrush" Value="LightGray" />
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="CornerRadius" Value="5" />
    <Setter Property="SnapsToDevicePixels" Value="True" />
  </Style>

  <!--
  This template explains how to render the list of commands on the left
  side in the main window (the 'Control Panel' area).
  -->
  <DataTemplate x:Key="CommandsTemplate">
		<ItemsControl IsTabStop="False" ItemsSource="{Binding}" Margin="6,2">
      <ItemsControl.ItemTemplate>
        <DataTemplate>
          <TextBlock Margin="2,6">
            <Hyperlink Focusable="false" Command="{Binding Path=Command, Mode=OneWay}" FontFamily="Verdana" FontSize="10" Foreground="White">
              <TextBlock Text="{Binding Path=DisplayName}" Foreground="WhiteSmoke" />
            </Hyperlink>
          </TextBlock>
        </DataTemplate>
      </ItemsControl.ItemTemplate>
    </ItemsControl>
  </DataTemplate>

  <!-- 
  This template explains how to render 
  a tab item with a close button.
  -->
  <DataTemplate x:Key="ClosableTabItemTemplate">
    <DockPanel Width="120">
      <Button 
        Command="{Binding Path=CloseCommand}"
        Content="X"
        Cursor="Hand"
        DockPanel.Dock="Right"
        Focusable="False"
        FontFamily="Courier" 
        FontSize="9"
        FontWeight="Bold"  
        Margin="0,1,0,0"
        Padding="0"
        VerticalContentAlignment="Bottom"
        Width="16" Height="16" 
        />
      <ContentPresenter 
        Content="{Binding Path=DisplayName}" 
        VerticalAlignment="Center" 
        />
    </DockPanel>
  </DataTemplate>

  <!--
  This template explains how to render the 'Workspace' content area in the main window.
  -->

	<DataTemplate x:Key="WorkspacesTemplate">
		<telerik:RadTabControl
			AllowDragOverTab="True"
      AllowDragReorder="True"
      IsContentPreserved="true"
      IsSynchronizedWithCurrentItem="True" 
      FontFamily="Verdana"
      FontSize="10"
      ItemsSource="{Binding}"
			ItemTemplate="{StaticResource ClosableTabItemTemplate}"
      Margin="4">
      <!--<telerik:EventToCommandBehavior.EventBindings>
        <telerik:EventBinding Command="{Binding Path=PreviewSelectionChangedCommand}" EventName="PreviewSelectionChanged" />
      </telerik:EventToCommandBehavior.EventBindings>-->      
    </telerik:RadTabControl>

  </DataTemplate>

</ResourceDictionary>