diff --git a/Flow.Launcher/Resources/Controls/Card.xaml b/Flow.Launcher/Resources/Controls/Card.xaml new file mode 100644 index 000000000..58298cad5 --- /dev/null +++ b/Flow.Launcher/Resources/Controls/Card.xaml @@ -0,0 +1,173 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Flow.Launcher/Resources/Controls/Card.xaml.cs b/Flow.Launcher/Resources/Controls/Card.xaml.cs new file mode 100644 index 000000000..17066b725 --- /dev/null +++ b/Flow.Launcher/Resources/Controls/Card.xaml.cs @@ -0,0 +1,63 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Forms; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; +using UserControl = System.Windows.Controls.UserControl; + +namespace Flow.Launcher.Resources.Controls +{ + public partial class Card : UserControl + { + public Card() + { + InitializeComponent(); + } + public string Title + { + get { return (string)GetValue(TitleValueProperty); } + set { SetValue(TitleValueProperty, value); } + } + public static readonly DependencyProperty TitleValueProperty = + DependencyProperty.Register("Title", typeof(string), typeof(Card), new PropertyMetadata(string.Empty)); + + public string Sub + { + get { return (string)GetValue(SubValueProperty); } + set { SetValue(SubValueProperty, value); } + } + public static readonly DependencyProperty SubValueProperty = + DependencyProperty.Register("Sub", typeof(string), typeof(Card), new PropertyMetadata(string.Empty)); + + public string Icon + { + get { return (string)GetValue(IconValueProperty); } + set { SetValue(IconValueProperty, value); } + } + public static readonly DependencyProperty IconValueProperty = + DependencyProperty.Register("Icon", typeof(string), typeof(Card), new PropertyMetadata(string.Empty)); + + /// + /// Gets or sets additional content for the UserControl + /// + public object AdditionalContent + { + get { return (object)GetValue(AdditionalContentProperty); } + set { SetValue(AdditionalContentProperty, value); } + } + public static readonly DependencyProperty AdditionalContentProperty = + DependencyProperty.Register("AdditionalContent", typeof(object), typeof(Card), + new PropertyMetadata(null)); + } +} diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml index 59039d48b..be6b0788a 100644 --- a/Flow.Launcher/SettingWindow.xaml +++ b/Flow.Launcher/SettingWindow.xaml @@ -2,6 +2,7 @@ x:Class="Flow.Launcher.SettingWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:cc="clr-namespace:Flow.Launcher.Resources.Controls" xmlns:converters="clr-namespace:Flow.Launcher.Converters" xmlns:core="clr-namespace:Flow.Launcher.Core.Resource;assembly=Flow.Launcher.Core" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" @@ -2635,6 +2636,12 @@ Text="{DynamicResource hotkeys}" TextAlignment="left" /> + + + @@ -2649,7 +2656,6 @@ HorizontalAlignment="Right" HorizontalContentAlignment="Right" DataContext="{Binding ToggleHotkeyViewModel}" /> -