|
4 | 4 | xmlns:behaviors="http://schemas.microsoft.com/xaml/behaviors" |
5 | 5 | xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
6 | 6 | xmlns:local="clr-namespace:One.Toolbox.Views.NetSpeed" |
| 7 | + xmlns:hc="https://handyorg.github.io/handycontrol" |
7 | 8 | xmlns:lvc="clr-namespace:LiveChartsCore.SkiaSharpView.WPF;assembly=LiveChartsCore.SkiaSharpView.WPF" |
8 | 9 | xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
9 | 10 | xmlns:o="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options" |
|
14 | 15 | d:Height="548" |
15 | 16 | d:Width="733" |
16 | 17 | mc:Ignorable="d"> |
17 | | - <Grid> |
18 | | - <Grid.Resources /> |
| 18 | + <Border Style="{StaticResource BorderRegion}"> |
| 19 | + <Grid> |
| 20 | + <Grid.Resources /> |
19 | 21 |
|
20 | | - <Grid.ColumnDefinitions> |
21 | | - <ColumnDefinition /> |
22 | | - <ColumnDefinition Width="3*" /> |
23 | | - </Grid.ColumnDefinitions> |
24 | | - |
25 | | - <ListBox ItemsSource="{Binding NetSpeedItems}" SelectedItem="{Binding NetSpeedSelectItemVM}"> |
26 | | - <behaviors:Interaction.Triggers> |
27 | | - <behaviors:EventTrigger EventName="SelectionChanged"> |
28 | | - <behaviors:InvokeCommandAction Command="{Binding SelectedNetSpeedItemChangedCommand}" PassEventArgsToCommand="True" /> |
29 | | - </behaviors:EventTrigger> |
30 | | - </behaviors:Interaction.Triggers> |
31 | | - <ListBox.ItemTemplate> |
32 | | - <DataTemplate DataType="viewmodels:NetSpeedItemVM"> |
33 | | - <Grid> |
34 | | - <TextBlock Text="{Binding InterfaceName}" /> |
35 | | - </Grid> |
36 | | - </DataTemplate> |
37 | | - </ListBox.ItemTemplate> |
38 | | - </ListBox> |
39 | | - |
40 | | - <Grid Grid.Column="1"> |
| 22 | + <Grid.ColumnDefinitions> |
| 23 | + <ColumnDefinition /> |
| 24 | + <ColumnDefinition Width="3*" /> |
| 25 | + </Grid.ColumnDefinitions> |
41 | 26 | <Grid.RowDefinitions> |
42 | | - <RowDefinition Height="auto"/> |
43 | | - <RowDefinition /> |
| 27 | + <RowDefinition > |
| 28 | + |
| 29 | + </RowDefinition> |
| 30 | + <RowDefinition Height="auto"></RowDefinition> |
44 | 31 | </Grid.RowDefinitions> |
| 32 | + <ListBox ItemsSource="{Binding NetSpeedItems}" SelectedItem="{Binding NetSpeedSelectItemVM}"> |
| 33 | + <behaviors:Interaction.Triggers> |
| 34 | + <behaviors:EventTrigger EventName="SelectionChanged"> |
| 35 | + <behaviors:InvokeCommandAction Command="{Binding SelectedNetSpeedItemChangedCommand}" PassEventArgsToCommand="True" /> |
| 36 | + </behaviors:EventTrigger> |
| 37 | + </behaviors:Interaction.Triggers> |
| 38 | + <ListBox.ItemTemplate> |
| 39 | + <DataTemplate DataType="viewmodels:NetSpeedItemVM"> |
| 40 | + <Grid> |
| 41 | + <TextBlock Text="{Binding InterfaceName}" /> |
| 42 | + </Grid> |
| 43 | + </DataTemplate> |
| 44 | + </ListBox.ItemTemplate> |
| 45 | + </ListBox> |
45 | 46 |
|
| 47 | + <Grid Grid.Column="1" Grid.RowSpan="2"> |
| 48 | + <Grid.RowDefinitions> |
| 49 | + <RowDefinition Height="auto"/> |
| 50 | + <RowDefinition /> |
| 51 | + </Grid.RowDefinitions> |
46 | 52 |
|
47 | | - <StackPanel Margin="10,5" DataContext="{Binding NetSpeedSelectItemVM}"> |
48 | | - <StackPanel Orientation="Horizontal"> |
49 | | - <TextBlock Text="上行:" /> |
50 | | - <TextBlock Text="{Binding SpeedSentHuman}" /> |
51 | | - </StackPanel> |
52 | | - <StackPanel Orientation="Horizontal" > |
53 | | - <TextBlock Text="下行:" /> |
54 | | - <TextBlock Text="{Binding SpeedReceivedHuman}" /> |
55 | | - </StackPanel> |
56 | 53 |
|
57 | | - </StackPanel> |
| 54 | + |
58 | 55 |
|
59 | | - <Grid Grid.Row="1" DataContext="{Binding NetSpeedPlot}"> |
60 | | - <lvc:CartesianChart AnimationsSpeed="00:00:00.000" LegendPosition="Bottom" |
61 | | - Series="{Binding SpeedSeries}" Sections="{Binding Sections}" |
62 | | - SyncContext="{Binding Sync}" |
63 | | - XAxes="{Binding XAxes}" |
64 | | - YAxes="{Binding YAxes}" > |
| 56 | + <Grid Grid.Row="1" DataContext="{Binding NetSpeedPlot}"> |
| 57 | + <lvc:CartesianChart AnimationsSpeed="00:00:00.000" LegendPosition="Bottom" |
| 58 | + Series="{Binding SpeedSeries}" Sections="{Binding Sections}" |
| 59 | + SyncContext="{Binding Sync}" |
| 60 | + XAxes="{Binding XAxes}" |
| 61 | + YAxes="{Binding YAxes}" > |
65 | 62 |
|
66 | | - </lvc:CartesianChart> |
67 | | - </Grid> |
| 63 | + </lvc:CartesianChart> |
| 64 | + </Grid> |
68 | 65 |
|
69 | | - </Grid> |
| 66 | + </Grid> |
| 67 | + |
| 68 | + <Grid Grid.Row="1" Margin="10,5" > |
70 | 69 |
|
| 70 | + <Grid.ColumnDefinitions> |
| 71 | + <ColumnDefinition></ColumnDefinition> |
| 72 | + <ColumnDefinition Width="auto"></ColumnDefinition> |
| 73 | + </Grid.ColumnDefinitions> |
| 74 | + <StackPanel DataContext="{Binding NetSpeedSelectItemVM}"> |
| 75 | + <StackPanel Orientation="Horizontal"> |
| 76 | + <TextBlock Text="上行:" /> |
| 77 | + <TextBlock Text="{Binding SpeedSentHuman}" /> |
| 78 | + </StackPanel> |
| 79 | + <StackPanel Orientation="Horizontal" > |
| 80 | + <TextBlock Text="下行:" /> |
| 81 | + <TextBlock Text="{Binding SpeedReceivedHuman}" /> |
| 82 | + </StackPanel> |
| 83 | + </StackPanel> |
| 84 | + <ToggleButton Grid.Column="1" Style="{StaticResource ToggleButtonSwitch}" Content="Show" IsChecked="{Binding ShowSmallWnd}" ></ToggleButton> |
71 | 85 |
|
72 | | - </Grid> |
| 86 | + </Grid> |
| 87 | + </Grid> |
| 88 | + </Border> |
| 89 | + |
73 | 90 | </UserControl> |
0 commit comments