-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainWindow.xaml
95 lines (79 loc) · 5.6 KB
/
MainWindow.xaml
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<Window x:Class="WpfApp1.MainWindow"
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:local="clr-namespace:WpfApp1"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800">
<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source=".\TableControl\Table.xaml"/>
<ResourceDictionary>
<local:BooleanToVisibilityConverter TrueValue="Visible" FalseValue="Collapsed"
x:Key="BooleanToVisibilityConverter"/>
<local:BooleanToVisibilityConverter TrueValue="Hidden" FalseValue="Visible"
x:Key="InvertedBooleanToVisibilityConverter"/>
<Style x:Key="Spinner" TargetType="{x:Type Path}">
<Setter Property="Stretch" Value="Fill" />
<Setter Property="Fill" Value="#FF1195C6" />
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Height" Value="50" />
<Setter Property="Width" Value="100" />
<Setter Property="Data" Value="M10 50c0 0 0 0.5 0.1 1.4c0 0.5 0.1 1 0.2 1.7c0 0.3 0.1 0.7 0.1 1.1c0.1 0.4 0.1 0.8 0.2 1.2c0.2 0.8 0.3 1.8 0.5 2.8 c0.3 1 0.6 2.1 0.9 3.2c0.3 1.1 0.9 2.3 1.4 3.5c0.5 1.2 1.2 2.4 1.8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-7.1c-1.2-1.2-2.1-2.7-3.1-4c-0.5-0.6-0.8-1.4-1.2-2 c-0.4-0.7-0.8-1.3-1.1-2c-0.3-0.7-0.6-1.3-0.9-2c-0.3-0.7-0.6-1.3-0.8-1.9c-0.4-1.3-0.9-2.5-1.2-3.7c-0.3-1.2-0.5-2.3-0.7-3.3 c-0.2-1-0.3-2-0.4-2.8c-0.1-0.4-0.1-0.8-0.1-1.2c0-0.4 0-0.7 0-1.1c0-0.7 0-1.2 0-1.7C10 50.5 10 50 10 50z" />
<Setter Property="RenderTransformOrigin" Value="0.5, 0" />
<Setter Property="RenderTransform">
<Setter.Value>
<RotateTransform x:Name="noFreeze" />
</Setter.Value>
</Setter>
<Style.Triggers>
<EventTrigger RoutedEvent="Loaded">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation
Storyboard.TargetProperty="(Path.RenderTransform).(RotateTransform.Angle)"
To="360" Duration="0:0:0.5" RepeatBehavior="Forever" />
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Style.Triggers>
</Style>
</ResourceDictionary>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Window.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="200"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock Text="Loading..." Grid.ColumnSpan="2" FontSize="48" HorizontalAlignment="Center" VerticalAlignment="Center"
Visibility="{Binding IsLoading,
Converter={StaticResource BooleanToVisibilityConverter}}"/>
<!--<ScrollViewer Visibility="{Binding IsLoading,
Converter={StaticResource InvertedBooleanToVisibilityConverter}}"
HorizontalScrollBarVisibility="Auto"
VerticalScrollBarVisibility="Auto"
IsDeferredScrollingEnabled="True" Grid.ColumnSpan="2">-->
<!--<Path Grid.Row="0" Style="{StaticResource Spinner}"
HorizontalAlignment="Center" VerticalAlignment="Center"
Visibility="{Binding IsLoading,
Converter={StaticResource BooleanToVisibilityConverter}}" />-->
<ContentPresenter Margin="5" Grid.ColumnSpan="2"
Content="{Binding TableViewModel1}"
HorizontalAlignment="Stretch"/>
<!--<ContentPresenter Grid.Row="1"
Content="{Binding TableViewModel2}"
/>-->
<!--</ScrollViewer>-->
<Button Grid.Row="1" Content="Refresh" Command="{Binding RefreshCommand}"/>
<Slider Grid.Row="1" Grid.Column="1" Minimum="0.2" Maximum="5" Value="{Binding TableViewModel1.Zoom}" />
</Grid>
</Window>