|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472 |
- <Window x:Class="XHZB.Desktop.LoginWindow"
- 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:XHZB.Desktop" xmlns:util="clr-namespace:XHZB.Desktop.Utils"
- Width="480"
- Height="384"
- AllowsTransparency="True"
- Loaded="Window_Loaded"
- MouseLeftButtonDown="Window_MouseLeftButtonDown_1"
- ResizeMode="NoResize"
- ShowInTaskbar="True"
- SizeChanged="Window_SizeChanged"
- WindowStartupLocation="CenterScreen"
- WindowState="Normal"
- WindowStyle="None"
- mc:Ignorable="d" BorderThickness="7">
- <Window.Effect>
- <DropShadowEffect BlurRadius="10" Color="#bababa" Direction="80" ShadowDepth="0"/>
- </Window.Effect>
- <Window.Background>
- <SolidColorBrush Opacity="1" />
- </Window.Background>
- <Window.Resources>
- <!--Combox右侧下拉按钮-->
- <Style TargetType="ToggleButton" x:Key="ComboxStyleBtn">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate>
- <!--下拉按钮内部背景色-->
- <Border x:Name="Back" Background="Transparent" BorderThickness="1" BorderBrush="Transparent">
- <!--下拉按钮内边框-->
- <Label Name="PathFill" Content="ˇ" FontSize="28" Padding="0,7,12,0" HorizontalAlignment="Right">
-
- </Label>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
-
- <Setter TargetName="Back" Property="Background" Value="Transparent"></Setter>
- <Setter TargetName="Back" Property="BorderBrush" Value="Transparent"></Setter>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <!--Combox-->
- <Style TargetType="ComboBox" x:Key="ComboBoxStyle">
- <Setter Property="ItemContainerStyle">
- <Setter.Value>
- <!--ComBoxItem-->
- <Style TargetType="ComboBoxItem">
- <Setter Property="MinHeight" Value="32"></Setter>
- <Setter Property="MinWidth" Value="60"></Setter>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="ComboBoxItem">
- <Border Name="Back" Background="Transparent" BorderThickness="0,0,0,0" BorderBrush="#f3f3f3">
- <ContentPresenter ContentSource="{Binding Source}" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,0,0,0" ></ContentPresenter>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter TargetName="Back" Property="Background" Value="#f3f3f3"></Setter>
- </Trigger>
- <!--下拉框背景色-->
- <Trigger Property="IsHighlighted" Value="True">
- <Setter TargetName="Back" Property="Background" Value="#f3f3f3"></Setter>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </Setter.Value>
- </Setter>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="ComboBox">
- <Grid>
- <Grid.ColumnDefinitions>
-
- </Grid.ColumnDefinitions>
- <!--文字区域背景和边线样式-->
- <TextBox Background="#FFFFFF" Padding="10,0,0,0" VerticalAlignment="Center" Grid.Column="0" Foreground="Black" BorderBrush="#c0c0c0" BorderThickness="0" IsReadOnly="{TemplateBinding IsReadOnly}" Text="{TemplateBinding Text}"></TextBox>
- <Border Grid.Column="0" BorderThickness="0.6" BorderBrush="#c0c0c0" CornerRadius="1,0,0,1">
-
- </Border>
- <!--右侧下拉button设置-->
- <Border Grid.Column="1" BorderThickness="0,0.6,0.6,0.6" BorderBrush="#c0c0c0" CornerRadius="0,1,1,0" >
- <ToggleButton BorderThickness="3" BorderBrush="Black" Style="{StaticResource ComboxStyleBtn}" IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" ClickMode="Press"></ToggleButton>
- </Border>
- <!--弹出popup整体设置-->
- <Popup IsOpen="{TemplateBinding IsDropDownOpen}" Placement="Bottom" x:Name="Popup" Focusable="False" AllowsTransparency="True" PopupAnimation="Slide">
- <!--弹出popup边框-->
- <Border CornerRadius="1" BorderBrush="#d2d2d2" BorderThickness="1,0,1,1" MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{TemplateBinding ActualWidth}" x:Name="DropDown" SnapsToDevicePixels="True">
- <Border.Effect>
- <DropShadowEffect Color="Black" BlurRadius="2" ShadowDepth="0" Opacity="1"/>
- </Border.Effect>
- <!--下拉幕布边界背景设置 MaxHeight="{TemplateBinding MaxDropDownHeight}"-->
- <ScrollViewer Margin="0,0,0,0" SnapsToDevicePixels="True" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" BorderBrush="#17acae" BorderThickness="2" >
- <!-- StackPanel 用于显示子级,方法是将 IsItemsHost 设置为 True -->
- <StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Contained" Background="#FFFFFF"/>
- </ScrollViewer>
- </Border>
- </Popup>
- </Grid>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
-
-
-
-
- <util:GenericTypeConverter x:Key="ZJGenericTypeConverter" />
-
- <Style x:Key="oiliu" TargetType="ListBoxItem">
- <!-- 设置控件模板 -->
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="ListBoxItem">
- <Border
- Margin="4,0,0,0"
- Padding="0"
- Background="{TemplateBinding Background}">
- <ContentPresenter
- HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
- TextBlock.Foreground="{TemplateBinding Foreground}" />
- </Border>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </Window.Resources>
-
- <Viewbox>
- <Grid Width="480" Height="384" >
- <Grid.RowDefinitions>
- <RowDefinition Height="*" />
- </Grid.RowDefinitions>
- <Grid.Background>
- <ImageBrush x:Name="imgBrush" ImageSource="/Images/Login/login2_0_1.png" />
- </Grid.Background>
- <StackPanel Margin="10,0,0,0">
- <Image
- Width="30"
- Height="21"
- Margin="0,10,0,0"
- HorizontalAlignment="Left"
- Source=".\Images\Login\logo@2x.png" />
- <TextBlock
- Margin="35,-20,0,0"
- FontSize="13"
- Foreground="White"
- Text="星火直播" />
- <Button
- x:Name="btnDown"
- Width="30.8"
- Height="30.8"
- Margin="0,-25,5,0"
- HorizontalAlignment="Right"
- Click="btnDown_Click"
- Cursor="Hand"
- Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
- <Button.Template>
- <ControlTemplate TargetType="{x:Type Button}">
- <Border
- BorderBrush="{TemplateBinding Control.BorderBrush}"
- BorderThickness="1"
- CornerRadius="20,20,20,20">
- <Border.Background>#FFFFFFFF</Border.Background>
- <ContentPresenter
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Content="{TemplateBinding ContentControl.Content}" />
- </Border>
- </ControlTemplate>
- </Button.Template>
- <Image Source=".\Images\Login\组 1@2x(1).png" />
- </Button>
- </StackPanel>
- <Grid
- x:Name="grLogin"
- Margin="0,0,0,0"
- Visibility="Visible">
- <Grid.RowDefinitions>
- <RowDefinition Height="auto" />
- <RowDefinition Height="34.7" />
- <RowDefinition Height="37" />
- <RowDefinition Height="17.3" />
- <RowDefinition Height="37" />
- <RowDefinition Height="15.1" />
- <RowDefinition Height="auto" />
- <RowDefinition Height="12.8" />
- <RowDefinition Height="37" />
- <RowDefinition Height="*" />
- </Grid.RowDefinitions>
-
- <!--<Image
- Grid.Row="0"
- Width="228"
- Height="34.5"
- Margin="0,66.2,0,0"
- HorizontalAlignment="Center"
- Source=".\Images\Login\智慧校园@2x.png" />-->
- <Label Content="星 火 直 播" Grid.Row="0" Width="200" Margin="0,66.2,0,0" Foreground="White" FontSize="35" FontWeight="Bold" HorizontalContentAlignment="Center" />
- <Border
- Grid.Row="2"
- Width="272"
- HorizontalAlignment="Center"
- Background="White"
- CornerRadius="17">
- <TextBox
- x:Name="txbAccountNumber"
- Grid.Row="2"
- Width="272"
- Padding="40,10,0,0"
- Background="Transparent"
- BorderBrush="{x:Null}"
- BorderThickness="0"
- FontSize="15"
- Foreground="#333333"
- MouseLeftButtonDown="txbAccountNumber_MouseLeftButtonDown"
- Text="" />
- </Border>
- <Image
- Grid.Row="2"
- Width="13"
- Height="14"
- Margin="120,0,0,0"
- HorizontalAlignment="Left"
- Source=".\Images\Login\data copy 2@2x.png" />
- <Border
- Grid.Row="4"
- Width="272"
- HorizontalAlignment="Center"
- Background="White"
- CornerRadius="17">
- <PasswordBox
- x:Name="pobPassword"
- Grid.Row="4"
- Width="230"
- Padding="20,10,0,0"
- Background="Transparent"
- BorderBrush="{x:Null}"
- BorderThickness="0"
- FontSize="15"
- Foreground="#333333"
- PasswordChar="*" />
- </Border>
- <Image
- Grid.Row="4"
- Width="13"
- Height="14"
- Margin="120,0,0,0"
- HorizontalAlignment="Left"
- Source=".\Images\Login\account copy 2@2x.png" />
- <CheckBox Cursor="Hand"
- x:Name="ckSaveName"
- Grid.Row="6"
- Width="15.4"
- Height="15.4"
- Margin="120,0,0,0"
- HorizontalAlignment="Left"
- Click="ckSaveName_Click" />
- <TextBlock
- Grid.Row="6"
- Margin="145,0,0,0"
- FontSize="15"
- Foreground="White"
- Text="记住账号" />
-
- <Button
- x:Name="btnLogin"
- Grid.Row="8"
- Width="272"
- Height="37"
- Click="btnLogin_Click"
- Content="立即登录"
- FontSize="17"
- IsDefault="True"
- Cursor="Hand"
- Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
- <Button.Template>
- <ControlTemplate TargetType="{x:Type Button}">
- <Border
- BorderBrush="{TemplateBinding Control.BorderBrush}"
- BorderThickness="1"
- CornerRadius="17">
- <Border.Background>#FFFFFFFF</Border.Background>
- <ContentPresenter
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Content="{TemplateBinding ContentControl.Content}" />
- </Border>
- </ControlTemplate>
- </Button.Template>
- </Button>
- </Grid>
-
- <Grid x:Name="grLoginTwo" Visibility="Collapsed">
- <Grid.RowDefinitions>
- <RowDefinition Height="36" />
- <RowDefinition Height="64" />
- <!-- 班级 -->
- <RowDefinition Height="*" />
- </Grid.RowDefinitions>
-
- <TextBlock Padding="0,0,0,10"
- x:Name="txbHeader"
- Grid.Row="1"
- Grid.ColumnSpan="2"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Block.TextAlignment="Center"
- FontSize="30"
- Foreground="White"
- Text="老师,您好!"
- TextAlignment="Center"
- TextWrapping="WrapWithOverflow" />
-
- <Grid Grid.Row="2" Background="White">
-
- <Grid Margin="36,0,36,0">
- <Grid.RowDefinitions>
- <RowDefinition Height="24" />
- <RowDefinition Height="35" />
- <RowDefinition Height="24" />
- <RowDefinition Height="35" />
- <RowDefinition Height="24" />
- <RowDefinition Height="35" />
- <RowDefinition Height="*" />
- <RowDefinition Height="80" />
- <RowDefinition Height="*" />
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="50" />
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
- <TextBlock
- x:Name="txbClass"
- Grid.Row="1"
- Grid.Column="0"
- Padding="0,0,0,0"
- VerticalAlignment="Center"
- Background="Transparent"
- FontSize="16"
- Foreground="Black"
- Text="班级:" />
- <ComboBox Cursor="Hand"
- x:Name="cmbClass"
- Grid.Row="1"
- Grid.Column="1"
- Height="auto"
- Margin="0,0,0,0"
- Padding="10,0,0,0"
- VerticalContentAlignment="Center"
- DisplayMemberPath="Value"
- Style="{StaticResource ComboBoxStyle}"
- FontSize="14"
- SelectedValuePath="Key">
- <ComboBox.Resources>
- <SolidColorBrush x:Key="{x:Static SystemColors.WindowBrushKey}" Color="WhiteSmoke" />
- <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Gray" />
- </ComboBox.Resources>
- </ComboBox>
- <TextBlock
- x:Name="txbSubject"
- Grid.Row="3"
- Grid.Column="0"
- VerticalAlignment="Center"
- Background="Transparent"
- FontSize="16"
- Foreground="Black"
- Text="教材:" />
-
- <ComboBox Cursor="Hand"
- x:Name="book_list"
- Grid.Row="3"
- Grid.Column="1"
- Height="auto"
- Margin="0,0,0,0"
- Padding="10,0,0,0"
- Style="{StaticResource ComboBoxStyle}"
- VerticalContentAlignment="Center"
- DisplayMemberPath="Value"
- FontSize="14"
- ItemsSource="{Binding bookList}"
- SelectedValuePath="Key"
- SelectionChanged="toolbar_list_SelectionChanged">
- <ComboBox.Resources>
- <SolidColorBrush x:Key="{x:Static SystemColors.WindowBrushKey}" Color="WhiteSmoke" />
- <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Gray" />
- </ComboBox.Resources>
- </ComboBox>
-
- <TextBlock
- x:Name="txbTeachingMaterial"
- Grid.Row="5"
- Grid.Column="0"
- VerticalAlignment="Center"
- Background="Transparent"
- FontSize="16"
- Foreground="Black"
- Text="章节:" />
- <ComboBox Cursor="Hand"
- x:Name="cmbTeachingMaterial"
- Grid.Row="5"
- Grid.Column="1"
- Padding="10,0,0,0"
- Style="{StaticResource ComboBoxStyle}"
- VerticalContentAlignment="Center"
- Background="White"
- DisplayMemberPath="Value"
- FontSize="14"
- Foreground="Black"
- ItemsSource="{Binding zhangjieList}"
- SelectedValuePath="Key" />
- <Button Cursor="Hand"
- x:Name="btnClassesBegin"
- Grid.Row="7"
- Grid.ColumnSpan="2"
- Width="328"
- Height="42"
- Click="btnClassesBegin_Click"
- Content="开始上课"
- FontSize="20"
- Foreground="White">
- <Button.Template>
- <ControlTemplate TargetType="{x:Type Button}">
- <Border
- BorderBrush="{TemplateBinding Control.BorderBrush}"
- BorderThickness="0"
- CornerRadius="21">
- <Border.Background>#2D8CF0</Border.Background>
- <ContentPresenter
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Content="{TemplateBinding ContentControl.Content}" />
- </Border>
- </ControlTemplate>
- </Button.Template>
- </Button>
- </Grid>
- </Grid>
- </Grid>
-
- <StackPanel Orientation="Horizontal">
- <TextBlock
- x:Name="version_tb"
- Margin="10,0,0,10"
- HorizontalAlignment="Left"
- VerticalAlignment="Bottom"
- FontSize="16"
- Foreground="White"
- Text="测试版" />
- </StackPanel>
- <Button x:Name="btnSetUp" Height="25" Width="66" HorizontalAlignment="Right" Cursor="Hand" Margin="0,0,5,6" VerticalAlignment="Bottom" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="btnSetUp_Click" Visibility="Hidden">
- <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
- <Image Source=".\Images\Login\设置@2x.png"/>
- <TextBlock Text="设置" Foreground="White" FontSize="16" HorizontalAlignment="Right"
- VerticalAlignment="Bottom"/>
- </StackPanel>
- </Button>
- <!--<Button Content="Button" HorizontalAlignment="Left" Margin="380,79,0,0" VerticalAlignment="Top" Width="75" Click="Button_Click"/>-->
- </Grid>
- </Viewbox>
- </Window>
|