/CBR/CBR/Views/SimulateView.xaml
XAML | 167 lines | 161 code | 6 blank | 0 comment | 0 complexity | 48b58cb2d0d6b2253ea61ef6f61ee474 MD5 | raw file
- <Window
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:ed="http://schemas.microsoft.com/expression/2010/drawing" mc:Ignorable="d" x:Class="CBR.Views.SimulateView"
- Title="SimulateView" Height="400" Width="680" WindowStyle="None" WindowStartupLocation="CenterOwner" AllowsTransparency="True" Background="{x:Null}"
- MouseLeftButtonDown="Window_MouseLeftButtonDown" Loaded="Window_Loaded">
- <Window.Resources>
-
- <Style TargetType="{x:Type Button}" x:Key="WindowChromeButton">
- <Setter Property="OverridesDefaultStyle" Value="True"/>
- <Setter Property="IsTabStop" Value="False"/>
- <Setter Property="Focusable" Value="False"/>
- <Setter Property="Width" Value="30"/>
- <Setter Property="Height" Value="30"/>
- <Setter Property="HorizontalAlignment" Value="Center"/>
- <Setter Property="VerticalAlignment" Value="Center"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Button}">
- <Grid Background="Transparent" SnapsToDevicePixels="True">
- <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
- </Grid>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <Style x:Key="closeButton" TargetType="{x:Type Button}" BasedOn="{StaticResource WindowChromeButton}">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Button}">
- <Grid>
- <Rectangle Stretch="Fill" Fill="Transparent"/>
- <Line x:Name="line1" X1="0" Y1="0" X2="10" Y2="10" Stroke="White" StrokeThickness="3" HorizontalAlignment="Center" VerticalAlignment="Center"/>
- <Line x:Name="line2" X1="10" Y1="0" X2="0" Y2="10" Stroke="White" StrokeThickness="3" HorizontalAlignment="Center" VerticalAlignment="Center"/>
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter TargetName="line1" Property="Stroke" Value="Gray"/>
- <Setter TargetName="line2" Property="Stroke" Value="Gray"/>
- </Trigger>
- <Trigger Property="IsPressed" Value="True">
- <Setter Property="RenderTransform" TargetName="line1">
- <Setter.Value>
- <TranslateTransform X="1" Y="1"/>
- </Setter.Value>
- </Setter>
- <Setter Property="RenderTransform" TargetName="line2">
- <Setter.Value>
- <TranslateTransform X="1" Y="1"/>
- </Setter.Value>
- </Setter>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <Style x:Key="swapButton" TargetType="{x:Type Button}" BasedOn="{StaticResource WindowChromeButton}">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Button}">
- <Grid Width="30" Height="30">
- <Rectangle Stretch="Fill" Fill="Transparent"/>
- <Rectangle x:Name="rect1" Width="28" Height="17" Stroke="White" StrokeThickness="3" HorizontalAlignment="Right" VerticalAlignment="Top" />
- <Rectangle x:Name="rect2" Width="17" Height="28" Stroke="White" StrokeThickness="3" HorizontalAlignment="Right" VerticalAlignment="Top" />
- <Path x:Name="Arrow1" Data="M2.4623262,20.418156 C3.2558038,25.413654 1.7900984,25.865824 7.8382856,27.675111" HorizontalAlignment="Left" Height="10.292" Margin="0.75,0,0,2.208" Stretch="Fill" Stroke="White" StrokeThickness="2" VerticalAlignment="Bottom" Width="8.208"/>
- <Path x:Name="Arrow2" Data="M7.7191389,16.286587 L10.69015,27.536028 2.2920932,32.511192" HorizontalAlignment="Left" Height="5.831" Margin="4.74,0,0,0.794" Stretch="Fill" VerticalAlignment="Bottom" Width="4.385" StrokeThickness="2" Stroke="White" StrokeStartLineCap="Round" StrokeEndLineCap="Round"/>
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter TargetName="rect1" Property="Stroke" Value="Gray"/>
- <Setter TargetName="rect2" Property="Stroke" Value="Gray"/>
- <Setter TargetName="Arrow1" Property="Stroke" Value="Gray"/>
- <Setter TargetName="Arrow2" Property="Stroke" Value="Gray"/>
- </Trigger>
- <Trigger Property="IsPressed" Value="True">
- <Setter Property="RenderTransform" TargetName="rect1">
- <Setter.Value>
- <TranslateTransform X="1" Y="1"/>
- </Setter.Value>
- </Setter>
- <Setter Property="RenderTransform" TargetName="rect2">
- <Setter.Value>
- <TranslateTransform X="1" Y="1"/>
- </Setter.Value>
- </Setter>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <Style x:Key="playButton" TargetType="{x:Type Button}" BasedOn="{StaticResource WindowChromeButton}">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Button}">
- <Grid d:DesignWidth="30" d:DesignHeight="30">
- <Rectangle Stretch="Fill" Fill="Transparent"/>
- <Path x:Name="shape" Data="M4,4 L4,26 L26,15 z" Fill="White" />
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter TargetName="shape" Property="Fill" Value="Gray"/>
- </Trigger>
- <Trigger Property="IsPressed" Value="True">
- <Setter Property="RenderTransform" TargetName="shape">
- <Setter.Value>
- <TranslateTransform X="1" Y="1"/>
- </Setter.Value>
- </Setter>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <Style x:Key="pauseButton" TargetType="{x:Type Button}" BasedOn="{StaticResource WindowChromeButton}">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Button}">
- <Grid d:DesignWidth="30" d:DesignHeight="30">
- <Rectangle Stretch="Fill" Fill="Transparent"/>
- <Path x:Name="shape" Data="M8,4 L8,26 M21,4 L21,26" Stroke="White" StrokeThickness="6" Fill="White" />
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter TargetName="shape" Property="Stroke" Value="Gray"/>
- </Trigger>
- <Trigger Property="IsPressed" Value="True">
- <Setter Property="RenderTransform" TargetName="shape">
- <Setter.Value>
- <TranslateTransform X="1" Y="1"/>
- </Setter.Value>
- </Setter>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- </Window.Resources>
- <Grid x:Name="mainGrid">
- <DockPanel Margin="5" Background="DarkGray" Height="32" VerticalAlignment="Top" HorizontalAlignment="Stretch">
- <Button Style="{StaticResource swapButton}" x:Name="btnSwapLandscape" Click="btnSwapLandscape_Click"/>
- <Button Style="{StaticResource playButton}" x:Name="btnPlay" />
- <Button Style="{StaticResource pauseButton}" x:Name="btnPause" />
- <Button Style="{StaticResource closeButton}" x:Name="btnClose" Click="btnClose_Click"/>
- <Label VerticalAlignment="Center" HorizontalAlignment="Stretch" x:Name="lblDebugInfo"/>
- </DockPanel>
- <Grid Margin="0,50,0,0">
- <Grid.Background>
- <ImageBrush ImageSource="/CBR;component/Resources/Images/phone_horizontal.png" />
- </Grid.Background>
- <Rectangle x:Name="rctZoom" Stroke="Red" Margin="52,28,111,32">
- <Rectangle.Fill>
- <ImageBrush TileMode="None"
- ViewboxUnits="Absolute" Viewbox="10,90,210,50" ViewportUnits="RelativeToBoundingBox" Viewport="0,0,1,1" />
- </Rectangle.Fill>
- </Rectangle>
- </Grid>
- </Grid>
- </Window>