ExcelHelper/MainWindow.xaml

59 lines
3.0 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:SideMenu>
<Frame
x:Name="MainFrame"
Grid.Column="1"
NavigationUIVisibility="Hidden" />
<hc:Dialog Background="Transparent" x:Name="MessageDialog" Visibility="Collapsed" Grid.Column="0" Grid.ColumnSpan="2">
<Border BorderBrush="Gray" Background="White" BorderThickness="1" CornerRadius="5" Padding="0">
<hc:SimpleStackPanel ClipToBounds="True" Orientation="Vertical" Height="300" Width="300" >
<Grid Margin="5" >
<Grid.RowDefinitions>
<RowDefinition Height="50"/>
<RowDefinition Height="*" MinHeight="200"/>
<RowDefinition Height="50"/>
</Grid.RowDefinitions>
<DockPanel Width="300" Grid.Row="0" HorizontalAlignment="Left" >
<TextBlock Margin="5,0" DockPanel.Dock="Left" Text="12312312" VerticalAlignment="Center"/>
<Button Click="DialogCloseBtn_Click" Margin="15,0" HorizontalAlignment="Right" DockPanel.Dock="Right" Content="X"/>
</DockPanel>
<TextBlock Grid.Row="1" TextWrapping="Wrap" VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding ErrorMessage}"/>
<StackPanel Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Right">
<Button x:Name="DialogCloseBtn" Content="确定" Click="DialogCloseBtn_Click"/>
</StackPanel>
</Grid>
</hc:SimpleStackPanel>
</Border>
</hc:Dialog>
</Grid>
</Window>