1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<UserControl x:Class="FLY.ControlLibrary.GraphRange"
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:my="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration"
xmlns:Chr="clr-namespace:System.Windows.Forms.DataVisualization.Charting;assembly=System.Windows.Forms.DataVisualization"
xmlns:local="clr-namespace:FLY.ControlLibrary"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300" >
<UserControl.Resources>
<local:IsValidConverter x:Key="isvalidconv"/>
<ControlTemplate x:Key="picture_button" TargetType="Button">
<Border Name="border" BorderThickness="1" CornerRadius="5">
<ContentPresenter Content="{TemplateBinding Content}"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="border" Property="BorderBrush" Value="LightBlue"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="border" Property="Background" Value="LightGray"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</UserControl.Resources>
<Grid Name="grid" Background="White">
<Grid.RowDefinitions>
<RowDefinition Height="18" />
<RowDefinition Height="22" />
<RowDefinition Height="258*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="225*" />
</Grid.ColumnDefinitions>
<Rectangle Name="rectangle" Grid.ColumnSpan="2" Fill="#FF579aab"/>
<TextBlock Grid.ColumnSpan="2" HorizontalAlignment="Center" FontSize="18" VerticalAlignment="Bottom" Grid.RowSpan="2">
<TextBlock.Inlines>
<Run Name="run_title" FontWeight="SemiBold" />
<Run Name="run_title2" Foreground="#FF585858" />
</TextBlock.Inlines>
</TextBlock>
<WindowsFormsHost Grid.ColumnSpan="2" Grid.Row="2">
<Chr:Chart x:Name="chart1" />
</WindowsFormsHost>
<Button x:Name="m_LogoImageButtonUC" Height="40" Width="40" Click="Button_Click" Grid.RowSpan="2" Template="{StaticResource ResourceKey=picture_button}">
<Grid >
<Image Source="/FLY.ControlLibrary;component/Images/info.png" />
</Grid>
</Button>
</Grid>
</UserControl>