<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:po="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options"  
    xmlns:bgc="clr-namespace:BuzzGUI.Common;assembly=BuzzGUI.Common"             
    xmlns:vsm="clr-namespace:System.Windows;assembly=BuzzGUI.Common"             
    xmlns:local="clr-namespace:BuzzGUI.MachineView;assembly=BuzzGUI.MachineView">

  <ResourceDictionary.MergedDictionaries>
    <ResourceDictionary Source="../../Default/MachineView/MVResources.xaml"/>
    <ResourceDictionary Source="../../Default/MachineView/MachineControl.xaml"/>
    <ResourceDictionary Source="../../Default/MachineView/AmpControl.xaml"/>
  </ResourceDictionary.MergedDictionaries>

  <Style TargetType="{x:Type local:AmpControl}" BasedOn="{StaticResource ConnectionAmpControlStyleBase}"/>
  <Style x:Key="MachineConnectionPathStyle" TargetType="{x:Type Shape}" BasedOn="{StaticResource MachineConnectionPathStyleBase}"/>
  <Style x:Key="MachineConnectionTriangleStyle" TargetType="{x:Type Control}" BasedOn="{StaticResource MachineConnectionTriangleStyleBase}"/>
  
  <Style x:Key="BackgroundGridStyle" TargetType="{x:Type Grid}" BasedOn="{StaticResource BackgroundGridStyleBase}">
    <Setter Property="Background">
      <Setter.Value>
        <ImageBrush ImageSource="gfx/bg2.jpg" TileMode="FlipXY" Viewport="0.25,0.25,0.5,0.5"/>
      </Setter.Value>
    </Setter>
  </Style>

  <Style TargetType="{x:Type local:MachineControl}" BasedOn="{StaticResource MachineControlStyleBase}">
    <Style.Triggers>
      <DataTrigger Binding="{Binding Path=Machine.DLL.Info.Type}" Value="Master">
        <Setter Property="ThemeMachineImageSource" Value="gfx/master.bmp"/>
      </DataTrigger>
      <DataTrigger Binding="{Binding Path=Machine.DLL.Info.Type}" Value="Generator">
        <Setter Property="ThemeMachineImageSource" Value="gfx/generator.bmp"/>
      </DataTrigger>
      <DataTrigger Binding="{Binding Path=Machine.DLL.Info.Type}" Value="Effect">
        <Setter Property="ThemeMachineImageSource" Value="gfx/effect.bmp"/>
      </DataTrigger>
      <DataTrigger Binding="{Binding Path=Machine.IsControlMachine}" Value="True">
        <Setter Property="ThemeMachineImageSource" Value="gfx/control.bmp"/>
      </DataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=Machine.DLL.Info.Type}" Value="Generator"/>
          <Condition Binding="{Binding Path=Machine.IsMuted}" Value="True"/>
        </MultiDataTrigger.Conditions>
        <Setter Property="ThemeMachineImageSource" Value="gfx/generatormute.bmp"/>
      </MultiDataTrigger>
      <MultiDataTrigger>
        <MultiDataTrigger.Conditions>
          <Condition Binding="{Binding Path=Machine.DLL.Info.Type}" Value="Effect"/>
          <Condition Binding="{Binding Path=Machine.IsMuted}" Value="True"/>
        </MultiDataTrigger.Conditions>
        <Setter Property="ThemeMachineImageSource" Value="gfx/effectmute.bmp"/>
      </MultiDataTrigger>
    </Style.Triggers>
  </Style>

</ResourceDictionary>