<UserControl x:Class="GSF.TimeSeries.UI.UserControls.DetailViewFooterUserControl" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" mc:Ignorable="d" d:DesignHeight="30" d:DesignWidth="800"> <StackPanel Orientation="Horizontal" HorizontalAlignment="Right"> <Button x:Name="ButtonDelete" Command="{Binding DeleteCommand}" Width="Auto" Margin="5,2"> <Button.Template> <ControlTemplate> <StackPanel Orientation="Horizontal"> <Image Source="/GSF.TimeSeries.UI;component/images/Delete.png" Height="16" Width="16" Margin="2"/> <TextBlock x:Name="TextBlockText" Text="Delete" FontWeight="Bold" VerticalAlignment="Center"/> </StackPanel> <ControlTemplate.Triggers> <Trigger Property="IsEnabled" Value="False"> <Setter TargetName="TextBlockText" Property="Foreground" Value="#FF888888"/> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Button.Template> </Button> <Button x:Name="ButtonClear" Command="{Binding ClearCommand}" Width="Auto" Margin="5,2"> <Button.Template> <ControlTemplate> <StackPanel Orientation="Horizontal"> <Image Source="/GSF.TimeSeries.UI;component/images/Plus.png" Height="16" Width="16" Margin="2"/> <TextBlock x:Name="TextBlockText" Text="Add New" FontWeight="Bold" VerticalAlignment="Center"/> </StackPanel> <ControlTemplate.Triggers> <Trigger Property="IsEnabled" Value="False"> <Setter TargetName="TextBlockText" Property="Foreground" Value="#FF888888"/> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Button.Template> </Button> <Button x:Name="ButtonSave" Command="{Binding SaveCommand}" IsEnabled="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}, Path=SaveEnabled}" Width="Auto" Margin="5,2"> <Button.Template> <ControlTemplate> <StackPanel Orientation="Horizontal"> <Image Source="/GSF.TimeSeries.UI;component/images/Save.png" Height="16" Width="16" Margin="2"/> <TextBlock x:Name="TextBlockText" Text="Save" FontWeight="Bold" VerticalAlignment="Center"/> </StackPanel> <ControlTemplate.Triggers> <Trigger Property="IsEnabled" Value="False"> <Setter TargetName="TextBlockText" Property="Foreground" Value="#FF888888"/> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Button.Template> </Button> </StackPanel> </UserControl>
<UserControl x:Class="GSF.TimeSeries.UI.UserControls.DetailViewFooterUserControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="30" d:DesignWidth="800">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
<Button x:Name="ButtonDelete" Command="{Binding DeleteCommand}" Width="Auto" Margin="5,2">
<Button.Template>
<ControlTemplate>
<StackPanel Orientation="Horizontal">
<Image Source="/GSF.TimeSeries.UI;component/images/Delete.png" Height="16" Width="16" Margin="2"/>
<TextBlock x:Name="TextBlockText" Text="Delete" FontWeight="Bold" VerticalAlignment="Center"/>
</StackPanel>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter TargetName="TextBlockText" Property="Foreground" Value="#FF888888"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Button.Template>
</Button>
<Button x:Name="ButtonClear" Command="{Binding ClearCommand}" Width="Auto" Margin="5,2">
<Button.Template>
<ControlTemplate>
<StackPanel Orientation="Horizontal">
<Image Source="/GSF.TimeSeries.UI;component/images/Plus.png" Height="16" Width="16" Margin="2"/>
<TextBlock x:Name="TextBlockText" Text="Add New" FontWeight="Bold" VerticalAlignment="Center"/>
</StackPanel>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter TargetName="TextBlockText" Property="Foreground" Value="#FF888888"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Button.Template>
</Button>
<Button x:Name="ButtonSave" Command="{Binding SaveCommand}" IsEnabled="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}, Path=SaveEnabled}" Width="Auto" Margin="5,2">
<Button.Template>
<ControlTemplate>
<StackPanel Orientation="Horizontal">
<Image Source="/GSF.TimeSeries.UI;component/images/Save.png" Height="16" Width="16" Margin="2"/>
<TextBlock x:Name="TextBlockText" Text="Save" FontWeight="Bold" VerticalAlignment="Center"/>
</StackPanel>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter TargetName="TextBlockText" Property="Foreground" Value="#FF888888"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Button.Template>
</Button>
</StackPanel>
</UserControl>