添加项目文件。
This commit is contained in:
125
MetroGauges/WpfPreview.xaml
Normal file
125
MetroGauges/WpfPreview.xaml
Normal file
@@ -0,0 +1,125 @@
|
||||
<Window
|
||||
x:Class="MetroGauges.WpfPreview"
|
||||
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:local="clr-namespace:MetroGauges"
|
||||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
Title="WpfPreview"
|
||||
Width="700"
|
||||
Height="700"
|
||||
AllowsTransparency="True"
|
||||
Background="{DynamicResource MaterialDesignPaper}"
|
||||
FontFamily="{StaticResource MaterialDesignFont}"
|
||||
ResizeMode="NoResize"
|
||||
ShowInTaskbar="False"
|
||||
TextElement.FontSize="13"
|
||||
TextElement.FontWeight="Regular"
|
||||
TextElement.Foreground="{DynamicResource MaterialDesignBody}"
|
||||
TextOptions.TextFormattingMode="Ideal"
|
||||
TextOptions.TextRenderingMode="Auto"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
WindowStyle="None"
|
||||
mc:Ignorable="d">
|
||||
<Grid>
|
||||
<Button
|
||||
x:Name="WindowClose"
|
||||
Canvas.Left="760"
|
||||
Height="Auto"
|
||||
Padding="0"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Top"
|
||||
Click="WindowClose_Click"
|
||||
Style="{DynamicResource MaterialDesignFlatButton}"
|
||||
ToolTip="关闭">
|
||||
<materialDesign:PackIcon
|
||||
Width="40"
|
||||
Height="40"
|
||||
Foreground="White"
|
||||
Kind="WindowClose"/>
|
||||
</Button>
|
||||
<Canvas x:Name="chartCanvas" MouseLeftButtonDown="ChartCanvas_MouseLeftButtonDown">
|
||||
<StackPanel Canvas.Left="20" Canvas.Top="20">
|
||||
<WrapPanel>
|
||||
<TextBlock Text="输入数据:"/>
|
||||
<Path
|
||||
Margin="10,0,0,0"
|
||||
Data="M0,0 L30,0"
|
||||
Stretch="Fill"
|
||||
Stroke="Blue"
|
||||
StrokeEndLineCap="Square"
|
||||
StrokeStartLineCap="Square"
|
||||
StrokeThickness="2"/>
|
||||
</WrapPanel>
|
||||
<WrapPanel>
|
||||
<TextBlock Text="计算结果:"/>
|
||||
<Path
|
||||
Margin="10,0,0,0"
|
||||
Data="M0,0 L30,0"
|
||||
Stretch="Fill"
|
||||
Stroke="Red"
|
||||
StrokeEndLineCap="Square"
|
||||
StrokeStartLineCap="Square"
|
||||
StrokeThickness="2"/>
|
||||
</WrapPanel>
|
||||
</StackPanel>
|
||||
<WrapPanel Canvas.Left="10" Canvas.Top="546">
|
||||
<Path
|
||||
x:Name="x_axis"
|
||||
Data="M0,0 L670,0"
|
||||
Stretch="Fill"
|
||||
Stroke="Black"
|
||||
StrokeEndLineCap="Square"
|
||||
StrokeStartLineCap="Square"
|
||||
StrokeThickness="3"/>
|
||||
<Path
|
||||
x:Name="x_axisArrow"
|
||||
HorizontalAlignment="Right"
|
||||
Data="M0,0 L0,8 L10,4 z"
|
||||
Fill="Black"
|
||||
Stretch="Fill"/>
|
||||
</WrapPanel>
|
||||
<StackPanel Canvas.Left="346" Canvas.Top="15">
|
||||
<Path
|
||||
x:Name="y_axisArrow"
|
||||
Data="M0,10 L8,10 L4,0 z"
|
||||
Fill="Black"
|
||||
Stretch="Fill"/>
|
||||
<Path
|
||||
x:Name="y_axis"
|
||||
Data="M0,10 L0,670"
|
||||
Stretch="Fill"
|
||||
Stroke="Black"
|
||||
StrokeEndLineCap="Square"
|
||||
StrokeStartLineCap="Square"
|
||||
StrokeThickness="3"/>
|
||||
</StackPanel>
|
||||
<TextBlock
|
||||
x:Name="y_label"
|
||||
Canvas.Left="335"
|
||||
Canvas.Top="10"
|
||||
FontFamily="Arial"
|
||||
FontSize="20"
|
||||
FontStyle="Italic"
|
||||
Text="y"/>
|
||||
<TextBlock
|
||||
x:Name="x_label"
|
||||
Canvas.Left="680"
|
||||
Canvas.Top="550"
|
||||
FontFamily="Arial"
|
||||
FontSize="20"
|
||||
FontStyle="Italic"
|
||||
Text="x"/>
|
||||
<TextBlock
|
||||
x:Name="o_label"
|
||||
Canvas.Left="335"
|
||||
Canvas.Top="550"
|
||||
FontFamily="Arial"
|
||||
FontSize="20"
|
||||
FontStyle="Italic"
|
||||
Text="o"/>
|
||||
</Canvas>
|
||||
|
||||
</Grid>
|
||||
</Window>
|
||||
Reference in New Issue
Block a user