seb-win-refactoring/SafeExamBrowser.UserInterface/Controls/ApplicationButton.xaml
2017-07-20 14:16:47 +02:00

43 lines
2.5 KiB
XML

<UserControl x:Class="SafeExamBrowser.UserInterface.Controls.ApplicationButton"
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"
xmlns:local="clr-namespace:SafeExamBrowser.UserInterface.Controls"
xmlns:s="clr-namespace:System;assembly=mscorlib"
mc:Ignorable="d"
d:DesignHeight="40" d:DesignWidth="50">
<Grid>
<Popup x:Name="InstancePopup" IsOpen="False" Placement="Top" PlacementTarget="{Binding ElementName=Button}" AllowsTransparency="True">
<ScrollViewer x:Name="InstanceScrollViewer" VerticalScrollBarVisibility="Auto">
<ScrollViewer.Background>
<SolidColorBrush Color="Black" Opacity="0.8" />
</ScrollViewer.Background>
<ScrollViewer.Resources>
<s:Double x:Key="{x:Static SystemParameters.VerticalScrollBarWidthKey}">5</s:Double>
</ScrollViewer.Resources>
<StackPanel x:Name="InstanceStackPanel" />
</ScrollViewer>
</Popup>
<Button x:Name="Button" Background="#00000000" BorderThickness="0" Click="Button_Click" Width="50">
<Button.Template>
<ControlTemplate TargetType="Button">
<Border x:Name="ButtonContent" Background="{TemplateBinding Background}" Padding="5">
<ContentPresenter VerticalAlignment="Center" HorizontalAlignment="Center" ContentSource="Content" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="ButtonContent" Property="Background" Value="#2AFFFFFF" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="ButtonContent" Property="Background" Value="#10FFFFFF" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Button.Template>
</Button>
<Grid Panel.ZIndex="10">
<Rectangle x:Name="ActiveBar" Height="3" Width="40" VerticalAlignment="Bottom" Fill="LightSteelBlue" Visibility="Collapsed" />
</Grid>
</Grid>
</UserControl>