mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 15:40:18 -04:00
Icons work again
Colors work again
This commit is contained in:
@@ -50,7 +50,7 @@ namespace ModernKeePass.Application.Entry.Models
|
|||||||
.ForMember(d => d.HasExpirationDate, opts => opts.MapFrom(s => s.HasExpirationDate))
|
.ForMember(d => d.HasExpirationDate, opts => opts.MapFrom(s => s.HasExpirationDate))
|
||||||
.ForMember(d => d.ExpirationDate, opts => opts.MapFrom(s => s.ExpirationDate))
|
.ForMember(d => d.ExpirationDate, opts => opts.MapFrom(s => s.ExpirationDate))
|
||||||
.ForMember(d => d.ModificationDate, opts => opts.MapFrom(s => s.LastModificationDate))
|
.ForMember(d => d.ModificationDate, opts => opts.MapFrom(s => s.LastModificationDate))
|
||||||
.ForMember(d => d.Icon, opts => opts.MapFrom(s => s.Icon))
|
.ForMember(d => d.Icon, opts => opts.MapFrom(s => s.HasExpirationDate && s.ExpirationDate < DateTimeOffset.Now ? Icon.ReportHacked : s.Icon))
|
||||||
.ForMember(d => d.ForegroundColor, opts => opts.MapFrom(s => s.ForegroundColor))
|
.ForMember(d => d.ForegroundColor, opts => opts.MapFrom(s => s.ForegroundColor))
|
||||||
.ForMember(d => d.BackgroundColor, opts => opts.MapFrom(s => s.BackgroundColor));
|
.ForMember(d => d.BackgroundColor, opts => opts.MapFrom(s => s.BackgroundColor));
|
||||||
}
|
}
|
||||||
|
@@ -10,5 +10,7 @@
|
|||||||
public const string Icon = nameof(Icon);
|
public const string Icon = nameof(Icon);
|
||||||
public const string ExpirationDate = nameof(ExpirationDate);
|
public const string ExpirationDate = nameof(ExpirationDate);
|
||||||
public const string HasExpirationDate = nameof(HasExpirationDate);
|
public const string HasExpirationDate = nameof(HasExpirationDate);
|
||||||
|
public const string BackgroundColor = nameof(BackgroundColor);
|
||||||
|
public const string ForegroundColor = nameof(ForegroundColor);
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -1,4 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Drawing;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using AutoMapper;
|
using AutoMapper;
|
||||||
@@ -242,6 +243,12 @@ namespace ModernKeePass.Infrastructure.KeePass
|
|||||||
case EntryFieldName.Icon:
|
case EntryFieldName.Icon:
|
||||||
pwEntry.IconId = IconMapper.MapIconToPwIcon((Icon)fieldValue);
|
pwEntry.IconId = IconMapper.MapIconToPwIcon((Icon)fieldValue);
|
||||||
break;
|
break;
|
||||||
|
case EntryFieldName.BackgroundColor:
|
||||||
|
pwEntry.BackgroundColor = (Color)fieldValue;
|
||||||
|
break;
|
||||||
|
case EntryFieldName.ForegroundColor:
|
||||||
|
pwEntry.ForegroundColor = (Color)fieldValue;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
using System;
|
using ModernKeePass.Extensions;
|
||||||
|
using System;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using Windows.UI.Xaml.Data;
|
using Windows.UI.Xaml.Data;
|
||||||
using Windows.UI.Xaml.Media;
|
using Windows.UI.Xaml.Media;
|
||||||
@@ -9,19 +10,15 @@ namespace ModernKeePass.Converters
|
|||||||
{
|
{
|
||||||
public object Convert(object value, Type targetType, object parameter, string language)
|
public object Convert(object value, Type targetType, object parameter, string language)
|
||||||
{
|
{
|
||||||
var color = value is Color ? (Color?) value : Color.Empty;
|
var color = value as Color? ?? Color.Empty;
|
||||||
if (color == Color.Empty && parameter is SolidColorBrush) return (SolidColorBrush) parameter;
|
if (color == Color.Empty && parameter is SolidColorBrush) return (SolidColorBrush) parameter;
|
||||||
return new SolidColorBrush(Windows.UI.Color.FromArgb(
|
return color.ToSolidColorBrush();
|
||||||
color.Value.A,
|
|
||||||
color.Value.R,
|
|
||||||
color.Value.G,
|
|
||||||
color.Value.B));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public object ConvertBack(object value, Type targetType, object parameter, string language)
|
public object ConvertBack(object value, Type targetType, object parameter, string language)
|
||||||
{
|
{
|
||||||
var brush = value as SolidColorBrush;
|
var brush = value as SolidColorBrush;
|
||||||
return brush == null ? new Color() : Color.FromArgb(brush.Color.A, brush.Color.R, brush.Color.G, brush.Color.B);
|
return brush?.ToColor() ?? new Color();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -9,7 +9,8 @@ namespace ModernKeePass.Converters
|
|||||||
{
|
{
|
||||||
public object Convert(object value, Type targetType, object parameter, string language)
|
public object Convert(object value, Type targetType, object parameter, string language)
|
||||||
{
|
{
|
||||||
var icon = (Icon)value;
|
return Enum.Parse(typeof(Symbol), value.ToString());
|
||||||
|
/*var icon = (Icon)value;
|
||||||
switch (icon)
|
switch (icon)
|
||||||
{
|
{
|
||||||
case Icon.Delete: return Symbol.Delete;
|
case Icon.Delete: return Symbol.Delete;
|
||||||
@@ -62,12 +63,12 @@ namespace ModernKeePass.Converters
|
|||||||
case Icon.Stop: return Symbol.Stop;
|
case Icon.Stop: return Symbol.Stop;
|
||||||
default:
|
default:
|
||||||
throw new ArgumentOutOfRangeException();
|
throw new ArgumentOutOfRangeException();
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
public object ConvertBack(object value, Type targetType, object parameter, string language)
|
public object ConvertBack(object value, Type targetType, object parameter, string language)
|
||||||
{
|
{
|
||||||
var symbol = (Symbol)value;
|
/*var symbol = (Symbol)value;
|
||||||
var defaultIcon = parameter != null ? int.Parse(parameter as string) : -1;
|
var defaultIcon = parameter != null ? int.Parse(parameter as string) : -1;
|
||||||
switch (symbol)
|
switch (symbol)
|
||||||
{
|
{
|
||||||
@@ -120,7 +121,9 @@ namespace ModernKeePass.Converters
|
|||||||
case Symbol.ReportHacked: return Icon.ReportHacked;
|
case Symbol.ReportHacked: return Icon.ReportHacked;
|
||||||
case Symbol.Stop: return Icon.Stop;
|
case Symbol.Stop: return Icon.Stop;
|
||||||
default: return defaultIcon;
|
default: return defaultIcon;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
|
return Enum.Parse(typeof(Icon), value.ToString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
18
ModernKeePass/Extensions/ColorExtensions.cs
Normal file
18
ModernKeePass/Extensions/ColorExtensions.cs
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
using System.Drawing;
|
||||||
|
using Windows.UI.Xaml.Media;
|
||||||
|
|
||||||
|
namespace ModernKeePass.Extensions
|
||||||
|
{
|
||||||
|
public static class ColorExtensions
|
||||||
|
{
|
||||||
|
public static Color ToColor(this SolidColorBrush brush)
|
||||||
|
{
|
||||||
|
return Color.FromArgb(brush.Color.A, brush.Color.R, brush.Color.G, brush.Color.B);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static SolidColorBrush ToSolidColorBrush(this Color color)
|
||||||
|
{
|
||||||
|
return new SolidColorBrush(Windows.UI.Color.FromArgb(color.A, color.R, color.G, color.B));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -244,6 +244,22 @@
|
|||||||
<ToolTipService.ToolTip>
|
<ToolTipService.ToolTip>
|
||||||
<ToolTip Content="{TemplateBinding ButtonTooltip}" />
|
<ToolTip Content="{TemplateBinding ButtonTooltip}" />
|
||||||
</ToolTipService.ToolTip>
|
</ToolTipService.ToolTip>
|
||||||
|
<!--<VisualStateManager.VisualStateGroups>
|
||||||
|
<VisualStateGroup x:Name="CommonStates">
|
||||||
|
<VisualState x:Name="Normal"/>
|
||||||
|
<VisualState x:Name="MouseOver">
|
||||||
|
<Storyboard>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Cursor)">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="00:00:00">
|
||||||
|
<DiscreteObjectKeyFrame.Value>
|
||||||
|
<Cursor>Hand</Cursor>
|
||||||
|
</DiscreteObjectKeyFrame.Value>
|
||||||
|
</DiscreteObjectKeyFrame>
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
</Storyboard>
|
||||||
|
</VisualState>
|
||||||
|
</VisualStateGroup>
|
||||||
|
</VisualStateManager.VisualStateGroups>-->
|
||||||
</Button>
|
</Button>
|
||||||
</Grid>
|
</Grid>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
|
@@ -1,9 +1,9 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Drawing;
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
using Windows.UI.Xaml.Controls;
|
using Windows.UI.Xaml.Controls;
|
||||||
|
using Windows.UI.Xaml.Media;
|
||||||
using MediatR;
|
using MediatR;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using ModernKeePass.Application.Database.Commands.SaveDatabase;
|
using ModernKeePass.Application.Database.Commands.SaveDatabase;
|
||||||
@@ -23,6 +23,7 @@ using ModernKeePass.Domain.Enums;
|
|||||||
using ModernKeePass.Interfaces;
|
using ModernKeePass.Interfaces;
|
||||||
using ModernKeePass.Application.Group.Models;
|
using ModernKeePass.Application.Group.Models;
|
||||||
using ModernKeePass.Domain.AOP;
|
using ModernKeePass.Domain.AOP;
|
||||||
|
using ModernKeePass.Extensions;
|
||||||
|
|
||||||
namespace ModernKeePass.ViewModels
|
namespace ModernKeePass.ViewModels
|
||||||
{
|
{
|
||||||
@@ -64,8 +65,8 @@ namespace ModernKeePass.ViewModels
|
|||||||
get { return _entry.Title; }
|
get { return _entry.Title; }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
SetFieldValue(nameof(Title), value).Wait();
|
|
||||||
_entry.Title = value;
|
_entry.Title = value;
|
||||||
|
SetFieldValue(nameof(Title), value).Wait();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -80,8 +81,8 @@ namespace ModernKeePass.ViewModels
|
|||||||
get { return _entry.Password; }
|
get { return _entry.Password; }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
SetFieldValue(nameof(Password), value).Wait();
|
|
||||||
_entry.Password = value;
|
_entry.Password = value;
|
||||||
|
SetFieldValue(nameof(Password), value).Wait();
|
||||||
OnPropertyChanged();
|
OnPropertyChanged();
|
||||||
OnPropertyChanged(nameof(PasswordComplexityIndicator));
|
OnPropertyChanged(nameof(PasswordComplexityIndicator));
|
||||||
}
|
}
|
||||||
@@ -92,8 +93,8 @@ namespace ModernKeePass.ViewModels
|
|||||||
get { return _entry.Url?.ToString(); }
|
get { return _entry.Url?.ToString(); }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
SetFieldValue(nameof(Url), value).Wait();
|
|
||||||
_entry.Url = new Uri(value);
|
_entry.Url = new Uri(value);
|
||||||
|
SetFieldValue(nameof(Url), value).Wait();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -102,22 +103,18 @@ namespace ModernKeePass.ViewModels
|
|||||||
get { return _entry.Notes; }
|
get { return _entry.Notes; }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
SetFieldValue(nameof(Notes), value).Wait();
|
|
||||||
_entry.Notes = value;
|
_entry.Notes = value;
|
||||||
|
SetFieldValue(nameof(Notes), value).Wait();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Symbol Icon
|
public Symbol Icon
|
||||||
{
|
{
|
||||||
get
|
get { return (Symbol)Enum.Parse(typeof(Symbol), _entry.Icon.ToString()); }
|
||||||
{
|
|
||||||
if (HasExpired) return Symbol.ReportHacked;
|
|
||||||
return (Symbol) _entry.Icon;
|
|
||||||
}
|
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
SetFieldValue(nameof(Icon), value).Wait();
|
_entry.Icon = (Icon)Enum.Parse(typeof(Icon), value.ToString());
|
||||||
_entry.Icon = (Icon)value;
|
SetFieldValue(nameof(Icon), _entry.Icon).Wait();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -128,8 +125,8 @@ namespace ModernKeePass.ViewModels
|
|||||||
{
|
{
|
||||||
if (!HasExpirationDate) return;
|
if (!HasExpirationDate) return;
|
||||||
|
|
||||||
SetFieldValue("ExpirationDate", value).Wait();
|
|
||||||
_entry.ExpirationDate = value.Date;
|
_entry.ExpirationDate = value.Date;
|
||||||
|
SetFieldValue("ExpirationDate", _entry.ExpirationDate).Wait();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -140,8 +137,8 @@ namespace ModernKeePass.ViewModels
|
|||||||
{
|
{
|
||||||
if (!HasExpirationDate) return;
|
if (!HasExpirationDate) return;
|
||||||
|
|
||||||
SetFieldValue("ExpirationDate", value).Wait();
|
|
||||||
_entry.ExpirationDate = _entry.ExpirationDate.Date.Add(value);
|
_entry.ExpirationDate = _entry.ExpirationDate.Date.Add(value);
|
||||||
|
SetFieldValue("ExpirationDate", _entry.ExpirationDate).Wait();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -150,35 +147,29 @@ namespace ModernKeePass.ViewModels
|
|||||||
get { return _entry.HasExpirationDate; }
|
get { return _entry.HasExpirationDate; }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
SetFieldValue(nameof(HasExpirationDate), value).Wait();
|
|
||||||
_entry.HasExpirationDate = value;
|
_entry.HasExpirationDate = value;
|
||||||
OnPropertyChanged();
|
SetFieldValue(nameof(HasExpirationDate), value).Wait();
|
||||||
|
OnPropertyChanged(nameof(HasExpirationDate));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Color? BackgroundColor
|
public SolidColorBrush BackgroundColor
|
||||||
{
|
{
|
||||||
get { return _entry?.BackgroundColor; }
|
get { return _entry?.BackgroundColor.ToSolidColorBrush(); }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (value != null)
|
_entry.BackgroundColor = value.ToColor();
|
||||||
{
|
SetFieldValue(nameof(BackgroundColor), _entry.BackgroundColor).Wait();
|
||||||
SetFieldValue(nameof(BackgroundColor), value).Wait();
|
|
||||||
_entry.BackgroundColor = (Color)value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Color? ForegroundColor
|
public SolidColorBrush ForegroundColor
|
||||||
{
|
{
|
||||||
get { return _entry?.ForegroundColor; }
|
get { return _entry?.ForegroundColor.ToSolidColorBrush(); }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (value != null)
|
_entry.ForegroundColor = value.ToColor();
|
||||||
{
|
SetFieldValue(nameof(ForegroundColor), _entry.ForegroundColor).Wait();
|
||||||
SetFieldValue(nameof(ForegroundColor), value).Wait();
|
|
||||||
_entry.ForegroundColor = (Color)value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public IEnumerable<EntryVm> History { get; }
|
public IEnumerable<EntryVm> History { get; }
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
using System.Collections.Generic;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
using System.Collections.Specialized;
|
using System.Collections.Specialized;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@@ -67,8 +68,8 @@ namespace ModernKeePass.ViewModels
|
|||||||
|
|
||||||
public Symbol Icon
|
public Symbol Icon
|
||||||
{
|
{
|
||||||
get { return (Symbol) _group.Icon; }
|
get { return (Symbol) Enum.Parse(typeof(Symbol), _group.Icon.ToString()); }
|
||||||
set { _group.Icon = (Icon)value; }
|
set { _group.Icon = (Icon) Enum.Parse(typeof(Icon), value.ToString()); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsEditMode
|
public bool IsEditMode
|
||||||
|
@@ -19,7 +19,6 @@
|
|||||||
<converters:InverseBooleanToVisibilityConverter x:Key="InverseBooleanToVisibilityConverter" />
|
<converters:InverseBooleanToVisibilityConverter x:Key="InverseBooleanToVisibilityConverter" />
|
||||||
<converters:ProgressBarLegalValuesConverter x:Key="ProgressBarLegalValuesConverter" />
|
<converters:ProgressBarLegalValuesConverter x:Key="ProgressBarLegalValuesConverter" />
|
||||||
<converters:DoubleToSolidColorBrushConverter x:Key="DoubleToForegroundBrushComplexityConverter" />
|
<converters:DoubleToSolidColorBrushConverter x:Key="DoubleToForegroundBrushComplexityConverter" />
|
||||||
<converters:ColorToBrushConverter x:Key="ColorToBrushConverter" />
|
|
||||||
<converters:IconToSymbolConverter x:Key="IconToSymbolConverter"/>
|
<converters:IconToSymbolConverter x:Key="IconToSymbolConverter"/>
|
||||||
<Style TargetType="PasswordBox" x:Name="PasswordBoxWithButtonStyle">
|
<Style TargetType="PasswordBox" x:Name="PasswordBoxWithButtonStyle">
|
||||||
<Setter Property="MinWidth" Value="{ThemeResource TextControlThemeMinWidth}" />
|
<Setter Property="MinWidth" Value="{ThemeResource TextControlThemeMinWidth}" />
|
||||||
@@ -460,11 +459,11 @@
|
|||||||
<StackPanel x:Name="EditDesign" Visibility="{Binding IsEditMode, Converter={StaticResource BooleanToVisibilityConverter}}" Orientation="Horizontal">
|
<StackPanel x:Name="EditDesign" Visibility="{Binding IsEditMode, Converter={StaticResource BooleanToVisibilityConverter}}" Orientation="Horizontal">
|
||||||
<StackPanel Width="250" HorizontalAlignment="Left">
|
<StackPanel Width="250" HorizontalAlignment="Left">
|
||||||
<TextBlock x:Uid="EntryBackgroundColor" />
|
<TextBlock x:Uid="EntryBackgroundColor" />
|
||||||
<userControls:ColorPickerUserControl SelectedColor="{Binding BackgroundColor, Converter={StaticResource ColorToBrushConverter}, Mode=TwoWay}" IsEnabled="{Binding IsSelected}" />
|
<userControls:ColorPickerUserControl SelectedColor="{Binding BackgroundColor, Mode=TwoWay}" IsEnabled="{Binding IsSelected}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel Width="250" HorizontalAlignment="Left">
|
<StackPanel Width="250" HorizontalAlignment="Left">
|
||||||
<TextBlock x:Uid="EntryForegroundColor" />
|
<TextBlock x:Uid="EntryForegroundColor" />
|
||||||
<userControls:ColorPickerUserControl SelectedColor="{Binding ForegroundColor, Converter={StaticResource ColorToBrushConverter}, Mode=TwoWay}" IsEnabled="{Binding IsSelected}" />
|
<userControls:ColorPickerUserControl SelectedColor="{Binding ForegroundColor, Mode=TwoWay}" IsEnabled="{Binding IsSelected}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@@ -497,13 +496,14 @@
|
|||||||
<RowDefinition Height="40" />
|
<RowDefinition Height="40" />
|
||||||
<RowDefinition Height="20" />
|
<RowDefinition Height="20" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Viewbox MaxHeight="30" Width="50" Grid.Column="0" Grid.Row="0" Visibility="{Binding IsEditMode, Converter={StaticResource BooleanToVisibilityConverter}}">
|
<Viewbox MaxHeight="200" Width="200" Grid.Column="0" Grid.Row="0" Visibility="{Binding IsEditMode, Converter={StaticResource BooleanToVisibilityConverter}}">
|
||||||
<userControls:SymbolPickerUserControl Width="80" Height="40" SelectedSymbol="{Binding Icon, Mode=TwoWay}" />
|
<userControls:SymbolPickerUserControl Width="100" Height="70" SelectedSymbol="{Binding Icon, Mode=TwoWay}" />
|
||||||
</Viewbox>
|
</Viewbox>
|
||||||
<Viewbox MaxHeight="30" Width="50" Grid.Column="0" Grid.Row="0" Visibility="{Binding IsEditMode, Converter={StaticResource InverseBooleanToVisibilityConverter}}">
|
<Viewbox MaxHeight="200" Width="200" Grid.Column="0" Grid.Row="0" Visibility="{Binding IsEditMode, Converter={StaticResource InverseBooleanToVisibilityConverter}}">
|
||||||
<SymbolIcon Symbol="{Binding Icon, Converter={StaticResource IconToSymbolConverter}}" Width="80" Height="40" />
|
<SymbolIcon Symbol="{Binding Icon}" Width="100" Height="70" />
|
||||||
</Viewbox>
|
</Viewbox>
|
||||||
<TextBox Grid.Column="1" Grid.Row="0"
|
<TextBox Grid.Column="1" Grid.Row="0"
|
||||||
|
x:Name="TitleTextBox"
|
||||||
Text="{Binding Title, Mode=TwoWay}"
|
Text="{Binding Title, Mode=TwoWay}"
|
||||||
Foreground="{ThemeResource DefaultTextForegroundThemeBrush}"
|
Foreground="{ThemeResource DefaultTextForegroundThemeBrush}"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
|
@@ -205,11 +205,11 @@
|
|||||||
<RowDefinition Height="40" />
|
<RowDefinition Height="40" />
|
||||||
<RowDefinition Height="20" />
|
<RowDefinition Height="20" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Viewbox MaxHeight="30" Width="50" Grid.Column="0" Grid.Row="0" Visibility="{Binding IsEditMode, Converter={StaticResource BooleanToVisibilityConverter}}">
|
<Viewbox MaxHeight="200" Width="200" Grid.Column="0" Grid.Row="0" Visibility="{Binding IsEditMode, Converter={StaticResource BooleanToVisibilityConverter}}">
|
||||||
<userControls:SymbolPickerUserControl Width="80" Height="40" SelectedSymbol="{Binding Icon, Mode=TwoWay}" />
|
<userControls:SymbolPickerUserControl Width="100" Height="70" SelectedSymbol="{Binding Icon, Mode=TwoWay}" />
|
||||||
</Viewbox>
|
</Viewbox>
|
||||||
<Viewbox MaxHeight="30" Width="50" Grid.Column="0" Grid.Row="0" Visibility="{Binding IsEditMode, Converter={StaticResource InverseBooleanToVisibilityConverter}}">
|
<Viewbox MaxHeight="200" Width="200" Grid.Column="0" Grid.Row="0" Visibility="{Binding IsEditMode, Converter={StaticResource InverseBooleanToVisibilityConverter}}">
|
||||||
<SymbolIcon Symbol="{Binding Icon, Converter={StaticResource IconToSymbolConverter}}" Width="80" Height="40" />
|
<SymbolIcon Symbol="{Binding Icon}" Width="100" Height="70" />
|
||||||
</Viewbox>
|
</Viewbox>
|
||||||
<TextBox Grid.Column="1" Grid.Row="0"
|
<TextBox Grid.Column="1" Grid.Row="0"
|
||||||
x:Name="TitleTextBox"
|
x:Name="TitleTextBox"
|
||||||
|
@@ -5,12 +5,18 @@
|
|||||||
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">
|
||||||
<ComboBox x:Name="ComboBox" ItemsSource="{Binding Symbols, ElementName=UserControl}" SelectedItem="{Binding SelectedSymbol, ElementName=UserControl, Mode=TwoWay}" Loaded="ComboBox_OnLoaded" ItemContainerStyle="{StaticResource MainColorComboBoxItem}" Style="{StaticResource MainColorComboBox}">
|
<ComboBox
|
||||||
|
x:Name="ComboBox"
|
||||||
|
ItemsSource="{Binding Symbols, ElementName=UserControl}"
|
||||||
|
SelectedItem="{Binding SelectedSymbol, ElementName=UserControl, Mode=TwoWay}"
|
||||||
|
Loaded="ComboBox_OnLoaded"
|
||||||
|
ItemContainerStyle="{StaticResource MainColorComboBoxItem}"
|
||||||
|
Style="{StaticResource MainColorComboBox}">
|
||||||
<ComboBox.ItemTemplate>
|
<ComboBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<StackPanel Orientation="Horizontal" Margin="0,0,10,0">
|
<Border>
|
||||||
<SymbolIcon Symbol="{Binding}" />
|
<SymbolIcon Symbol="{Binding}" />
|
||||||
</StackPanel>
|
</Border>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ComboBox.ItemTemplate>
|
</ComboBox.ItemTemplate>
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
|
@@ -43,7 +43,7 @@
|
|||||||
</VisualStateManager.VisualStateGroups>
|
</VisualStateManager.VisualStateGroups>
|
||||||
<StackPanel x:Name="OverflowButtons" Orientation="Horizontal">
|
<StackPanel x:Name="OverflowButtons" Orientation="Horizontal">
|
||||||
<Button Command="{Binding MoveCommand, ElementName=UserControl}" IsEnabled="{Binding IsMoveButtonEnabled, ElementName=UserControl}" Click="MoveButton_Click" Style="{StaticResource MenuButtonStyle}">
|
<Button Command="{Binding MoveCommand, ElementName=UserControl}" IsEnabled="{Binding IsMoveButtonEnabled, ElementName=UserControl}" Click="MoveButton_Click" Style="{StaticResource MenuButtonStyle}">
|
||||||
<SymbolIcon Symbol="Undo">
|
<SymbolIcon Symbol="MoveToFolder">
|
||||||
<ToolTipService.ToolTip>
|
<ToolTipService.ToolTip>
|
||||||
<ToolTip x:Uid="TopMenuMoveButton" />
|
<ToolTip x:Uid="TopMenuMoveButton" />
|
||||||
</ToolTipService.ToolTip>
|
</ToolTipService.ToolTip>
|
||||||
|
@@ -101,6 +101,7 @@
|
|||||||
<Compile Include="Common\ResourceHelper.cs" />
|
<Compile Include="Common\ResourceHelper.cs" />
|
||||||
<Compile Include="Converters\IconToSymbolConverter.cs" />
|
<Compile Include="Converters\IconToSymbolConverter.cs" />
|
||||||
<Compile Include="DependencyInjection.cs" />
|
<Compile Include="DependencyInjection.cs" />
|
||||||
|
<Compile Include="Extensions\ColorExtensions.cs" />
|
||||||
<Compile Include="TemplateSelectors\SelectableDataTemplateSelector.cs" />
|
<Compile Include="TemplateSelectors\SelectableDataTemplateSelector.cs" />
|
||||||
<Compile Include="ViewModels\Items\SettingsSaveVm.cs" />
|
<Compile Include="ViewModels\Items\SettingsSaveVm.cs" />
|
||||||
<Compile Include="Views\MainPageFrames\DonatePage.xaml.cs">
|
<Compile Include="Views\MainPageFrames\DonatePage.xaml.cs">
|
||||||
|
Reference in New Issue
Block a user