123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544 |
- <Window x:Class="XHZB.Desktop.UserCenterWindow"
- 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:Views="clr-namespace:Common.ZB;assembly=Common" xmlns:cv="clr-namespace:XHZB.Desktop.Utils"
- Title="星火智慧校园"
- Width="1066"
- Height="768"
- AllowsTransparency="True"
- Closing="Window_Closing"
- WindowStartupLocation="CenterScreen"
- WindowStyle="None"
- mc:Ignorable="d" BorderThickness="1">
- <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="32" Padding="0,16,3,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="50"></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>
- <Border Grid.Column="0" BorderThickness="0.6" BorderBrush="#c0c0c0" CornerRadius="1,0,0,1" Background="#edeeee">
-
- </Border>
- <!--文字区域背景和边线样式-->
- <TextBox Background="#edeeee" Padding="10,0,0,0" VerticalAlignment="Center" Grid.Column="0" Foreground="Black" BorderBrush="#c0c0c0" BorderThickness="0" IsReadOnly="{TemplateBinding IsReadOnly}" Text="{TemplateBinding Text}"></TextBox>
-
- <!--右侧下拉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>
-
- <cv:ColorBgConverter x:Key="colorBgConvert" />
- <cv:ColorTextConverter x:Key="colorTextConvert" />
-
- <Style x:Key="ButtonStyle">
- <Setter Property="Button.Width" Value="35"/>
- <Setter Property="Button.Height" Value="35"/>
- <Setter Property="Button.Margin" Value="3,0,0,0"/>
- </Style>
-
- <Style x:Key="ListBoxItemContainerStyle" TargetType="{x:Type ListBoxItem}">
- <Setter Property="HorizontalContentAlignment" Value="Stretch" />
- <Setter Property="HorizontalAlignment" Value="Stretch" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ListBoxItem}">
- <Border
- Background="Transparent"
- BorderBrush="Transparent"
- BorderThickness="0">
- <ContentPresenter />
- </Border>
- <ControlTemplate.Triggers />
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <DataTemplate x:Key="zhangjieDt">
- <Border
- Grid.Column="1"
- Grid.ColumnSpan="3"
- Height="Auto"
- Background="White"
- CornerRadius="0,0,0,0">
- <Grid>
- <Button Cursor="Hand"
- Margin="0,0,0,0"
- HorizontalAlignment="Stretch"
- Click="zhangjieClick"
- Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"
- Tag="{Binding}">
- <Button.Template>
- <ControlTemplate TargetType="{x:Type Button}">
- <Border
- BorderBrush="{TemplateBinding Control.BorderBrush}"
- BorderThickness="0"
- CornerRadius="0">
- <ContentPresenter VerticalAlignment="Center" Content="{TemplateBinding ContentControl.Content}" />
- </Border>
- </ControlTemplate>
- </Button.Template>
- <TextBlock
- Padding="13" FontSize="13"
- Background="{Binding selected, Converter={StaticResource colorBgConvert}}"
- Foreground="{Binding selected, Converter={StaticResource colorTextConvert}}"
- Text="{Binding directorname}" />
- </Button>
- </Grid>
- </Border>
- </DataTemplate>
- <DataTemplate x:Key="ToolbarMenu">
-
-
- <Border Grid.Column="1"
- Grid.ColumnSpan="3"
- Height="100"
- Margin="10,15,10,0"
- Background="#edeeee"
- CornerRadius="6">
- <Border
- Margin="2"
- Background="White"
- CornerRadius="6">
- <Grid Height="100" >
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="80" />
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="160" />
- </Grid.ColumnDefinitions>
- <Image
- x:Name="imgResourceMyList"
- Grid.Column="0"
-
- Height="80"
- Margin="15,0,0,0"
- Source="{Binding Pic, Mode=TwoWay}" />
- <Grid Grid.Column="1">
- <Grid.RowDefinitions>
- <RowDefinition Height="*" />
- <RowDefinition Height="*" />
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
- <TextBlock
- x:Name="txbFileName"
- Grid.Row="0"
- Margin="15,15,0,0"
- VerticalAlignment="Center"
- FontSize="20"
- Text="{Binding ResourceName, Mode=TwoWay}" />
- <StackPanel
- Grid.Row="1"
- Margin="15,0,0,2"
- Orientation="Horizontal">
- <TextBlock
- Margin="5,0,0,0"
- VerticalAlignment="Center"
- FontSize="16"
- Text="大小: " />
- <TextBlock
- Margin="5,0,0,0"
- VerticalAlignment="Center"
- FontSize="16"
- Text="{Binding Resourcesize, Mode=TwoWay}" />
- <TextBlock
- Margin="15,0,0,0"
- VerticalAlignment="Center"
- FontSize="16"
- Text="时间: " />
- <TextBlock
- Margin="5,2,0,0"
- VerticalAlignment="Center"
- FontSize="16"
- Text="{Binding Times, Mode=TwoWay}" />
- <TextBlock
- Margin="15,0,0,0"
- VerticalAlignment="Center"
- FontSize="16"
- Text="时长: "
- Visibility="{Binding VisDuration}" />
- <TextBlock
- Margin="5,0,0,0"
- VerticalAlignment="Center"
- FontSize="16"
- Text="{Binding Duration}"
- Visibility="{Binding VisDuration}" />
- </StackPanel>
- </Grid>
- <Button
- x:Name="btnDownload"
- Grid.Column="2"
- Width="100"
- Height="46"
- Margin="0,0,15,0"
- Padding="0,0,0,0"
- HorizontalAlignment="Right"
- Click="btnDownload_Click"
- Cursor="Hand"
- FontSize="16"
- Foreground="#FFFFFF"
- Tag="{Binding Resourceid}"
- Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
- <StackPanel Orientation="Horizontal" Visibility="{Binding VisDownload}">
- <TextBlock
- Margin="0,0,0,0"
- FontSize="18"
- Foreground="#FFFFFF"
- Text="下载" />
- </StackPanel>
- <Button.Template>
- <ControlTemplate TargetType="{x:Type Button}">
- <Border
- BorderBrush="{TemplateBinding Control.BorderBrush}"
- BorderThickness="1"
- CornerRadius="8">
- <Border.Background>#6098FF</Border.Background>
- <ContentPresenter
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Content="{TemplateBinding ContentControl.Content}" />
- </Border>
- </ControlTemplate>
- </Button.Template>
- </Button>
- <Button
- x:Name="btnTurnOn"
- Grid.Column="2"
- Width="100"
- Height="46"
- Margin="0,0,15,0"
- Padding="0,0,0,0"
- HorizontalAlignment="Right"
- Click="btnTurnOn_Click"
- Cursor="Hand"
- FontSize="16"
- Foreground="#FFFFFF"
- Tag="{Binding Resourceid}"
- Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"
- Visibility="{Binding VisButton}">
- <StackPanel Orientation="Horizontal">
- <TextBlock
- Margin="0,0,0,0"
- FontSize="18"
- Foreground="#FFFFFF"
- Text="打开" />
- </StackPanel>
- <Button.Template>
- <ControlTemplate TargetType="{x:Type Button}">
- <Border
- BorderBrush="{TemplateBinding Control.BorderBrush}"
- BorderThickness="1"
- CornerRadius="8">
- <Border.Background>#FC854B</Border.Background>
- <ContentPresenter
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Content="{TemplateBinding ContentControl.Content}" />
- </Border>
- </ControlTemplate>
- </Button.Template>
- </Button>
- </Grid>
- </Border>
- </Border>
- </DataTemplate>
- </Window.Resources>
- <Grid
- Width="1066"
- Height="768"
- Margin="0,0,0,0"
- Visibility="Visible">
-
- <Views:ClippingBorder
- Background="#fafafa"
- BorderBrush="#33000000"
- BorderThickness="1"
- CornerRadius="20">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="64" />
- <RowDefinition Height="*" />
- </Grid.RowDefinitions>
- <Grid
- Grid.Row="0"
- Background="#4597FF"
- MouseMove="Window_MouseMove">
- <TextBlock
- Grid.Row="0"
- Margin="15,0,0,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- FontSize="26"
- Foreground="White"
- Text="个人空间" />
-
- <Button Cursor="Hand"
- x:Name="btnDown"
- Grid.Column="0"
- Width="46"
- Height="46"
- Margin="0,0,10,0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Background="White"
- Click="btnDown_Click"
- Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
- <Button.Template>
- <ControlTemplate TargetType="{x:Type Button}">
- <Border
- BorderBrush="{TemplateBinding Control.BorderBrush}"
- BorderThickness="0"
- CornerRadius="20">
- <ContentPresenter
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Content="{TemplateBinding ContentControl.Content}" />
- </Border>
- </ControlTemplate>
- </Button.Template>
- <Image
- Width="40"
- Height="40"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Source="./Images/RollCall/rollCall_1.png"
- Stretch="Fill" />
- </Button>
- </Grid>
- <Grid Grid.Row="1">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="300" />
- <ColumnDefinition Width="3*" />
- </Grid.ColumnDefinitions>
- <!-- 区域 左 -->
- <Border
- Grid.Column="0"
- Margin="0,0,0,0"
- Background="#FFFFFF"
- CornerRadius="0,0,20,0">
- <Grid Grid.Column="0">
- <Grid.RowDefinitions>
- <RowDefinition Height="50" />
- <RowDefinition Height="*" />
- </Grid.RowDefinitions>
- <ComboBox Cursor="Hand"
- x:Name="cmbClass"
- Grid.Row="0"
- Padding="10,0,10,0"
- Style="{StaticResource ComboBoxStyle}"
- VerticalContentAlignment="Center"
- BorderThickness="0"
- DisplayMemberPath="Value"
- FontSize="16"
- ItemsSource="{Binding bookList}"
- SelectedValuePath="Key"
- SelectionChanged="cmbClass_SelectionChanged" />
- <ListBox
- Grid.Row="1"
- Margin="0,0,0,0"
- Background="#FAFAFA"
- BorderThickness="0"
- ItemContainerStyle="{DynamicResource ListBoxItemContainerStyle}"
- ItemTemplate="{StaticResource zhangjieDt}"
- ItemsSource="{Binding zhangjieList}"
- ScrollViewer.HorizontalScrollBarVisibility="Disabled"
- ScrollViewer.VerticalScrollBarVisibility="Visible" />
- </Grid>
- </Border>
- <Grid Grid.Column="1">
- <Grid.RowDefinitions>
- <RowDefinition Height="50" />
- <RowDefinition Height="*" />
- </Grid.RowDefinitions>
- <StackPanel
- Grid.Row="0"
- Grid.Column="1"
- Margin="0,0,0,0"
- Background="#fafafa"
- Orientation="Horizontal">
- <TextBlock
- Padding="20,20,0,0"
- FontSize="16"
- Text="类型:" />
- <Border x:Name="borAll" CornerRadius="6" Width="72" Height="40" Background="DodgerBlue" Margin="0,6,10,0">
- <Button Cursor="Hand" Foreground="White"
- x:Name="btnAll" Height="40"
- Width="72"
- Padding="0,10,0,10"
- Click="btnAll_Click"
- Content="全部"
- FontSize="16"
- Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" >
-
- </Button>
- </Border>
- <Border x:Name="borAudio" CornerRadius="7" Width="72" Height="40" Margin="0,6,10,0">
- <Button Cursor="Hand"
- x:Name="btnAudio"
- Width="72"
- Padding="0,10,0,10"
- Click="btnAudio_Click"
- Content="音频"
- FontSize="16"
- Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" />
- </Border>
- <Border x:Name="borVideo" CornerRadius="7" Width="72" Height="40" Margin="0,6,10,0">
- <Button Cursor="Hand"
- x:Name="btnVideo"
- Width="72"
- Padding="0,10,0,10"
- Click="btnVideo_Click"
- Content="视频"
- FontSize="16"
- Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" />
- </Border>
- <Border x:Name="borImage" CornerRadius="7" Width="72" Height="40" Margin="0,6,10,0">
- <Button Cursor="Hand"
- x:Name="btnImage"
- Width="72"
- Padding="0,10,0,10"
- Click="btnImage_Click"
- Content="图片"
- FontSize="16"
- Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"
- />
- </Border>
- <Border x:Name="borDoc" CornerRadius="7" Width="72" Height="40" Margin="0,6,10,0">
- <Button Cursor="Hand"
- x:Name="btnDoc"
- Width="72"
- Padding="0,10,0,10"
- Click="btnDoc_Click"
- Content="文档"
- FontSize="16"
- Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" />
- </Border>
- </StackPanel>
- <ListBox
- x:Name="toolbar_list"
- Grid.Row="1"
- Margin="0,0,0,0"
- Background="#FAFAFA"
- BorderThickness="0"
- ItemContainerStyle="{DynamicResource ListBoxItemContainerStyle}"
- ItemTemplate="{StaticResource ToolbarMenu}"
- ItemsSource="{Binding menuList}"
- ScrollViewer.HorizontalScrollBarVisibility="Disabled"
- ScrollViewer.VerticalScrollBarVisibility="Visible" />
- </Grid>
- </Grid>
- </Grid>
- </Views:ClippingBorder>
-
- <Views:ClippingBorder
- x:Name="tip_outer"
- Width="760"
- Height="44"
- Margin="0,0,0,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Background="#FAFAFA"
- CornerRadius="4"
- Visibility="Collapsed">
- <Grid>
- <ProgressBar BorderBrush="#4597FF"
- Foreground="#4597FF"
- Grid.Row="0"
- x:Name="pgbProcess"
- Height="20"
- Margin="10"
- Visibility="Visible" />
- <Label Grid.Row="0"
- HorizontalAlignment="Center" Width="160"
- x:Name="lbProcess"
- Height="30"
- Margin="0,0,0,0"
- FontSize="16"
- Content=""
- Foreground="White"
- Visibility="Visible" />
- </Grid>
- </Views:ClippingBorder>
- </Grid>
- </Window>
|