Files
DeskCore/FenceWindow.xaml
2026-10-04 14:48:53 +00:00

96 lines
6.5 KiB
XML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<Window x:Class="DeskCore.FenceWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=System.Runtime"
WindowStyle="None" AllowsTransparency="True" Background="Transparent" ResizeMode="CanResize"
ShowInTaskbar="False" ShowActivated="False" MinWidth="180" MinHeight="40"
FontFamily="{DynamicResource UiFont}" FontSize="12" Foreground="{DynamicResource TextBrush}"
TextOptions.TextFormattingMode="Display" UseLayoutRounding="True">
<WindowChrome.WindowChrome>
<WindowChrome x:Name="Chrome" CaptionHeight="36" ResizeBorderThickness="6" GlassFrameThickness="0" CornerRadius="0"/>
</WindowChrome.WindowChrome>
<Window.Resources>
<!-- Kachelgrößen je Box (im Code je nach Einstellung gesetzt) -->
<sys:Double x:Key="FTileW">78</sys:Double>
<sys:Double x:Key="FTileH">80</sys:Double>
<sys:Double x:Key="FIcon">32</sys:Double>
</Window.Resources>
<Border x:Name="Root" CornerRadius="8" BorderBrush="{DynamicResource FlyoutStrokeBrush}" BorderThickness="1" ClipToBounds="True">
<DockPanel x:Name="Content_">
<!-- Titel / Tabs (zum Verschieben ziehen, Doppelklick = ein-/ausklappen) -->
<Grid DockPanel.Dock="Top" Height="36" Background="Transparent" x:Name="TitleBar" MouseLeftButtonDown="TitleBar_MouseLeftButtonDown">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<StackPanel x:Name="TabStrip" Orientation="Horizontal" Margin="6,0,0,0" VerticalAlignment="Center" ClipToBounds="True"/>
<TextBlock x:Name="LockGlyph" Grid.Column="1" Text="&#xE72E;" FontFamily="{DynamicResource IconFont}" FontSize="11"
Foreground="{DynamicResource TextTertiaryBrush}" VerticalAlignment="Center" Margin="6,0,0,0"
Visibility="Collapsed" ToolTip="Box ist gesperrt"/>
<TextBlock x:Name="CountText" Grid.Column="2" Foreground="{DynamicResource TextTertiaryBrush}" VerticalAlignment="Center" Margin="8,0"/>
<Button x:Name="MenuButton" Grid.Column="3" Style="{StaticResource SubtleButton}" Padding="7,5" MinHeight="0" Margin="0,0,4,0"
WindowChrome.IsHitTestVisibleInChrome="True" Click="MenuButton_Click" ToolTip="Optionen">
<TextBlock Text="&#xE712;" FontFamily="{DynamicResource IconFont}" FontSize="12"/>
<Button.ContextMenu>
<ContextMenu x:Name="FenceMenu" Placement="Bottom"/>
</Button.ContextMenu>
</Button>
</Grid>
<!-- Ordner-Portal: Unterordner-Navigation -->
<DockPanel x:Name="PortalBar" DockPanel.Dock="Top" Margin="6,0,8,4" Visibility="Collapsed">
<Button DockPanel.Dock="Left" Style="{StaticResource SubtleButton}" Padding="6,3" MinHeight="0" Click="PortalUp_Click" ToolTip="Zurück">
<TextBlock Text="&#xE72B;" FontFamily="{DynamicResource IconFont}" FontSize="11"/>
</Button>
<TextBlock x:Name="PortalPath" VerticalAlignment="Center" Margin="6,0,0,0" TextTrimming="CharacterEllipsis"
Foreground="{DynamicResource TextSecondaryBrush}"/>
</DockPanel>
<Grid x:Name="Body">
<ListBox x:Name="Items" Padding="6,0,6,8" SelectionMode="Extended" ItemContainerStyle="{StaticResource TileItem}"
AllowDrop="True" DragOver="Items_DragOver" DragLeave="Items_DragLeave" Drop="Items_Drop"
MouseDoubleClick="Items_MouseDoubleClick" KeyDown="Items_KeyDown"
PreviewMouseLeftButtonDown="Items_PreviewMouseLeftButtonDown" PreviewMouseMove="Items_PreviewMouseMove"
ContextMenuOpening="Items_ContextMenuOpening">
<ListBox.ContextMenu>
<ContextMenu x:Name="ItemMenu"/>
</ListBox.ContextMenu>
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel/>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Width="{DynamicResource FTileW}" Height="{DynamicResource FTileH}" ToolTip="{Binding Name}">
<Grid Width="{DynamicResource FIcon}" Height="{DynamicResource FIcon}" Margin="0,8,0,0">
<Image Source="{Binding Icon}" RenderOptions.BitmapScalingMode="HighQuality"/>
<!-- Icon-Tönung: Farbfläche in Form des Icons -->
<Rectangle Fill="{DynamicResource FTint}" Opacity="0.6" IsHitTestVisible="False">
<Rectangle.OpacityMask>
<ImageBrush ImageSource="{Binding Icon}"/>
</Rectangle.OpacityMask>
</Rectangle>
</Grid>
<TextBlock Text="{Binding Name}" TextAlignment="Center" TextWrapping="Wrap" TextTrimming="CharacterEllipsis"
MaxHeight="30" LineHeight="15" Margin="4,6,4,0"/>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<TextBlock x:Name="EmptyText" Text="Leer – Icons hierher ziehen" HorizontalAlignment="Center" VerticalAlignment="Center"
Foreground="{DynamicResource TextTertiaryBrush}" IsHitTestVisible="False" Margin="16,0,16,10"
TextWrapping="Wrap" TextAlignment="Center"/>
<!-- Einfügestelle beim Umsortieren per Ziehen -->
<Rectangle x:Name="DropMarker" Width="3" RadiusX="1.5" RadiusY="1.5" Fill="{DynamicResource AccentBrush}"
HorizontalAlignment="Left" VerticalAlignment="Top" IsHitTestVisible="False" Visibility="Collapsed"/>
</Grid>
</DockPanel>
</Border>
</Window>