mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-04 16:10:16 -04:00
Created TextBox with Forward button style for Entry Url
Created PasswordBox with always visible Forward button for Open Database user control
This commit is contained in:
@@ -4,49 +4,12 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
RequestedTheme="Light">
|
RequestedTheme="Light">
|
||||||
<Application.Resources>
|
<Application.Resources>
|
||||||
<Style TargetType="ToggleButton" x:Name="HamburgerToggleButton">
|
<ResourceDictionary>
|
||||||
<Setter Property="Template">
|
<ResourceDictionary.MergedDictionaries>
|
||||||
<Setter.Value>
|
<ResourceDictionary Source="Styles/TextBoxWithButtonStyle.xaml" />
|
||||||
<ControlTemplate TargetType="ToggleButton">
|
<ResourceDictionary Source="Styles/HamburgerButtonStyle.xaml" />
|
||||||
<ContentControl>
|
</ResourceDictionary.MergedDictionaries>
|
||||||
<Grid Background="Transparent" Margin="0" Width="77" Height="77">
|
</ResourceDictionary>
|
||||||
<Canvas x:Name="hampurger_menu" HorizontalAlignment="Center" Height="17" UseLayoutRounding="False" VerticalAlignment="Center" Width="28">
|
|
||||||
<Canvas x:Name="Layer_1" Height="17" Canvas.Left="0" Width="28" Margin="0" RenderTransformOrigin="0.5,0.5">
|
|
||||||
<Canvas.RenderTransform>
|
|
||||||
<CompositeTransform/>
|
|
||||||
</Canvas.RenderTransform>
|
|
||||||
<Canvas.Projection>
|
|
||||||
<PlaneProjection/>
|
|
||||||
</Canvas.Projection>
|
|
||||||
<Path x:Name="path" Data="M0,12.997 L30,12.997" Height="3" Stretch="Fill" StrokeThickness="3" Width="28" Stroke="{ThemeResource DefaultTextForegroundThemeBrush}" StrokeStartLineCap="Square" StrokeEndLineCap="Square" RenderTransformOrigin="0.5,0.5">
|
|
||||||
<Path.RenderTransform>
|
|
||||||
<CompositeTransform/>
|
|
||||||
</Path.RenderTransform>
|
|
||||||
</Path>
|
|
||||||
<Path Data="M0,12.997 L30,12.997" Height="3" Stretch="Fill" StrokeThickness="3" Width="28" Stroke="{ThemeResource DefaultTextForegroundThemeBrush}" StrokeStartLineCap="Square" StrokeEndLineCap="Square" Canvas.Top="7"/>
|
|
||||||
<Path x:Name="path1" Data="M0,12.997 L30,12.997" Height="3" Stretch="Fill" StrokeThickness="3" Width="28" Stroke="{ThemeResource DefaultTextForegroundThemeBrush}" StrokeStartLineCap="Square" StrokeEndLineCap="Square" Canvas.Top="14" RenderTransformOrigin="0.5,0.5">
|
|
||||||
<Path.RenderTransform>
|
|
||||||
<CompositeTransform/>
|
|
||||||
</Path.RenderTransform>
|
|
||||||
</Path>
|
|
||||||
</Canvas>
|
|
||||||
</Canvas>
|
|
||||||
</Grid>
|
|
||||||
</ContentControl>
|
|
||||||
</ControlTemplate>
|
|
||||||
</Setter.Value>
|
|
||||||
</Setter>
|
|
||||||
<Setter Property="VerticalAlignment" Value="Top" />
|
|
||||||
<Setter Property="HorizontalAlignment" Value="Left" />
|
|
||||||
<Setter Property="Margin" Value="20" />
|
|
||||||
</Style>
|
|
||||||
<Style x:Key="HeaderTextBoxStyle" TargetType="TextBox">
|
|
||||||
<Setter Property="FontSize" Value="56"/>
|
|
||||||
<Setter Property="FontWeight" Value="Light"/>
|
|
||||||
<Setter Property="BorderBrush" Value="Transparent" />
|
|
||||||
<Setter Property="Background" Value="Transparent" />
|
|
||||||
<!--<Setter Property="LineHeight" Value="40"/>-->
|
|
||||||
</Style>
|
|
||||||
</Application.Resources>
|
</Application.Resources>
|
||||||
|
|
||||||
</Application>
|
</Application>
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
MainPackage=C:\Users\GBE\Source\Repos\ModernKeePass\ModernKeePass\bin\Release\ModernKeePass_1.1.0.10_AnyCPU.appx
|
MainPackage=C:\Users\GBE\Source\Repos\ModernKeePass\ModernKeePass\bin\Release\ModernKeePass_1.2.0.14_AnyCPU.appx
|
||||||
SymbolPackage=C:\Users\GBE\Source\Repos\ModernKeePass\ModernKeePass\AppPackages\ModernKeePass_1.1.0.10_Test\ModernKeePass_1.1.0.10_AnyCPU.appxsym
|
SymbolPackage=C:\Users\GBE\Source\Repos\ModernKeePass\ModernKeePass\AppPackages\ModernKeePass_1.2.0.14_Test\ModernKeePass_1.2.0.14_AnyCPU.appxsym
|
||||||
ResourcePack=C:\Users\GBE\Source\Repos\ModernKeePass\ModernKeePass\bin\Release\ModernKeePass_1.1.0.10_scale-140.appx
|
ResourcePack=C:\Users\GBE\Source\Repos\ModernKeePass\ModernKeePass\bin\Release\ModernKeePass_1.2.0.14_scale-140.appx
|
||||||
ResourcePack=C:\Users\GBE\Source\Repos\ModernKeePass\ModernKeePass\bin\Release\ModernKeePass_1.1.0.10_scale-180.appx
|
ResourcePack=C:\Users\GBE\Source\Repos\ModernKeePass\ModernKeePass\bin\Release\ModernKeePass_1.2.0.14_scale-180.appx
|
||||||
|
@@ -2,19 +2,343 @@
|
|||||||
x:Class="ModernKeePass.Controls.OpenDatabaseUserControl"
|
x:Class="ModernKeePass.Controls.OpenDatabaseUserControl"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:local="using:ModernKeePass.Controls"
|
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="65"
|
d:DesignHeight="65"
|
||||||
d:DesignWidth="335" Loaded="UserControl_Loaded">
|
d:DesignWidth="335" Loaded="UserControl_Loaded">
|
||||||
|
<UserControl.Resources>
|
||||||
|
<Style TargetType="PasswordBox" x:Name="PasswordBoxWithButtonStyle">
|
||||||
|
<Setter Property="MinWidth" Value="{ThemeResource TextControlThemeMinWidth}" />
|
||||||
|
<Setter Property="MinHeight" Value="{ThemeResource TextControlThemeMinHeight}" />
|
||||||
|
<Setter Property="Foreground" Value="{ThemeResource TextBoxForegroundThemeBrush}" />
|
||||||
|
<Setter Property="Background" Value="{ThemeResource TextBoxBackgroundThemeBrush}" />
|
||||||
|
<Setter Property="SelectionHighlightColor" Value="{ThemeResource TextSelectionHighlightColorThemeBrush}" />
|
||||||
|
<Setter Property="BorderBrush" Value="{ThemeResource TextBoxBorderThemeBrush}" />
|
||||||
|
<Setter Property="BorderThickness" Value="{ThemeResource TextControlBorderThemeThickness}" />
|
||||||
|
<Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" />
|
||||||
|
<Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}" />
|
||||||
|
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Hidden" />
|
||||||
|
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Hidden" />
|
||||||
|
<Setter Property="Padding" Value="{ThemeResource TextControlThemePadding}"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="PasswordBox">
|
||||||
|
<Grid>
|
||||||
|
<Grid.Resources>
|
||||||
|
<Style x:Name="RevealButtonStyle" TargetType="Button">
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="Button">
|
||||||
|
<Grid>
|
||||||
|
<VisualStateManager.VisualStateGroups>
|
||||||
|
<VisualStateGroup x:Name="CommonStates">
|
||||||
|
<VisualState x:Name="Normal" />
|
||||||
|
<VisualState x:Name="PointerOver">
|
||||||
|
<Storyboard>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundElement"
|
||||||
|
Storyboard.TargetProperty="Background">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextBoxButtonPointerOverBackgroundThemeBrush}" />
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement"
|
||||||
|
Storyboard.TargetProperty="BorderBrush">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextBoxButtonPointerOverBorderThemeBrush}" />
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="GlyphElement"
|
||||||
|
Storyboard.TargetProperty="Foreground">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextBoxButtonPointerOverForegroundThemeBrush}" />
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
</Storyboard>
|
||||||
|
</VisualState>
|
||||||
|
<VisualState x:Name="Pressed">
|
||||||
|
<Storyboard>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundElement"
|
||||||
|
Storyboard.TargetProperty="Background">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextBoxButtonPressedBackgroundThemeBrush}" />
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement"
|
||||||
|
Storyboard.TargetProperty="BorderBrush">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextBoxButtonPressedBorderThemeBrush}" />
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="GlyphElement"
|
||||||
|
Storyboard.TargetProperty="Foreground">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextBoxButtonPressedForegroundThemeBrush}" />
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
</Storyboard>
|
||||||
|
</VisualState>
|
||||||
|
<VisualState x:Name="Disabled">
|
||||||
|
<Storyboard>
|
||||||
|
<DoubleAnimation Storyboard.TargetName="BackgroundElement"
|
||||||
|
Storyboard.TargetProperty="Opacity"
|
||||||
|
To="0"
|
||||||
|
Duration="0" />
|
||||||
|
<DoubleAnimation Storyboard.TargetName="BorderElement"
|
||||||
|
Storyboard.TargetProperty="Opacity"
|
||||||
|
To="0"
|
||||||
|
Duration="0" />
|
||||||
|
</Storyboard>
|
||||||
|
</VisualState>
|
||||||
|
</VisualStateGroup>
|
||||||
|
</VisualStateManager.VisualStateGroups>
|
||||||
|
<Border x:Name="BorderElement"
|
||||||
|
BorderBrush="{ThemeResource TextBoxButtonBorderThemeBrush}"
|
||||||
|
BorderThickness="{TemplateBinding BorderThickness}"/>
|
||||||
|
<Border x:Name="BackgroundElement"
|
||||||
|
Background="{ThemeResource TextBoxButtonBackgroundThemeBrush}"
|
||||||
|
Margin="{TemplateBinding BorderThickness}">
|
||||||
|
<TextBlock x:Name="GlyphElement"
|
||||||
|
Foreground="{ThemeResource TextBoxButtonForegroundThemeBrush}"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
FontStyle="Normal"
|
||||||
|
Text=""
|
||||||
|
FontFamily="{ThemeResource SymbolThemeFontFamily}"
|
||||||
|
AutomationProperties.AccessibilityView="Raw"/>
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Name="GotoButtonStyle" TargetType="Button">
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="Button">
|
||||||
|
<Grid>
|
||||||
|
<VisualStateManager.VisualStateGroups>
|
||||||
|
<VisualStateGroup x:Name="CommonStates">
|
||||||
|
<VisualState x:Name="Normal" >
|
||||||
|
<Storyboard>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundElement"
|
||||||
|
Storyboard.TargetProperty="Background">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextBoxButtonPressedBackgroundThemeBrush}" />
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement"
|
||||||
|
Storyboard.TargetProperty="BorderBrush">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextBoxButtonPressedBorderThemeBrush}" />
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="GlyphElement"
|
||||||
|
Storyboard.TargetProperty="Foreground">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextBoxButtonPressedForegroundThemeBrush}" />
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
</Storyboard>
|
||||||
|
</VisualState>
|
||||||
|
<VisualState x:Name="PointerOver">
|
||||||
|
<Storyboard>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundElement"
|
||||||
|
Storyboard.TargetProperty="Background">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextBoxButtonPointerOverBackgroundThemeBrush}" />
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement"
|
||||||
|
Storyboard.TargetProperty="BorderBrush">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextBoxButtonPointerOverBorderThemeBrush}" />
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="GlyphElement"
|
||||||
|
Storyboard.TargetProperty="Foreground">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextBoxButtonPointerOverForegroundThemeBrush}" />
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
</Storyboard>
|
||||||
|
</VisualState>
|
||||||
|
<VisualState x:Name="Pressed">
|
||||||
|
<Storyboard>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundElement"
|
||||||
|
Storyboard.TargetProperty="Background">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextBoxButtonPressedBackgroundThemeBrush}" />
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement"
|
||||||
|
Storyboard.TargetProperty="BorderBrush">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextBoxButtonPressedBorderThemeBrush}" />
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="GlyphElement"
|
||||||
|
Storyboard.TargetProperty="Foreground">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextBoxButtonPressedForegroundThemeBrush}" />
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
</Storyboard>
|
||||||
|
</VisualState>
|
||||||
|
<VisualState x:Name="Disabled">
|
||||||
|
<Storyboard>
|
||||||
|
<DoubleAnimation Storyboard.TargetName="BackgroundElement"
|
||||||
|
Storyboard.TargetProperty="Opacity"
|
||||||
|
To="0"
|
||||||
|
Duration="0" />
|
||||||
|
<DoubleAnimation Storyboard.TargetName="BorderElement"
|
||||||
|
Storyboard.TargetProperty="Opacity"
|
||||||
|
To="0"
|
||||||
|
Duration="0" />
|
||||||
|
</Storyboard>
|
||||||
|
</VisualState>
|
||||||
|
</VisualStateGroup>
|
||||||
|
</VisualStateManager.VisualStateGroups>
|
||||||
|
<Border x:Name="BorderElement"
|
||||||
|
BorderBrush="{ThemeResource TextBoxButtonBorderThemeBrush}"
|
||||||
|
BorderThickness="{TemplateBinding BorderThickness}"/>
|
||||||
|
<Border x:Name="BackgroundElement"
|
||||||
|
Background="{ThemeResource TextBoxButtonBackgroundThemeBrush}"
|
||||||
|
Margin="{TemplateBinding BorderThickness}">
|
||||||
|
<TextBlock x:Name="GlyphElement"
|
||||||
|
Foreground="{ThemeResource TextBoxButtonForegroundThemeBrush}"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
FontStyle="Normal"
|
||||||
|
Text=""
|
||||||
|
Padding="4,0,4,0"
|
||||||
|
FontFamily="{ThemeResource SymbolThemeFontFamily}"
|
||||||
|
AutomationProperties.AccessibilityView="Raw"/>
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
</Grid.Resources>
|
||||||
|
<VisualStateManager.VisualStateGroups>
|
||||||
|
<VisualStateGroup x:Name="CommonStates">
|
||||||
|
<VisualState x:Name="Disabled">
|
||||||
|
<Storyboard>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundElement"
|
||||||
|
Storyboard.TargetProperty="Background">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextBoxDisabledBackgroundThemeBrush}" />
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement"
|
||||||
|
Storyboard.TargetProperty="BorderBrush">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextBoxDisabledBorderThemeBrush}" />
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentElement"
|
||||||
|
Storyboard.TargetProperty="Foreground">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextBoxDisabledForegroundThemeBrush}" />
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PlaceholderTextContentPresenter"
|
||||||
|
Storyboard.TargetProperty="Foreground">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextBoxDisabledForegroundThemeBrush}" />
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
</Storyboard>
|
||||||
|
</VisualState>
|
||||||
|
<VisualState x:Name="Normal">
|
||||||
|
<Storyboard>
|
||||||
|
<DoubleAnimation Storyboard.TargetName="BackgroundElement"
|
||||||
|
Storyboard.TargetProperty="Opacity"
|
||||||
|
Duration="0"
|
||||||
|
To="{ThemeResource TextControlBackgroundThemeOpacity}" />
|
||||||
|
<DoubleAnimation Storyboard.TargetName="BorderElement"
|
||||||
|
Storyboard.TargetProperty="Opacity"
|
||||||
|
Duration="0"
|
||||||
|
To="{ThemeResource TextControlBorderThemeOpacity}" />
|
||||||
|
</Storyboard>
|
||||||
|
</VisualState>
|
||||||
|
<VisualState x:Name="PointerOver">
|
||||||
|
<Storyboard>
|
||||||
|
<DoubleAnimation Storyboard.TargetName="BackgroundElement"
|
||||||
|
Storyboard.TargetProperty="Opacity"
|
||||||
|
Duration="0"
|
||||||
|
To="{ThemeResource TextControlPointerOverBackgroundThemeOpacity}" />
|
||||||
|
<DoubleAnimation Storyboard.TargetName="BorderElement"
|
||||||
|
Storyboard.TargetProperty="Opacity"
|
||||||
|
Duration="0"
|
||||||
|
To="{ThemeResource TextControlPointerOverBorderThemeOpacity}" />
|
||||||
|
</Storyboard>
|
||||||
|
</VisualState>
|
||||||
|
<VisualState x:Name="Focused" />
|
||||||
|
</VisualStateGroup>
|
||||||
|
<VisualStateGroup x:Name="ButtonStates">
|
||||||
|
<VisualState x:Name="ButtonVisible">
|
||||||
|
<Storyboard>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="RevealButton"
|
||||||
|
Storyboard.TargetProperty="Visibility">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0">
|
||||||
|
<DiscreteObjectKeyFrame.Value>
|
||||||
|
<Visibility>Visible</Visibility>
|
||||||
|
</DiscreteObjectKeyFrame.Value>
|
||||||
|
</DiscreteObjectKeyFrame>
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
</Storyboard>
|
||||||
|
</VisualState>
|
||||||
|
<VisualState x:Name="ButtonCollapsed" />
|
||||||
|
</VisualStateGroup>
|
||||||
|
</VisualStateManager.VisualStateGroups>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
<ColumnDefinition Width="Auto" />
|
||||||
|
<ColumnDefinition Width="Auto" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
|
<RowDefinition Height="*" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Border x:Name="BackgroundElement"
|
||||||
|
Grid.Row="1"
|
||||||
|
Background="{TemplateBinding Background}"
|
||||||
|
Margin="{TemplateBinding BorderThickness}"
|
||||||
|
Grid.ColumnSpan="3"
|
||||||
|
Grid.RowSpan="1"/>
|
||||||
|
<Border x:Name="BorderElement"
|
||||||
|
Grid.Row="1"
|
||||||
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||||||
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
|
Grid.ColumnSpan="3"
|
||||||
|
Grid.RowSpan="1"/>
|
||||||
|
<ContentPresenter x:Name="HeaderContentPresenter"
|
||||||
|
Grid.Row="0"
|
||||||
|
Foreground="{ThemeResource TextBoxForegroundHeaderThemeBrush}"
|
||||||
|
Margin="0,4,0,4"
|
||||||
|
Grid.ColumnSpan="3"
|
||||||
|
Content="{TemplateBinding Header}"
|
||||||
|
ContentTemplate="{TemplateBinding HeaderTemplate}"
|
||||||
|
FontWeight="Semilight" />
|
||||||
|
<ScrollViewer x:Name="ContentElement"
|
||||||
|
Grid.Row="1"
|
||||||
|
HorizontalScrollMode="{TemplateBinding ScrollViewer.HorizontalScrollMode}"
|
||||||
|
HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
|
||||||
|
VerticalScrollMode="{TemplateBinding ScrollViewer.VerticalScrollMode}"
|
||||||
|
VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
|
||||||
|
IsHorizontalRailEnabled="{TemplateBinding ScrollViewer.IsHorizontalRailEnabled}"
|
||||||
|
IsVerticalRailEnabled="{TemplateBinding ScrollViewer.IsVerticalRailEnabled}"
|
||||||
|
Margin="{TemplateBinding BorderThickness}"
|
||||||
|
Padding="{TemplateBinding Padding}"
|
||||||
|
IsTabStop="False"
|
||||||
|
ZoomMode="Disabled"
|
||||||
|
AutomationProperties.AccessibilityView="Raw"/>
|
||||||
|
<ContentControl x:Name="PlaceholderTextContentPresenter"
|
||||||
|
Grid.Row="1"
|
||||||
|
Foreground="{ThemeResource TextBoxPlaceholderTextThemeBrush}"
|
||||||
|
Margin="{TemplateBinding BorderThickness}"
|
||||||
|
Padding="{TemplateBinding Padding}"
|
||||||
|
IsTabStop="False"
|
||||||
|
Grid.ColumnSpan="3"
|
||||||
|
Content="{TemplateBinding PlaceholderText}"
|
||||||
|
IsHitTestVisible="False"/>
|
||||||
|
<Button x:Name="RevealButton"
|
||||||
|
Grid.Row="1"
|
||||||
|
Style="{StaticResource RevealButtonStyle}"
|
||||||
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
|
IsTabStop="False"
|
||||||
|
Grid.Column="1"
|
||||||
|
Visibility="Collapsed"
|
||||||
|
FontSize="{TemplateBinding FontSize}"
|
||||||
|
VerticalAlignment="Stretch"/>
|
||||||
|
<Button x:Name="GotoButton"
|
||||||
|
Grid.Row="1"
|
||||||
|
Style="{StaticResource GotoButtonStyle}"
|
||||||
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
|
IsTabStop="False"
|
||||||
|
Grid.Column="2"
|
||||||
|
Visibility="Visible"
|
||||||
|
FontSize="{TemplateBinding FontSize}"
|
||||||
|
VerticalAlignment="Stretch"
|
||||||
|
Click="OpenButton_OnClick" />
|
||||||
|
</Grid>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
</UserControl.Resources>
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
<StackPanel Orientation="Horizontal" Margin="0,-1,0,-1" >
|
<PasswordBox x:Name="PasswordBox" Width="300" IsPasswordRevealButtonEnabled="True" KeyDown="PasswordBox_KeyDown" PlaceholderText="Password" Style="{StaticResource PasswordBoxWithButtonStyle}"/>
|
||||||
<PasswordBox x:Name="PasswordBox" Width="300" IsPasswordRevealButtonEnabled="True" KeyDown="PasswordBox_KeyDown" PlaceholderText="Password"/>
|
<!--<StackPanel Orientation="Horizontal" Margin="0,-1,0,-1" >
|
||||||
<Button Click="OpenButton_OnClick" Width="auto" Padding="2,0">
|
<Button Click="OpenButton_OnClick" Width="auto" Padding="2,0">
|
||||||
<SymbolIcon Symbol="Forward" />
|
<SymbolIcon Symbol="Forward" />
|
||||||
</Button>
|
</Button>
|
||||||
</StackPanel>
|
</StackPanel>-->
|
||||||
<TextBlock x:Name="StatusTextBlock" Height="32" Width="auto" Foreground="#FFBF6969" FontSize="16" FontWeight="Bold" />
|
<TextBlock x:Name="StatusTextBlock" Height="32" Width="auto" Foreground="#FFBF6969" FontSize="16" FontWeight="Bold" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
21
ModernKeePass/Controls/TextBoxWithButton.cs
Normal file
21
ModernKeePass/Controls/TextBoxWithButton.cs
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
using System;
|
||||||
|
using Windows.UI.Xaml;
|
||||||
|
using Windows.UI.Xaml.Controls;
|
||||||
|
|
||||||
|
namespace ModernKeePass.Controls
|
||||||
|
{
|
||||||
|
public class TextBoxWithButton : TextBox
|
||||||
|
{
|
||||||
|
public event EventHandler<RoutedEventArgs> GotoClick;
|
||||||
|
|
||||||
|
protected override void OnApplyTemplate()
|
||||||
|
{
|
||||||
|
base.OnApplyTemplate();
|
||||||
|
var extraButton = GetTemplateChild("GotoButton") as Button;
|
||||||
|
if (extraButton != null)
|
||||||
|
{
|
||||||
|
extraButton.Click += (sender, e) => GotoClick?.Invoke(sender, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -122,6 +122,7 @@
|
|||||||
<Compile Include="Controls\OpenDatabaseUserControl.xaml.cs">
|
<Compile Include="Controls\OpenDatabaseUserControl.xaml.cs">
|
||||||
<DependentUpon>OpenDatabaseUserControl.xaml</DependentUpon>
|
<DependentUpon>OpenDatabaseUserControl.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="Controls\TextBoxWithButton.cs" />
|
||||||
<Compile Include="Converters\BooleanToVisibilityConverter.cs" />
|
<Compile Include="Converters\BooleanToVisibilityConverter.cs" />
|
||||||
<Compile Include="Converters\ColorToBrushConverter.cs" />
|
<Compile Include="Converters\ColorToBrushConverter.cs" />
|
||||||
<Compile Include="Converters\InverseBooleanToVisibilityConverter.cs" />
|
<Compile Include="Converters\InverseBooleanToVisibilityConverter.cs" />
|
||||||
@@ -210,6 +211,11 @@
|
|||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Include="Styles\HamburgerButtonStyle.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</Page>
|
||||||
<Page Include="Styles\TextBoxWithButtonStyle.xaml">
|
<Page Include="Styles\TextBoxWithButtonStyle.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Package xmlns="http://schemas.microsoft.com/appx/2010/manifest" xmlns:m2="http://schemas.microsoft.com/appx/2013/manifest">
|
<Package xmlns="http://schemas.microsoft.com/appx/2010/manifest" xmlns:m2="http://schemas.microsoft.com/appx/2013/manifest">
|
||||||
<Identity Name="wismna.ModernKeePass" Publisher="CN=0719A91A-C322-4EE0-A257-E60733EECF06" Version="1.1.0.10" />
|
<Identity Name="wismna.ModernKeePass" Publisher="CN=0719A91A-C322-4EE0-A257-E60733EECF06" Version="1.2.0.14" />
|
||||||
<Properties>
|
<Properties>
|
||||||
<DisplayName>ModernKeePass</DisplayName>
|
<DisplayName>ModernKeePass</DisplayName>
|
||||||
<PublisherDisplayName>wismna</PublisherDisplayName>
|
<PublisherDisplayName>wismna</PublisherDisplayName>
|
||||||
|
@@ -1,23 +1,22 @@
|
|||||||
<Page
|
<Page
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:local="using:ModernKeePass.Pages"
|
|
||||||
xmlns:common="using:ModernKeePass.Common"
|
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:ViewModels="using:ModernKeePass.ViewModels"
|
xmlns:viewModels="using:ModernKeePass.ViewModels"
|
||||||
xmlns:Converters="using:ModernKeePass.Converters"
|
xmlns:converters="using:ModernKeePass.Converters"
|
||||||
x:Name="pageRoot"
|
xmlns:local="using:ModernKeePass.Controls"
|
||||||
|
x:Name="PageRoot"
|
||||||
x:Class="ModernKeePass.Pages.EntryDetailPage"
|
x:Class="ModernKeePass.Pages.EntryDetailPage"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
|
|
||||||
<Page.Resources>
|
<Page.Resources>
|
||||||
<Converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
|
<converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
|
||||||
<Converters:InverseBooleanToVisibilityConverter x:Key="InverseBooleanToVisibilityConverter"/>
|
<converters:InverseBooleanToVisibilityConverter x:Key="InverseBooleanToVisibilityConverter"/>
|
||||||
</Page.Resources>
|
</Page.Resources>
|
||||||
|
|
||||||
<Page.DataContext>
|
<Page.DataContext>
|
||||||
<ViewModels:EntryVm/>
|
<viewModels:EntryVm/>
|
||||||
</Page.DataContext>
|
</Page.DataContext>
|
||||||
|
|
||||||
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||||
@@ -44,12 +43,13 @@
|
|||||||
<TextBox x:Name="passwordTextBox" HorizontalAlignment="Left" TextWrapping="Wrap" Text="{Binding Password, Mode=TwoWay}" Width="350" Height="32" Visibility="{Binding IsRevealPassword, Converter={StaticResource BooleanToVisibilityConverter}}" />
|
<TextBox x:Name="passwordTextBox" HorizontalAlignment="Left" TextWrapping="Wrap" Text="{Binding Password, Mode=TwoWay}" Width="350" Height="32" Visibility="{Binding IsRevealPassword, Converter={StaticResource BooleanToVisibilityConverter}}" />
|
||||||
<CheckBox x:Name="checkBox" HorizontalAlignment="Left" Margin="-3,0,0,0" Content="Show password" IsChecked="{Binding IsRevealPassword, Mode=TwoWay}"/>
|
<CheckBox x:Name="checkBox" HorizontalAlignment="Left" Margin="-3,0,0,0" Content="Show password" IsChecked="{Binding IsRevealPassword, Mode=TwoWay}"/>
|
||||||
<TextBlock x:Name="urlTextBlock" TextWrapping="Wrap" Text="URL" FontSize="18"/>
|
<TextBlock x:Name="urlTextBlock" TextWrapping="Wrap" Text="URL" FontSize="18"/>
|
||||||
<StackPanel Orientation="Horizontal" Margin="0,-1,0,-1" Width="350" HorizontalAlignment="Left">
|
<!--<StackPanel Orientation="Horizontal" Margin="0,-1,0,-1" Width="350" HorizontalAlignment="Left">
|
||||||
<TextBox x:Name="urlTextBox" TextWrapping="Wrap" Text="{Binding Url, Mode=TwoWay}" Height="32" Width="350" MaxLength="256" Padding="0,0,34,0" />
|
<TextBox x:Name="urlTextBox" TextWrapping="Wrap" Text="{Binding Url, Mode=TwoWay}" Height="32" Width="350" MaxLength="256" Padding="0,0,34,0" />
|
||||||
<Button Click="UrlButton_Click" Height="34" Margin="-34,0,0,0" Background="Transparent" Padding="2,0" >
|
<Button Click="UrlButton_Click" Height="34" Margin="-34,0,0,0" Background="Transparent" Padding="2,0" >
|
||||||
<SymbolIcon Symbol="Forward" VerticalAlignment="Center" />
|
<SymbolIcon Symbol="Forward" VerticalAlignment="Center" />
|
||||||
</Button>
|
</Button>
|
||||||
</StackPanel>
|
</StackPanel>-->
|
||||||
|
<local:TextBoxWithButton x:Name="urlTextBox" HorizontalAlignment="Left" Text="{Binding Url, Mode=TwoWay}" Height="32" Width="350" MaxLength="256" Style="{StaticResource TextBoxWithButtonStyle}" GotoClick="UrlButton_Click" />
|
||||||
<TextBlock x:Name="notesTextBlock" TextWrapping="Wrap" Text="Notes" FontSize="18"/>
|
<TextBlock x:Name="notesTextBlock" TextWrapping="Wrap" Text="Notes" FontSize="18"/>
|
||||||
<TextBox x:Name="notesTextBox" HorizontalAlignment="Left" TextWrapping="Wrap" Text="{Binding Notes, Mode=TwoWay}" Width="350" Height="200" AcceptsReturn="True" IsSpellCheckEnabled="True" />
|
<TextBox x:Name="notesTextBox" HorizontalAlignment="Left" TextWrapping="Wrap" Text="{Binding Notes, Mode=TwoWay}" Width="350" Height="200" AcceptsReturn="True" IsSpellCheckEnabled="True" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@@ -61,7 +61,7 @@
|
|||||||
<ColumnDefinition Width="*"/>
|
<ColumnDefinition Width="*"/>
|
||||||
<ColumnDefinition Width="200"/>
|
<ColumnDefinition Width="200"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Button Margin="39,0,39,0" Command="{Binding NavigationHelper.GoBackCommand, ElementName=pageRoot}"
|
<Button Margin="39,0,39,0" Command="{Binding NavigationHelper.GoBackCommand, ElementName=PageRoot}"
|
||||||
Style="{StaticResource NavigationBackButtonNormalStyle}"
|
Style="{StaticResource NavigationBackButtonNormalStyle}"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
AutomationProperties.Name="Back"
|
AutomationProperties.Name="Back"
|
||||||
|
@@ -19,6 +19,6 @@
|
|||||||
<HyperlinkButton Content="Browse files..." Click="ButtonBase_OnClick" />
|
<HyperlinkButton Content="Browse files..." Click="ButtonBase_OnClick" />
|
||||||
<HyperlinkButton Content="From Url..." IsEnabled="False" />
|
<HyperlinkButton Content="From Url..." IsEnabled="False" />
|
||||||
<TextBlock TextWrapping="Wrap" Text="{Binding Name}" Height="auto" Width="auto" FontSize="16" Margin="10,7,0,6" />
|
<TextBlock TextWrapping="Wrap" Text="{Binding Name}" Height="auto" Width="auto" FontSize="16" Margin="10,7,0,6" />
|
||||||
<local:OpenDatabaseUserControl Visibility="{Binding ShowPasswordBox, Converter={StaticResource BooleanToVisibilityConverter}}" ValidationChecked="PasswordUserControl_PasswordChecked" />
|
<local:OpenDatabaseUserControl HorizontalAlignment="Left" Visibility="{Binding ShowPasswordBox, Converter={StaticResource BooleanToVisibilityConverter}}" ValidationChecked="PasswordUserControl_PasswordChecked" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Page>
|
</Page>
|
@@ -1,8 +1,11 @@
|
|||||||
using System;
|
using System;
|
||||||
using Windows.Storage.Pickers;
|
using Windows.Storage.Pickers;
|
||||||
|
using Windows.System;
|
||||||
using Windows.UI.Xaml;
|
using Windows.UI.Xaml;
|
||||||
using Windows.UI.Xaml.Controls;
|
using Windows.UI.Xaml.Controls;
|
||||||
|
using Windows.UI.Xaml.Input;
|
||||||
using Windows.UI.Xaml.Navigation;
|
using Windows.UI.Xaml.Navigation;
|
||||||
|
using ModernKeePass.Common;
|
||||||
using ModernKeePass.Events;
|
using ModernKeePass.Events;
|
||||||
using ModernKeePass.ViewModels;
|
using ModernKeePass.ViewModels;
|
||||||
|
|
||||||
|
@@ -24,6 +24,6 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.1.0.0")]
|
[assembly: AssemblyVersion("1.2.0.0")]
|
||||||
[assembly: AssemblyFileVersion("1.1.0.0")]
|
[assembly: AssemblyFileVersion("1.2.0.0")]
|
||||||
[assembly: ComVisible(false)]
|
[assembly: ComVisible(false)]
|
48
ModernKeePass/Styles/HamburgerButtonStyle.xaml
Normal file
48
ModernKeePass/Styles/HamburgerButtonStyle.xaml
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
<ResourceDictionary
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||||
|
|
||||||
|
<Style TargetType="ToggleButton" x:Name="HamburgerToggleButton">
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="ToggleButton">
|
||||||
|
<ContentControl>
|
||||||
|
<Grid Background="Transparent" Margin="0" Width="77" Height="77">
|
||||||
|
<Canvas x:Name="hampurger_menu" HorizontalAlignment="Center" Height="17" UseLayoutRounding="False" VerticalAlignment="Center" Width="28">
|
||||||
|
<Canvas x:Name="Layer_1" Height="17" Canvas.Left="0" Width="28" Margin="0" RenderTransformOrigin="0.5,0.5">
|
||||||
|
<Canvas.RenderTransform>
|
||||||
|
<CompositeTransform/>
|
||||||
|
</Canvas.RenderTransform>
|
||||||
|
<Canvas.Projection>
|
||||||
|
<PlaneProjection/>
|
||||||
|
</Canvas.Projection>
|
||||||
|
<Path x:Name="path" Data="M0,12.997 L30,12.997" Height="3" Stretch="Fill" StrokeThickness="3" Width="28" Stroke="{ThemeResource DefaultTextForegroundThemeBrush}" StrokeStartLineCap="Square" StrokeEndLineCap="Square" RenderTransformOrigin="0.5,0.5">
|
||||||
|
<Path.RenderTransform>
|
||||||
|
<CompositeTransform/>
|
||||||
|
</Path.RenderTransform>
|
||||||
|
</Path>
|
||||||
|
<Path Data="M0,12.997 L30,12.997" Height="3" Stretch="Fill" StrokeThickness="3" Width="28" Stroke="{ThemeResource DefaultTextForegroundThemeBrush}" StrokeStartLineCap="Square" StrokeEndLineCap="Square" Canvas.Top="7"/>
|
||||||
|
<Path x:Name="path1" Data="M0,12.997 L30,12.997" Height="3" Stretch="Fill" StrokeThickness="3" Width="28" Stroke="{ThemeResource DefaultTextForegroundThemeBrush}" StrokeStartLineCap="Square" StrokeEndLineCap="Square" Canvas.Top="14" RenderTransformOrigin="0.5,0.5">
|
||||||
|
<Path.RenderTransform>
|
||||||
|
<CompositeTransform/>
|
||||||
|
</Path.RenderTransform>
|
||||||
|
</Path>
|
||||||
|
</Canvas>
|
||||||
|
</Canvas>
|
||||||
|
</Grid>
|
||||||
|
</ContentControl>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
<Setter Property="VerticalAlignment" Value="Top" />
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Left" />
|
||||||
|
<Setter Property="Margin" Value="20" />
|
||||||
|
</Style>
|
||||||
|
<Style x:Key="HeaderTextBoxStyle" TargetType="TextBox">
|
||||||
|
<Setter Property="FontSize" Value="56"/>
|
||||||
|
<Setter Property="FontWeight" Value="Light"/>
|
||||||
|
<Setter Property="BorderBrush" Value="Transparent" />
|
||||||
|
<Setter Property="Background" Value="Transparent" />
|
||||||
|
<!--<Setter Property="LineHeight" Value="40"/>-->
|
||||||
|
</Style>
|
||||||
|
</ResourceDictionary>
|
@@ -1,7 +1,229 @@
|
|||||||
<ResourceDictionary
|
<ResourceDictionary
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||||
xmlns:local="using:ModernKeePass.Styles">
|
|
||||||
|
|
||||||
|
|
||||||
|
<Style TargetType="TextBox" x:Name="TextBoxWithButtonStyle">
|
||||||
|
<Setter Property="MinWidth" Value="{ThemeResource TextControlThemeMinWidth}" />
|
||||||
|
<Setter Property="MinHeight" Value="{ThemeResource TextControlThemeMinHeight}" />
|
||||||
|
<Setter Property="Foreground" Value="{ThemeResource TextBoxForegroundThemeBrush}" />
|
||||||
|
<Setter Property="Background" Value="{ThemeResource TextBoxBackgroundThemeBrush}" />
|
||||||
|
<Setter Property="BorderBrush" Value="{ThemeResource TextBoxBorderThemeBrush}" />
|
||||||
|
<Setter Property="SelectionHighlightColor" Value="{ThemeResource TextSelectionHighlightColorThemeBrush}" />
|
||||||
|
<Setter Property="BorderThickness" Value="{ThemeResource TextControlBorderThemeThickness}" />
|
||||||
|
<Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" />
|
||||||
|
<Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}" />
|
||||||
|
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Hidden" />
|
||||||
|
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Hidden" />
|
||||||
|
<Setter Property="ScrollViewer.IsDeferredScrollingEnabled" Value="False" />
|
||||||
|
<Setter Property="Padding" Value="{ThemeResource TextControlThemePadding}"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="TextBox">
|
||||||
|
<Grid>
|
||||||
|
<Grid.Resources>
|
||||||
|
<Style x:Name="GotoButtonStyle" TargetType="Button">
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="Button">
|
||||||
|
<Grid>
|
||||||
|
<VisualStateManager.VisualStateGroups>
|
||||||
|
<VisualStateGroup x:Name="CommonStates">
|
||||||
|
<VisualState x:Name="Normal" />
|
||||||
|
<VisualState x:Name="PointerOver">
|
||||||
|
<Storyboard>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundElement"
|
||||||
|
Storyboard.TargetProperty="Background">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextBoxButtonPointerOverBackgroundThemeBrush}" />
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement"
|
||||||
|
Storyboard.TargetProperty="BorderBrush">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextBoxButtonPointerOverBorderThemeBrush}" />
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="GlyphElement"
|
||||||
|
Storyboard.TargetProperty="Foreground">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextBoxButtonPointerOverForegroundThemeBrush}" />
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
</Storyboard>
|
||||||
|
</VisualState>
|
||||||
|
<VisualState x:Name="Pressed">
|
||||||
|
<Storyboard>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundElement"
|
||||||
|
Storyboard.TargetProperty="Background">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextBoxButtonPressedBackgroundThemeBrush}" />
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement"
|
||||||
|
Storyboard.TargetProperty="BorderBrush">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextBoxButtonPressedBorderThemeBrush}" />
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="GlyphElement"
|
||||||
|
Storyboard.TargetProperty="Foreground">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextBoxButtonPressedForegroundThemeBrush}" />
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
</Storyboard>
|
||||||
|
</VisualState>
|
||||||
|
<VisualState x:Name="Disabled">
|
||||||
|
<Storyboard>
|
||||||
|
<DoubleAnimation Storyboard.TargetName="BackgroundElement"
|
||||||
|
Storyboard.TargetProperty="Opacity"
|
||||||
|
To="0"
|
||||||
|
Duration="0" />
|
||||||
|
<DoubleAnimation Storyboard.TargetName="BorderElement"
|
||||||
|
Storyboard.TargetProperty="Opacity"
|
||||||
|
To="0"
|
||||||
|
Duration="0" />
|
||||||
|
</Storyboard>
|
||||||
|
</VisualState>
|
||||||
|
</VisualStateGroup>
|
||||||
|
</VisualStateManager.VisualStateGroups>
|
||||||
|
<Border x:Name="BorderElement"
|
||||||
|
BorderBrush="{ThemeResource TextBoxButtonBorderThemeBrush}"
|
||||||
|
BorderThickness="{TemplateBinding BorderThickness}"/>
|
||||||
|
<Border x:Name="BackgroundElement"
|
||||||
|
Background="{ThemeResource TextBoxButtonBackgroundThemeBrush}"
|
||||||
|
Margin="{TemplateBinding BorderThickness}">
|
||||||
|
<TextBlock x:Name="GlyphElement"
|
||||||
|
Foreground="{ThemeResource TextBoxButtonForegroundThemeBrush}"
|
||||||
|
Padding="4,0,4,0"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
FontStyle="Normal"
|
||||||
|
Text=""
|
||||||
|
FontFamily="{ThemeResource SymbolThemeFontFamily}"
|
||||||
|
AutomationProperties.AccessibilityView="Raw"/>
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
</Grid.Resources>
|
||||||
|
<VisualStateManager.VisualStateGroups>
|
||||||
|
<VisualStateGroup x:Name="CommonStates">
|
||||||
|
<VisualState x:Name="Disabled">
|
||||||
|
<Storyboard>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundElement"
|
||||||
|
Storyboard.TargetProperty="Background">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextBoxDisabledBackgroundThemeBrush}" />
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement"
|
||||||
|
Storyboard.TargetProperty="BorderBrush">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextBoxDisabledBorderThemeBrush}" />
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentElement"
|
||||||
|
Storyboard.TargetProperty="Foreground">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextBoxDisabledForegroundThemeBrush}" />
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PlaceholderTextContentPresenter"
|
||||||
|
Storyboard.TargetProperty="Foreground">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextBoxDisabledForegroundThemeBrush}" />
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
</Storyboard>
|
||||||
|
</VisualState>
|
||||||
|
<VisualState x:Name="Normal">
|
||||||
|
<Storyboard>
|
||||||
|
<DoubleAnimation Storyboard.TargetName="BackgroundElement"
|
||||||
|
Storyboard.TargetProperty="Opacity"
|
||||||
|
Duration="0"
|
||||||
|
To="{ThemeResource TextControlBackgroundThemeOpacity}" />
|
||||||
|
<DoubleAnimation Storyboard.TargetName="BorderElement"
|
||||||
|
Storyboard.TargetProperty="Opacity"
|
||||||
|
Duration="0"
|
||||||
|
To="{ThemeResource TextControlBorderThemeOpacity}" />
|
||||||
|
</Storyboard>
|
||||||
|
</VisualState>
|
||||||
|
<VisualState x:Name="PointerOver">
|
||||||
|
<Storyboard>
|
||||||
|
<DoubleAnimation Storyboard.TargetName="BackgroundElement"
|
||||||
|
Storyboard.TargetProperty="Opacity"
|
||||||
|
Duration="0"
|
||||||
|
To="{ThemeResource TextControlPointerOverBackgroundThemeOpacity}" />
|
||||||
|
<DoubleAnimation Storyboard.TargetName="BorderElement"
|
||||||
|
Storyboard.TargetProperty="Opacity"
|
||||||
|
Duration="0"
|
||||||
|
To="{ThemeResource TextControlPointerOverBorderThemeOpacity}" />
|
||||||
|
</Storyboard>
|
||||||
|
</VisualState>
|
||||||
|
<VisualState x:Name="Focused" />
|
||||||
|
</VisualStateGroup>
|
||||||
|
<VisualStateGroup x:Name="ButtonStates">
|
||||||
|
<VisualState x:Name="ButtonVisible">
|
||||||
|
<Storyboard>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="GotoButton"
|
||||||
|
Storyboard.TargetProperty="Visibility">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0">
|
||||||
|
<DiscreteObjectKeyFrame.Value>
|
||||||
|
<Visibility>Visible</Visibility>
|
||||||
|
</DiscreteObjectKeyFrame.Value>
|
||||||
|
</DiscreteObjectKeyFrame>
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
</Storyboard>
|
||||||
|
</VisualState>
|
||||||
|
<VisualState x:Name="ButtonCollapsed" />
|
||||||
|
</VisualStateGroup>
|
||||||
|
</VisualStateManager.VisualStateGroups>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
<ColumnDefinition Width="Auto" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
|
<RowDefinition Height="*" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Border x:Name="BackgroundElement"
|
||||||
|
Grid.Row="1"
|
||||||
|
Background="{TemplateBinding Background}"
|
||||||
|
Margin="{TemplateBinding BorderThickness}"
|
||||||
|
Grid.ColumnSpan="2"
|
||||||
|
Grid.RowSpan="1"/>
|
||||||
|
<Border x:Name="BorderElement"
|
||||||
|
Grid.Row="1"
|
||||||
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||||||
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
|
Grid.ColumnSpan="2"
|
||||||
|
Grid.RowSpan="1"/>
|
||||||
|
<ContentPresenter x:Name="HeaderContentPresenter"
|
||||||
|
Grid.Row="0"
|
||||||
|
Foreground="{ThemeResource TextBoxForegroundHeaderThemeBrush}"
|
||||||
|
Margin="0,4,0,4"
|
||||||
|
Grid.ColumnSpan="2"
|
||||||
|
Content="{TemplateBinding Header}"
|
||||||
|
ContentTemplate="{TemplateBinding HeaderTemplate}"
|
||||||
|
FontWeight="Semilight" />
|
||||||
|
<ScrollViewer x:Name="ContentElement"
|
||||||
|
Grid.Row="1"
|
||||||
|
HorizontalScrollMode="{TemplateBinding ScrollViewer.HorizontalScrollMode}"
|
||||||
|
HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
|
||||||
|
VerticalScrollMode="{TemplateBinding ScrollViewer.VerticalScrollMode}"
|
||||||
|
VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
|
||||||
|
IsHorizontalRailEnabled="{TemplateBinding ScrollViewer.IsHorizontalRailEnabled}"
|
||||||
|
IsVerticalRailEnabled="{TemplateBinding ScrollViewer.IsVerticalRailEnabled}"
|
||||||
|
IsDeferredScrollingEnabled="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}"
|
||||||
|
Margin="{TemplateBinding BorderThickness}"
|
||||||
|
Padding="{TemplateBinding Padding}"
|
||||||
|
IsTabStop="False"
|
||||||
|
AutomationProperties.AccessibilityView="Raw"
|
||||||
|
ZoomMode="Disabled" />
|
||||||
|
<ContentControl x:Name="PlaceholderTextContentPresenter"
|
||||||
|
Grid.Row="1"
|
||||||
|
Foreground="{ThemeResource TextBoxPlaceholderTextThemeBrush}"
|
||||||
|
Margin="{TemplateBinding BorderThickness}"
|
||||||
|
Padding="{TemplateBinding Padding}"
|
||||||
|
IsTabStop="False"
|
||||||
|
Grid.ColumnSpan="2"
|
||||||
|
Content="{TemplateBinding PlaceholderText}"
|
||||||
|
IsHitTestVisible="False"/>
|
||||||
|
<Button x:Name="GotoButton"
|
||||||
|
Grid.Row="1"
|
||||||
|
Style="{StaticResource GotoButtonStyle}"
|
||||||
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
|
IsTabStop="False"
|
||||||
|
Grid.Column="1"
|
||||||
|
Visibility="Collapsed"
|
||||||
|
FontSize="{TemplateBinding FontSize}"
|
||||||
|
VerticalAlignment="Stretch"/>
|
||||||
|
</Grid>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
|
Reference in New Issue
Block a user