You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
133 lines
3.3 KiB
133 lines
3.3 KiB
<?xml version="1.0" encoding="utf-8"?> |
|
<UserControl |
|
x:Class="Debugger.AddIn.Pads.ParallelPad.DrawSurface" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:Debugger.AddIn.Pads.ParallelPad" |
|
Background="White"> |
|
<UserControl.Resources> |
|
<LinearGradientBrush |
|
x:Key="SilverBrushKey" |
|
EndPoint="0,1" |
|
StartPoint="0,0"> |
|
<LinearGradientBrush.GradientStops> |
|
<GradientStop |
|
Offset="0.7" |
|
Color="White" /> |
|
<GradientStop |
|
Offset="1" |
|
Color="LightGray" /> |
|
</LinearGradientBrush.GradientStops> |
|
</LinearGradientBrush> |
|
<LinearGradientBrush |
|
x:Key="SilverPressedBrushKey" |
|
EndPoint="0,1" |
|
StartPoint="0,0"> |
|
<LinearGradientBrush.GradientStops> |
|
<GradientStop |
|
Offset="0.3" |
|
Color="White" /> |
|
<GradientStop |
|
Offset="0" |
|
Color="LightGray" /> |
|
</LinearGradientBrush.GradientStops> |
|
</LinearGradientBrush> |
|
<ControlTemplate |
|
x:Key="ButtonTemplate" |
|
TargetType="Button"> |
|
<Border |
|
Width="28" |
|
Height="17" |
|
Name="TheBorder" |
|
CornerRadius="2,2,2,2" |
|
BorderThickness="1" |
|
BorderBrush="LightGray"> |
|
<Canvas> |
|
<TextBlock |
|
Canvas.Top="2" |
|
Canvas.Left="1" |
|
Text="100%" |
|
FontSize="9" |
|
Foreground="LightGray" /> |
|
</Canvas> |
|
</Border> |
|
<ControlTemplate.Triggers> |
|
<Trigger |
|
Property="ButtonBase.IsMouseOver" |
|
Value="True"> |
|
<Setter |
|
TargetName="TheBorder" |
|
Property="Background" |
|
Value="{StaticResource SilverBrushKey}" /> |
|
<Setter |
|
TargetName="TheBorder" |
|
Property="BorderBrush" |
|
Value="Silver" /> |
|
</Trigger> |
|
<Trigger |
|
Property="ButtonBase.IsPressed" |
|
Value="True"> |
|
<Setter |
|
TargetName="TheBorder" |
|
Property="Background" |
|
Value="{StaticResource SilverPressedBrushKey}" /> |
|
<Setter |
|
TargetName="TheBorder" |
|
Property="BorderBrush" |
|
Value="Silver" /> |
|
</Trigger> |
|
</ControlTemplate.Triggers> |
|
</ControlTemplate> |
|
</UserControl.Resources> |
|
<Grid> |
|
<Grid.ColumnDefinitions> |
|
<ColumnDefinition |
|
Width="40" /> |
|
<ColumnDefinition |
|
Width="*" /> |
|
</Grid.ColumnDefinitions> |
|
<Canvas |
|
Margin="3,3"> |
|
<TextBlock |
|
Foreground="LightGray" |
|
x:Name="PercentText" |
|
HorizontalAlignment="Center">100%</TextBlock> |
|
<Line |
|
X1="0" |
|
Y1="20" |
|
X2="28" |
|
Y2="20" |
|
StrokeThickness="2" |
|
Stroke="LightGray" /> |
|
<Slider |
|
Canvas.Top="23" |
|
Name="SliderControl" |
|
Ticks="1,2,3,4,5,6,7,8,9,10" |
|
Opacity=".4" |
|
Value="5" |
|
Interval="1" |
|
TickPlacement="BottomRight" |
|
Minimum="1" |
|
Maximum="10" |
|
Height="100" |
|
Width="30" |
|
Orientation="Vertical" |
|
ValueChanged="SliderControl_ValueChanged" /> |
|
<Line |
|
X1="0" |
|
Y1="125" |
|
X2="28" |
|
Y2="125" |
|
StrokeThickness="2" |
|
Stroke="LightGray" /> |
|
<Button |
|
Canvas.Top="130" |
|
Name="Reset" |
|
Click="Reset_Click" |
|
Template="{StaticResource ButtonTemplate}" /> |
|
</Canvas> |
|
<Canvas x:Name="drawingSurface" Grid.Column="1"> |
|
<local:ParallelStacksGraphLayout |
|
x:Name="ParallelStacksLayout" |
|
LayoutAlgorithmType = "Tree" |
|
OverlapRemovalAlgorithmType = "FSA"/> |
|
</Canvas> |
|
</Grid> |
|
</UserControl> |