Initial commit: ReminderOrganizer WPF app
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
730
MainWindow.xaml
Normal file
730
MainWindow.xaml
Normal file
@@ -0,0 +1,730 @@
|
||||
<Window x:Class="ReminderOrganizer.MainWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:models="clr-namespace:ReminderOrganizer.Models"
|
||||
Title="Reminder Organizer"
|
||||
Height="700" Width="1100"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
MinHeight="550" MinWidth="900"
|
||||
WindowStyle="None"
|
||||
AllowsTransparency="True"
|
||||
Background="Transparent">
|
||||
<Window.Resources>
|
||||
<!-- Animation Durations -->
|
||||
<Duration x:Key="QuickAnimation">0:0:0.15</Duration>
|
||||
<Duration x:Key="NormalAnimation">0:0:0.3</Duration>
|
||||
<Duration x:Key="SlowAnimation">0:0:0.5</Duration>
|
||||
|
||||
<!-- Modern Color Palette -->
|
||||
<SolidColorBrush x:Key="PrimaryBrush" Color="#6366F1"/>
|
||||
<SolidColorBrush x:Key="PrimaryHoverBrush" Color="#4F46E5"/>
|
||||
<SolidColorBrush x:Key="PrimaryLightBrush" Color="#EEF2FF"/>
|
||||
<SolidColorBrush x:Key="SecondaryBrush" Color="#10B981"/>
|
||||
<SolidColorBrush x:Key="DangerBrush" Color="#EF4444"/>
|
||||
<SolidColorBrush x:Key="WarningBrush" Color="#F59E0B"/>
|
||||
<SolidColorBrush x:Key="GlowBrush" Color="#6366F1"/>
|
||||
|
||||
<!-- Dynamic Theme Resources (will be set in code) -->
|
||||
<SolidColorBrush x:Key="SidebarBrush" Color="#1E1E2E"/>
|
||||
<SolidColorBrush x:Key="CardBrush" Color="#252535"/>
|
||||
<SolidColorBrush x:Key="HeaderBrush" Color="#252535"/>
|
||||
<SolidColorBrush x:Key="TextPrimaryBrush" Color="#FFFFFF"/>
|
||||
<SolidColorBrush x:Key="TextSecondaryBrush" Color="#B0B0C0"/>
|
||||
<SolidColorBrush x:Key="BorderBrush" Color="#3A3A4A"/>
|
||||
<SolidColorBrush x:Key="BackgroundBrush" Color="#18181F"/>
|
||||
<SolidColorBrush x:Key="HoverBrush" Color="#2A2A3A"/>
|
||||
<SolidColorBrush x:Key="SidebarTextBrush" Color="#FFFFFF"/>
|
||||
<SolidColorBrush x:Key="SidebarSecondaryBrush" Color="#808090"/>
|
||||
<SolidColorBrush x:Key="MenuBackgroundBrush" Color="#252535"/>
|
||||
|
||||
<!-- Glow Effect -->
|
||||
<DropShadowEffect x:Key="GlowEffect" BlurRadius="15" ShadowDepth="0" Opacity="0.5" Color="#6366F1"/>
|
||||
|
||||
<!-- Additional Brushes -->
|
||||
<SolidColorBrush x:Key="SuccessBrush" Color="#10B981"/>
|
||||
<SolidColorBrush x:Key="CompletedBrush" Color="#94A3B8"/>
|
||||
|
||||
<!-- Modern Button Style with Hover Animation and Gradient -->
|
||||
<Style x:Key="ModernButton" TargetType="Button">
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
<Setter Property="Padding" Value="16,10"/>
|
||||
<Setter Property="Margin" Value="4"/>
|
||||
<Setter Property="FontSize" Value="14"/>
|
||||
<Setter Property="FontWeight" Value="Medium"/>
|
||||
<Setter Property="Cursor" Value="Hand"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
<Setter Property="RenderTransformOrigin" Value="0.5,0.5"/>
|
||||
<Setter Property="RenderTransform">
|
||||
<Setter.Value>
|
||||
<ScaleTransform ScaleX="1" ScaleY="1"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Border x:Name="border" CornerRadius="10" Padding="{TemplateBinding Padding}"
|
||||
RenderTransformOrigin="0.5,0.5">
|
||||
<Border.Background>
|
||||
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
|
||||
<GradientStop Color="#7C7CF1" Offset="0"/>
|
||||
<GradientStop Color="#6366F1" Offset="0.5"/>
|
||||
<GradientStop Color="#5555E5" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
</Border.Background>
|
||||
<Border.RenderTransform>
|
||||
<ScaleTransform x:Name="scaleTransform" ScaleX="1" ScaleY="1"/>
|
||||
</Border.RenderTransform>
|
||||
<Border.Effect>
|
||||
<DropShadowEffect x:Name="glowEffect" BlurRadius="0" ShadowDepth="2" Opacity="0" Color="#6366F1"/>
|
||||
</Border.Effect>
|
||||
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Trigger.EnterActions>
|
||||
<BeginStoryboard>
|
||||
<Storyboard>
|
||||
<DoubleAnimation Storyboard.TargetName="scaleTransform" Storyboard.TargetProperty="ScaleX" To="1.05" Duration="{StaticResource QuickAnimation}"/>
|
||||
<DoubleAnimation Storyboard.TargetName="scaleTransform" Storyboard.TargetProperty="ScaleY" To="1.05" Duration="{StaticResource QuickAnimation}"/>
|
||||
<DoubleAnimation Storyboard.TargetName="glowEffect" Storyboard.TargetProperty="BlurRadius" To="25" Duration="{StaticResource QuickAnimation}"/>
|
||||
<DoubleAnimation Storyboard.TargetName="glowEffect" Storyboard.TargetProperty="Opacity" To="0.6" Duration="{StaticResource QuickAnimation}"/>
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</Trigger.EnterActions>
|
||||
<Trigger.ExitActions>
|
||||
<BeginStoryboard>
|
||||
<Storyboard>
|
||||
<DoubleAnimation Storyboard.TargetName="scaleTransform" Storyboard.TargetProperty="ScaleX" To="1" Duration="{StaticResource QuickAnimation}"/>
|
||||
<DoubleAnimation Storyboard.TargetName="scaleTransform" Storyboard.TargetProperty="ScaleY" To="1" Duration="{StaticResource QuickAnimation}"/>
|
||||
<DoubleAnimation Storyboard.TargetName="glowEffect" Storyboard.TargetProperty="BlurRadius" To="0" Duration="{StaticResource QuickAnimation}"/>
|
||||
<DoubleAnimation Storyboard.TargetName="glowEffect" Storyboard.TargetProperty="Opacity" To="0" Duration="{StaticResource QuickAnimation}"/>
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</Trigger.ExitActions>
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter Property="Opacity" Value="0.5"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="SecondaryButton" TargetType="Button">
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource TextPrimaryBrush}"/>
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="Padding" Value="16,10"/>
|
||||
<Setter Property="Margin" Value="4"/>
|
||||
<Setter Property="FontSize" Value="14"/>
|
||||
<Setter Property="Cursor" Value="Hand"/>
|
||||
<Setter Property="RenderTransformOrigin" Value="0.5,0.5"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Border x:Name="border" Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="10" Padding="{TemplateBinding Padding}"
|
||||
RenderTransformOrigin="0.5,0.5">
|
||||
<Border.RenderTransform>
|
||||
<ScaleTransform x:Name="scaleTransform" ScaleX="1" ScaleY="1"/>
|
||||
</Border.RenderTransform>
|
||||
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="DangerButton" TargetType="Button" BasedOn="{StaticResource ModernButton}">
|
||||
<Setter Property="Background" Value="{DynamicResource DangerBrush}"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="IconButton" TargetType="Button">
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource TextSecondaryBrush}"/>
|
||||
<Setter Property="Width" Value="36"/>
|
||||
<Setter Property="Height" Value="36"/>
|
||||
<Setter Property="Cursor" Value="Hand"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
<Setter Property="FontSize" Value="14"/>
|
||||
<Setter Property="RenderTransformOrigin" Value="0.5,0.5"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Border x:Name="border" Background="{TemplateBinding Background}"
|
||||
CornerRadius="8">
|
||||
<Border.RenderTransform>
|
||||
<ScaleTransform x:Name="scaleTransform" ScaleX="1" ScaleY="1"/>
|
||||
</Border.RenderTransform>
|
||||
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Trigger.EnterActions>
|
||||
<BeginStoryboard>
|
||||
<Storyboard>
|
||||
<DoubleAnimation Storyboard.TargetName="scaleTransform" Storyboard.TargetProperty="ScaleX" To="1.15" Duration="{StaticResource QuickAnimation}"/>
|
||||
<DoubleAnimation Storyboard.TargetName="scaleTransform" Storyboard.TargetProperty="ScaleY" To="1.15" Duration="{StaticResource QuickAnimation}"/>
|
||||
<ColorAnimation Storyboard.TargetName="border" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)" To="#E2E8F0" Duration="{StaticResource QuickAnimation}"/>
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</Trigger.EnterActions>
|
||||
<Trigger.ExitActions>
|
||||
<BeginStoryboard>
|
||||
<Storyboard>
|
||||
<DoubleAnimation Storyboard.TargetName="scaleTransform" Storyboard.TargetProperty="ScaleX" To="1" Duration="{StaticResource QuickAnimation}"/>
|
||||
<DoubleAnimation Storyboard.TargetName="scaleTransform" Storyboard.TargetProperty="ScaleY" To="1" Duration="{StaticResource QuickAnimation}"/>
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</Trigger.ExitActions>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!-- Card Style with Better Shadow -->
|
||||
<Style x:Key="ModernCard" TargetType="Border">
|
||||
<Setter Property="Background" Value="{DynamicResource CardBrush}"/>
|
||||
<Setter Property="CornerRadius" Value="16"/>
|
||||
<Setter Property="Padding" Value="24"/>
|
||||
<Setter Property="Effect">
|
||||
<Setter.Value>
|
||||
<DropShadowEffect BlurRadius="30" ShadowDepth="8" Opacity="0.25" Direction="270" Color="Black"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!-- Task Item Style with Hover Glow -->
|
||||
<Style x:Key="TaskItemBorder" TargetType="Border">
|
||||
<Setter Property="CornerRadius" Value="12"/>
|
||||
<Setter Property="Margin" Value="0,4"/>
|
||||
<Setter Property="Padding" Value="16"/>
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="RenderTransformOrigin" Value="0.5,0.5"/>
|
||||
<Setter Property="Effect">
|
||||
<Setter.Value>
|
||||
<DropShadowEffect x:Name="taskGlow" BlurRadius="0" ShadowDepth="0" Opacity="0" Color="#6366F1"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!-- Scrollbar Style -->
|
||||
<Style TargetType="ScrollBar">
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="Width" Value="6"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="ScrollBar">
|
||||
<Grid>
|
||||
<Border Background="{DynamicResource BackgroundBrush}" CornerRadius="3"/>
|
||||
<Track x:Name="PART_Track" IsDirectionReversed="True">
|
||||
<Track.Thumb>
|
||||
<Thumb>
|
||||
<Thumb.Template>
|
||||
<ControlTemplate TargetType="Thumb">
|
||||
<Border x:Name="thumbBorder" Background="{DynamicResource BorderBrush}" CornerRadius="3" Margin="1"/>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter TargetName="thumbBorder" Property="Background" Value="{DynamicResource PrimaryBrush}"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Thumb.Template>
|
||||
</Thumb>
|
||||
</Track.Thumb>
|
||||
</Track>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="Orientation" Value="Horizontal">
|
||||
<Setter Property="Height" Value="6"/>
|
||||
<Setter Property="Width" Value="Auto"/>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<!-- ScrollViewer Style -->
|
||||
<Style TargetType="ScrollViewer">
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
</Style>
|
||||
|
||||
<!-- Modern Menu Style -->
|
||||
<Style TargetType="Menu">
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource TextPrimaryBrush}"/>
|
||||
</Style>
|
||||
<Style TargetType="MenuItem">
|
||||
<Setter Property="Foreground" Value="{DynamicResource TextPrimaryBrush}"/>
|
||||
<Setter Property="Padding" Value="10,6"/>
|
||||
<Setter Property="FontSize" Value="13"/>
|
||||
</Style>
|
||||
|
||||
<!-- Context Menu Style for Dark Mode -->
|
||||
<Style TargetType="ContextMenu">
|
||||
<Setter Property="Background" Value="{DynamicResource CardBrush}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource TextPrimaryBrush}"/>
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
</Style>
|
||||
|
||||
<!-- MenuItem Style with Dark Mode Support -->
|
||||
<Style x:Key="DarkMenuItemStyle" TargetType="MenuItem">
|
||||
<Setter Property="Foreground" Value="{DynamicResource TextPrimaryBrush}"/>
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="Padding" Value="10,6"/>
|
||||
<Setter Property="FontSize" Value="13"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="MenuItem">
|
||||
<Border x:Name="Border" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" SharedSizeGroup="Icon"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto" SharedSizeGroup="Shortcut"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<ContentPresenter x:Name="Icon" Grid.Column="0" ContentSource="Icon" VerticalAlignment="Center" Margin="0,0,8,0"/>
|
||||
<ContentPresenter Grid.Column="1" ContentSource="Header" RecognizesAccessKey="True" VerticalAlignment="Center"/>
|
||||
<TextBlock x:Name="InputGestureText" Grid.Column="2" Text="{TemplateBinding InputGestureText}"
|
||||
Foreground="{DynamicResource TextSecondaryBrush}" Margin="20,0,0,0" VerticalAlignment="Center"/>
|
||||
<Path x:Name="SubMenuArrow" Grid.Column="3" Data="M0,0 L4,4 L0,8"
|
||||
Fill="{DynamicResource TextPrimaryBrush}" VerticalAlignment="Center" Margin="8,0,0,0"
|
||||
Visibility="Collapsed"/>
|
||||
<Popup x:Name="SubMenuPopup" IsOpen="{Binding IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}"
|
||||
Placement="Right" AllowsTransparency="True" Focusable="False" PopupAnimation="Fade">
|
||||
<Border Background="{DynamicResource CardBrush}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1" Padding="2">
|
||||
<StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Cycle"/>
|
||||
</Border>
|
||||
</Popup>
|
||||
</Grid>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="Role" Value="TopLevelHeader">
|
||||
<Setter TargetName="SubMenuArrow" Property="Visibility" Value="Collapsed"/>
|
||||
<Setter TargetName="SubMenuPopup" Property="Placement" Value="Bottom"/>
|
||||
</Trigger>
|
||||
<Trigger Property="Role" Value="TopLevelItem">
|
||||
<Setter TargetName="SubMenuArrow" Property="Visibility" Value="Collapsed"/>
|
||||
<Setter TargetName="SubMenuPopup" Property="Placement" Value="Bottom"/>
|
||||
</Trigger>
|
||||
<Trigger Property="Role" Value="SubmenuHeader">
|
||||
<Setter TargetName="SubMenuArrow" Property="Visibility" Value="Visible"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsHighlighted" Value="True">
|
||||
<Setter TargetName="Border" Property="Background" Value="{DynamicResource HoverBrush}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter Property="Foreground" Value="{DynamicResource TextSecondaryBrush}"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</Window.Resources>
|
||||
|
||||
<Grid>
|
||||
<!-- Main Content -->
|
||||
<Border CornerRadius="12" Background="{DynamicResource BackgroundBrush}">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Top Bar with Menu and Window Controls -->
|
||||
<Border Grid.Row="0" CornerRadius="12,12,0,0" MouseLeftButtonDown="TitleBar_MouseLeftButtonDown" Background="{DynamicResource HeaderBrush}">
|
||||
<DockPanel Margin="8,4">
|
||||
<!-- Window Controls on Right -->
|
||||
<StackPanel DockPanel.Dock="Right" Orientation="Horizontal" VerticalAlignment="Center">
|
||||
<Button Content="─" Style="{StaticResource IconButton}" Click="MinimizeButton_Click" FontSize="16" FontWeight="Bold" ToolTip="{Binding MinimizeTooltip}"/>
|
||||
<Button x:Name="MaximizeButton" Content="□" Style="{StaticResource IconButton}" Click="MaximizeButton_Click" FontSize="12" ToolTip="{Binding MaximizeTooltip}"/>
|
||||
<Button Content="✕" Style="{StaticResource IconButton}" Click="CloseButton_Click" FontSize="14" Foreground="{DynamicResource DangerBrush}" ToolTip="{Binding CloseTooltip}"/>
|
||||
</StackPanel>
|
||||
|
||||
<!-- Menu Bar on Left -->
|
||||
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
|
||||
<!-- App Icon and Title -->
|
||||
<StackPanel Orientation="Horizontal" Margin="8,0,20,0" VerticalAlignment="Center">
|
||||
<Border Width="28" Height="28" CornerRadius="6" Background="{DynamicResource PrimaryBrush}" Margin="0,0,10,0">
|
||||
<Border.Effect>
|
||||
<DropShadowEffect BlurRadius="10" ShadowDepth="0" Opacity="0.5" Color="#6366F1"/>
|
||||
</Border.Effect>
|
||||
<TextBlock Text="📋" FontSize="14" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
<TextBlock Text="{Binding AppTitleText}" FontSize="14" FontWeight="SemiBold"
|
||||
Foreground="{DynamicResource TextPrimaryBrush}" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
|
||||
<!-- Menus -->
|
||||
<Menu Background="Transparent" Foreground="{DynamicResource TextPrimaryBrush}">
|
||||
<MenuItem Header="{Binding FileText}" Foreground="{DynamicResource TextPrimaryBrush}" Style="{StaticResource DarkMenuItemStyle}">
|
||||
<MenuItem Header="{Binding SettingsText}" Style="{StaticResource DarkMenuItemStyle}">
|
||||
<MenuItem Header="{Binding LanguageText}" Style="{StaticResource DarkMenuItemStyle}">
|
||||
<MenuItem Header="{Binding GermanText}" Command="{Binding SetLanguageDeCommand}" Style="{StaticResource DarkMenuItemStyle}">
|
||||
<MenuItem.Icon>
|
||||
<TextBlock Text="✓" Foreground="{DynamicResource PrimaryBrush}" FontWeight="Bold"
|
||||
Visibility="{Binding IsGerman, Converter={StaticResource BoolToVisibility}}"/>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Header="{Binding EnglishText}" Command="{Binding SetLanguageEnCommand}" Style="{StaticResource DarkMenuItemStyle}">
|
||||
<MenuItem.Icon>
|
||||
<TextBlock Text="✓" Foreground="{DynamicResource PrimaryBrush}" FontWeight="Bold"
|
||||
Visibility="{Binding IsEnglish, Converter={StaticResource BoolToVisibility}}"/>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
</MenuItem>
|
||||
<Separator/>
|
||||
<MenuItem Header="{Binding AutostartText}" Command="{Binding ToggleAutostartCommand}" Style="{StaticResource DarkMenuItemStyle}"/>
|
||||
</MenuItem>
|
||||
<MenuItem Header="{Binding ImportText}" Style="{StaticResource DarkMenuItemStyle}">
|
||||
<MenuItem.Icon>
|
||||
<TextBlock Text="📥" FontSize="12"/>
|
||||
</MenuItem.Icon>
|
||||
<MenuItem Header="{Binding ImportCsvText}" Command="{Binding ImportCsvCommand}" Style="{StaticResource DarkMenuItemStyle}"/>
|
||||
</MenuItem>
|
||||
<MenuItem Header="{Binding ExportText}" Style="{StaticResource DarkMenuItemStyle}">
|
||||
<MenuItem.Icon>
|
||||
<TextBlock Text="📤" FontSize="12"/>
|
||||
</MenuItem.Icon>
|
||||
<MenuItem Header="{Binding ExportCsvText}" Command="{Binding ExportCsvCommand}" Style="{StaticResource DarkMenuItemStyle}"/>
|
||||
</MenuItem>
|
||||
<MenuItem Header="{Binding InfoText}" Style="{StaticResource DarkMenuItemStyle}">
|
||||
<MenuItem.Icon>
|
||||
<TextBlock Text="💬" FontSize="12"/>
|
||||
</MenuItem.Icon>
|
||||
<MenuItem Header="{Binding DiscordText}" Click="Info_Click" Style="{StaticResource DarkMenuItemStyle}"/>
|
||||
</MenuItem>
|
||||
<Separator/>
|
||||
<MenuItem Header="{Binding ExitText}" Command="{Binding ExitCommand}" Style="{StaticResource DarkMenuItemStyle}"/>
|
||||
</MenuItem>
|
||||
<MenuItem Header="{Binding ViewText}" Style="{StaticResource DarkMenuItemStyle}">
|
||||
<MenuItem Header="{Binding DarkModeText}" Command="{Binding ToggleDarkModeCommand}" Style="{StaticResource DarkMenuItemStyle}"
|
||||
Visibility="{Binding IsDarkMode, Converter={StaticResource InverseBoolToVisibility}}"/>
|
||||
<MenuItem Header="{Binding LightModeText}" Command="{Binding ToggleDarkModeCommand}" Style="{StaticResource DarkMenuItemStyle}"
|
||||
Visibility="{Binding IsDarkMode, Converter={StaticResource BoolToVisibility}}"/>
|
||||
</MenuItem>
|
||||
</Menu>
|
||||
</StackPanel>
|
||||
</DockPanel>
|
||||
</Border>
|
||||
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="280"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- Left Sidebar -->
|
||||
<Border Grid.Column="0" Background="{DynamicResource SidebarBrush}" CornerRadius="0,0,0,12">
|
||||
<DockPanel>
|
||||
<!-- Action Buttons -->
|
||||
<StackPanel DockPanel.Dock="Bottom" Margin="16,12">
|
||||
<Button Content="{Binding AddFolderText}" Command="{Binding AddFolderCommand}"
|
||||
Style="{StaticResource ModernButton}" Height="44" Margin="0,0,0,8"/>
|
||||
<Button Content="{Binding AddTaskText}" Command="{Binding AddTaskCommand}"
|
||||
Style="{StaticResource SecondaryButton}" Height="44" Margin="0,0,0,8"
|
||||
MouseEnter="SecondaryButton_MouseEnter" MouseLeave="SecondaryButton_MouseLeave"/>
|
||||
<Button Content="{Binding TestNotificationText}" Command="{Binding TestNotificationCommand}"
|
||||
Style="{StaticResource SecondaryButton}" Height="44"
|
||||
MouseEnter="SecondaryButton_MouseEnter" MouseLeave="SecondaryButton_MouseLeave"/>
|
||||
</StackPanel>
|
||||
|
||||
<!-- Folders Section -->
|
||||
<StackPanel Margin="16,20,16,10">
|
||||
<TextBlock Text="{Binding FoldersText}"
|
||||
Foreground="{DynamicResource SidebarSecondaryBrush}"
|
||||
FontSize="11" FontWeight="SemiBold"
|
||||
Margin="12,0,0,12"/>
|
||||
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto" MaxHeight="400">
|
||||
<TreeView x:Name="FolderTree"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
Foreground="{DynamicResource SidebarTextBrush}"
|
||||
ItemsSource="{Binding Folders}"
|
||||
SelectedItemChanged="FolderTree_SelectedItemChanged"
|
||||
AllowDrop="True"
|
||||
Drop="TreeView_Drop"
|
||||
DragOver="TreeView_DragOver"
|
||||
Padding="10,0">
|
||||
<TreeView.ItemContainerStyle>
|
||||
<Style TargetType="TreeViewItem">
|
||||
<Setter Property="Foreground" Value="{DynamicResource SidebarTextBrush}"/>
|
||||
<Setter Property="Padding" Value="4"/>
|
||||
<Setter Property="Margin" Value="0,2"/>
|
||||
<Setter Property="IsExpanded" Value="True"/>
|
||||
<Setter Property="AllowDrop" Value="True"/>
|
||||
<EventSetter Event="Drop" Handler="TreeViewItem_Drop"/>
|
||||
<EventSetter Event="DragOver" Handler="TreeViewItem_DragOver"/>
|
||||
<EventSetter Event="PreviewMouseRightButtonDown" Handler="TreeViewItem_RightClick"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="TreeViewItem">
|
||||
<Border x:Name="Bd" Background="Transparent" CornerRadius="10" Padding="12,10" Margin="0,2,0,2">
|
||||
<Border x:Name="SelectionBorder" CornerRadius="10" Background="Transparent" Padding="0">
|
||||
<Grid>
|
||||
<Border x:Name="LeftIndicator" Width="0" CornerRadius="2" Background="{DynamicResource PrimaryBrush}"
|
||||
HorizontalAlignment="Left" Margin="0,4,8,4"/>
|
||||
<ContentPresenter x:Name="PART_Header" ContentSource="Header"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsSelected" Value="True">
|
||||
<Setter TargetName="SelectionBorder" Property="Background" Value="{DynamicResource PrimaryBrush}"/>
|
||||
<Setter TargetName="LeftIndicator" Property="Width" Value="0"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter TargetName="SelectionBorder" Property="Background" Value="{DynamicResource HoverBrush}"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</TreeView.ItemContainerStyle>
|
||||
<TreeView.ItemTemplate>
|
||||
<HierarchicalDataTemplate DataType="{x:Type models:Folder}" ItemsSource="{Binding Tasks}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="📁" FontSize="14" Margin="0,0,10,0" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="{Binding Name}" FontSize="13" FontWeight="Medium" VerticalAlignment="Center"/>
|
||||
<Border Background="{DynamicResource PrimaryBrush}" CornerRadius="10"
|
||||
Padding="6,2" Margin="8,0,0,0" VerticalAlignment="Center">
|
||||
<TextBlock Text="{Binding Tasks.Count}" FontSize="11"
|
||||
Foreground="White" FontWeight="SemiBold"/>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</HierarchicalDataTemplate>
|
||||
</TreeView.ItemTemplate>
|
||||
<TreeView.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem Header="{Binding AddTaskToFolderText}" Click="AddTaskToFolder_Click"/>
|
||||
<MenuItem Header="{Binding RenameText}" Click="RenameFolder_Click"/>
|
||||
<Separator/>
|
||||
<MenuItem Header="{Binding DeleteText}" Click="DeleteFolder_Click" Foreground="{DynamicResource DangerBrush}"/>
|
||||
</ContextMenu>
|
||||
</TreeView.ContextMenu>
|
||||
</TreeView>
|
||||
</ScrollViewer>
|
||||
</StackPanel>
|
||||
</DockPanel>
|
||||
</Border>
|
||||
|
||||
<!-- Main Content Area -->
|
||||
<Grid Grid.Column="1" Margin="24">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Header Section -->
|
||||
<DockPanel Grid.Row="0" Margin="0,8,0,20">
|
||||
<StackPanel DockPanel.Dock="Left" Orientation="Horizontal">
|
||||
<Border Width="44" Height="44" CornerRadius="12" Background="{DynamicResource PrimaryBrush}"
|
||||
VerticalAlignment="Center" Margin="0,0,16,0">
|
||||
<TextBlock Text="📋" FontSize="20" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
<StackPanel VerticalAlignment="Center">
|
||||
<TextBlock Text="{Binding SelectedFolderName}" FontSize="22" FontWeight="Bold"
|
||||
Foreground="{DynamicResource TextPrimaryBrush}"/>
|
||||
<TextBlock FontSize="12" Foreground="{DynamicResource TextSecondaryBrush}" Margin="0,2,0,0">
|
||||
<TextBlock.Text>
|
||||
<MultiBinding StringFormat="{}{0} Tasks">
|
||||
<Binding Path="SelectedFolderTasks.Count" FallbackValue="0"/>
|
||||
</MultiBinding>
|
||||
</TextBlock.Text>
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</DockPanel>
|
||||
|
||||
<!-- Tasks List -->
|
||||
<Border Grid.Row="1" Style="{StaticResource ModernCard}">
|
||||
<Grid>
|
||||
<!-- task list view -->
|
||||
<Grid Visibility="{Binding SelectedFolderTasks.Count, Converter={StaticResource CountToVisibility}}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Header -->
|
||||
<Border Grid.Row="0" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="0,0,0,1" Margin="8,8,8,0" Padding="26,8">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="160"/>
|
||||
<ColumnDefinition Width="70"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="" Grid.Column="0" Foreground="{DynamicResource TextSecondaryBrush}" FontSize="11" FontWeight="SemiBold"/>
|
||||
<TextBlock Text="{Binding NameColumnText}" Grid.Column="1" Foreground="{DynamicResource TextSecondaryBrush}" FontSize="11" FontWeight="SemiBold"/>
|
||||
<TextBlock Text="{Binding DateColumnText}" Grid.Column="2" Foreground="{DynamicResource TextSecondaryBrush}" FontSize="11" FontWeight="SemiBold"/>
|
||||
<TextBlock Text="" Grid.Column="3" Foreground="{DynamicResource TextSecondaryBrush}" FontSize="11" FontWeight="SemiBold"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<!-- Tasks -->
|
||||
<ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Auto">
|
||||
<ItemsControl ItemsSource="{Binding SelectedFolderTasks}" Margin="8,0,8,8">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Border x:Name="taskBorder" CornerRadius="12" Margin="0,4" Padding="16"
|
||||
BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1"
|
||||
MouseLeftButtonDown="TaskItem_Click"
|
||||
MouseMove="TaskItem_MouseMove"
|
||||
MouseEnter="TaskItem_MouseEnter"
|
||||
MouseLeave="TaskItem_MouseLeave"
|
||||
Cursor="Hand"
|
||||
RenderTransformOrigin="0.5,0.5"
|
||||
Background="Transparent">
|
||||
<Border.RenderTransform>
|
||||
<ScaleTransform x:Name="taskScale" ScaleX="1" ScaleY="1"/>
|
||||
</Border.RenderTransform>
|
||||
<Border.Effect>
|
||||
<DropShadowEffect x:Name="taskGlow" BlurRadius="0" ShadowDepth="0" Opacity="0" Color="#6366F1"/>
|
||||
</Border.Effect>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="160"/>
|
||||
<ColumnDefinition Width="70"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- Status Indicator -->
|
||||
<Ellipse Grid.Column="0" Width="10" Height="10" Margin="0,0,16,0" VerticalAlignment="Center">
|
||||
<Ellipse.Style>
|
||||
<Style TargetType="Ellipse">
|
||||
<Setter Property="Fill" Value="{DynamicResource SecondaryBrush}"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsNotified}" Value="True">
|
||||
<Setter Property="Fill" Value="{DynamicResource TextSecondaryBrush}"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding ReminderDate, Converter={StaticResource DatePassed}}" Value="True">
|
||||
<Setter Property="Fill" Value="{DynamicResource DangerBrush}"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Ellipse.Style>
|
||||
</Ellipse>
|
||||
|
||||
<!-- Task Info -->
|
||||
<StackPanel Grid.Column="1" VerticalAlignment="Center">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{Binding Name}" FontSize="14" FontWeight="SemiBold"
|
||||
Foreground="{DynamicResource TextPrimaryBrush}"/>
|
||||
<TextBlock Text="🔄" FontSize="12" Margin="6,0,0,0" VerticalAlignment="Center"
|
||||
Visibility="{Binding IsRecurring, Converter={StaticResource BoolToVisibility}}"
|
||||
ToolTip="{Binding RecurringTaskTooltipText, RelativeSource={RelativeSource AncestorType=Window}}"/>
|
||||
</StackPanel>
|
||||
<TextBlock Text="{Binding Description}" FontSize="12"
|
||||
Foreground="{DynamicResource TextSecondaryBrush}"
|
||||
TextTrimming="CharacterEllipsis" MaxWidth="400" Margin="0,4,0,0"
|
||||
Visibility="{Binding Description, Converter={StaticResource StringToVisibility}}"/>
|
||||
</StackPanel>
|
||||
|
||||
<!-- Date -->
|
||||
<StackPanel Grid.Column="2" Orientation="Horizontal" VerticalAlignment="Center">
|
||||
<TextBlock Text="🕐" FontSize="12" Margin="0,0,6,0" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="{Binding ReminderDate, StringFormat='dd.MM.yyyy HH:mm'}"
|
||||
FontSize="12" Foreground="{DynamicResource TextSecondaryBrush}"/>
|
||||
</StackPanel>
|
||||
|
||||
<!-- Checkbox, Edit & Delete -->
|
||||
<StackPanel Grid.Column="3" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right">
|
||||
<CheckBox IsChecked="{Binding IsNotified, Mode=TwoWay}" VerticalAlignment="Center" Margin="0,0,8,0"/>
|
||||
<Button Content="✏"
|
||||
Command="{Binding DataContext.EditTaskCommand, RelativeSource={RelativeSource AncestorType=ItemsControl}}"
|
||||
CommandParameter="{Binding}"
|
||||
Background="Transparent" BorderThickness="0"
|
||||
Foreground="{DynamicResource TextSecondaryBrush}"
|
||||
Cursor="Hand" FontSize="12" Padding="4,0"
|
||||
ToolTip="{Binding EditTaskTooltip}">
|
||||
<Button.Style>
|
||||
<Style TargetType="Button">
|
||||
<Setter Property="Opacity" Value="0.5"/>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Opacity" Value="1"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource PrimaryBrush}"/>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Button.Style>
|
||||
</Button>
|
||||
<Button Content="🗑"
|
||||
Command="{Binding DataContext.DeleteTaskCommand, RelativeSource={RelativeSource AncestorType=ItemsControl}}"
|
||||
CommandParameter="{Binding}"
|
||||
Background="Transparent" BorderThickness="0"
|
||||
Foreground="{DynamicResource TextSecondaryBrush}"
|
||||
Cursor="Hand" FontSize="14" Padding="4,0,0,0"
|
||||
ToolTip="{Binding DeleteTaskTooltip}">
|
||||
<Button.Style>
|
||||
<Style TargetType="Button">
|
||||
<Setter Property="Opacity" Value="0.5"/>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Opacity" Value="1"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource DangerBrush}"/>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Button.Style>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
|
||||
<!-- Empty State -->
|
||||
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center"
|
||||
Visibility="{Binding SelectedFolderTasks.Count, Converter={StaticResource ZeroToVisibility}}">
|
||||
<Border Width="100" Height="100" CornerRadius="50" Margin="0,0,0,24">
|
||||
<Border.Background>
|
||||
<RadialGradientBrush>
|
||||
<GradientStop Color="#6366F1" Offset="0"/>
|
||||
<GradientStop Color="#4F46E5" Offset="1"/>
|
||||
</RadialGradientBrush>
|
||||
</Border.Background>
|
||||
<Border.Effect>
|
||||
<DropShadowEffect BlurRadius="25" ShadowDepth="0" Opacity="0.3" Color="#6366F1"/>
|
||||
</Border.Effect>
|
||||
<TextBlock Text="✨" FontSize="42" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
<TextBlock Text="{Binding NoTasks}"
|
||||
FontSize="18" FontWeight="SemiBold"
|
||||
Foreground="{DynamicResource TextPrimaryBrush}" HorizontalAlignment="Center"/>
|
||||
<TextBlock Text="{Binding CreateTaskHint}"
|
||||
FontSize="14" Foreground="{DynamicResource TextSecondaryBrush}"
|
||||
HorizontalAlignment="Center" Margin="0,10,0,0"/>
|
||||
<Button Content="{Binding AddTaskText}" Command="{Binding AddTaskCommand}"
|
||||
Style="{StaticResource ModernButton}" Margin="0,20,0,0" Padding="24,12"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<!-- Theme Transition Overlay (on top) -->
|
||||
<Border x:Name="ThemeTransitionOverlay" CornerRadius="12" Background="Transparent" Opacity="0" IsHitTestVisible="False"/>
|
||||
</Grid>
|
||||
</Window>
|
||||
Reference in New Issue
Block a user