Views/BackupView.xaml
(开头部分) 6KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<UserControl x:Class="Passwords.Views.BackupView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="clr-namespace:Passwords.ViewModels"
xmlns:utils="clr-namespace:Passwords.Utils"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:models="clr-namespace:Passwords.Models"
xmlns:controls="clr-namespace:Passwords.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions"
mc:Ignorable="d"
d:DesignHeight="396" d:DesignWidth="745">
<UserControl.Resources>
<utils:CountToPasswordConverter x:Key="countConverter"/>
<Style TargetType="Button" BasedOn="{StaticResource textButtonStyle}">
<Setter Property="FontSize" Value="14" />
</Style>
<DataTemplate x:Key="ItemTemplate">
<StackPanel x:Name="panel" Margin="5,0,5,15" Width="200" >
<StackPanel.InputBindings>
<MouseBinding Gesture="LeftDoubleClick" Command="{x:Static vm:BackupCommands.Open}"/>
</StackPanel.InputBindings>
<TextBlock Text="{Binding Name}" FontSize="18" FontWeight="Bold" />
<TextBlock x:Name="meta" Text="{Binding Text}" />
<TextBlock x:Name="state" Text="{Binding State}" Foreground="{DynamicResource AppAccentBrush}" />
<StackPanel.ContextMenu>
<ContextMenu>
<MenuItem Header="{Binding rs.MiDelete, Source={StaticResource locale}}" Command="{x:Static vm:BackupCommands.Delete}"/>
<MenuItem Header="{Binding rs.MiExport, Source={StaticResource locale}}" Command="{x:Static vm:BackupCommands.Export}"/>
<MenuItem Header="{Binding rs.MiOpen, Source={StaticResource locale}}" Command="{x:Static vm:BackupCommands.Open}"/>
<MenuItem Header="{Binding rs.MiRestore, Source={StaticResource locale}}" Command="{x:Static vm:BackupCommands.Restore}"/>
</ContextMenu>
</StackPanel.ContextMenu>
</StackPanel>
<DataTemplate.Triggers>
<DataTrigger Binding="{Binding IsSelected, RelativeSource={RelativeSource TemplatedParent}}" Value="True">
<!--<Setter Property="Foreground" Value="White" TargetName="meta"/>-->
<Setter Property="Foreground" Value="White" TargetName="state"/>
</DataTrigger>
<DataTrigger Binding="{Binding IsUploading}" Value="true">
<Setter Property="TextBlock.Foreground" Value="Red" TargetName="panel"/>
</DataTrigger>
</DataTemplate.Triggers>
</DataTemplate>
<ControlTemplate x:Key="backupControlTemplate">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<TextBlock Text="backup & restore" FontSize="48" FontWeight="Light" VerticalAlignment="Top" Margin="10,5,25,20" TextTrimming="CharacterEllipsis"/>
<StackPanel Grid.Row="1" Orientation="Horizontal" Margin="10,0" Background="{DynamicResource TransparentChromeBrush}" >
<Button Content="{Binding rs.ImportBtn, Source={StaticResource locale}}" Margin="8,2,2,2" Command="{x:Static vm:BackupCommands.Import}"/>
<Separator Style="{StaticResource lineSepStyle}"/>
<Button Content="{Binding rs.ExportBtn, Source={StaticResource locale}}" Margin="2" Command="{x:Static vm:BackupCommands.Export}"/>
后面还有 49 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
