ExcelHelper/MainWindow.xaml

114 lines
4.7 KiB
XML

<Window
x:Class="ExcelHelper.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:hc="https://handyorg.github.io/handycontrol"
xmlns:local="clr-namespace:ExcelHelper"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:viewmodels="clr-namespace:ExcelHelper.Views.ViewModels"
Title="MainWindow"
Width="800"
Height="450"
d:DataContext="{d:DesignInstance Type=viewmodels:MainViewModel}"
WindowState="Maximized"
mc:Ignorable="d">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" MinWidth="200" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<hc:SideMenu Grid.Column="0" AutoSelect="True">
<hc:SideMenuItem
Command="{Binding SideMenuSelectCommand}"
CommandParameter="ImportExcelPage"
Header="导入"
IsSelected="True" />
<hc:SideMenuItem
Command="{Binding SideMenuSelectCommand}"
CommandParameter="DataListPage"
Header="已导入的数据" />
<hc:SideMenuItem
Command="{Binding SideMenuSelectCommand}"
CommandParameter="SqlQueryPage"
Header="查询" />
</hc:SideMenu>
<Frame
x:Name="MainFrame"
Grid.Column="1"
NavigationUIVisibility="Hidden" />
<hc:Dialog
x:Name="MessageDialog"
Grid.Column="0"
Grid.ColumnSpan="2"
Background="Transparent"
FontSize="16"
Visibility="Collapsed">
<Border
Padding="0"
Background="White"
BorderBrush="Gray"
BorderThickness="1"
CornerRadius="5">
<hc:SimpleStackPanel
Width="300"
ClipToBounds="True"
Orientation="Vertical">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="50" />
<RowDefinition Height="*" MinHeight="100" />
<RowDefinition Height="50" />
</Grid.RowDefinitions>
<Border
Grid.Row="0"
Margin="0,0,0,10"
Background="#d8d8d8"
CornerRadius="5">
<DockPanel
Grid.Row="0"
Width="300"
HorizontalAlignment="Left">
<TextBlock
Margin="5,0"
VerticalAlignment="Center"
DockPanel.Dock="Left"
Text="提示" />
<Button
Margin="5,0"
HorizontalAlignment="Right"
Click="DialogCloseBtn_Click"
Content="X"
DockPanel.Dock="Right" />
</DockPanel>
</Border>
<TextBlock
Grid.Row="1"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="{Binding ErrorMessage}"
TextWrapping="Wrap" />
<Border
Grid.Row="2"
Margin="0,10,0,0"
Background="#b2b2b2"
CornerRadius="5">
<Grid>
<StackPanel
Margin="5"
HorizontalAlignment="Right"
VerticalAlignment="Center">
<Button
x:Name="DialogCloseBtn"
Click="DialogCloseBtn_Click"
Content="确定" />
</StackPanel>
</Grid>
</Border>
</Grid>
</hc:SimpleStackPanel>
</Border>
</hc:Dialog>
</Grid>
</Window>