mirror of
https://github.com/wwiinnddyy/LanMountainDesktop.git
synced 2026-06-22 09:14:25 +08:00
0.2.0
组件系统
This commit is contained in:
@@ -210,6 +210,8 @@
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
<Canvas x:Name="DesktopEditDragLayer"
|
||||
IsHitTestVisible="False" />
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
@@ -259,8 +261,8 @@
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Spacing="8">
|
||||
<fi:SymbolIcon Classes="icon-m"
|
||||
Symbol="Window"
|
||||
<fi:FluentIcon x:Name="BackToWindowsIcon"
|
||||
Icon="Window"
|
||||
IconVariant="Regular" />
|
||||
<TextBlock x:Name="BackToWindowsTextBlock"
|
||||
Foreground="{DynamicResource AdaptiveTextPrimaryBrush}"
|
||||
@@ -301,7 +303,7 @@
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Spacing="8">
|
||||
<fi:FluentIcon Classes="icon-m"
|
||||
<fi:FluentIcon x:Name="OpenComponentLibraryIcon"
|
||||
Icon="Apps"
|
||||
IconVariant="Regular" />
|
||||
<TextBlock x:Name="OpenComponentLibraryTextBlock"
|
||||
@@ -324,8 +326,8 @@
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Spacing="6">
|
||||
<fi:SymbolIcon Classes="icon-l"
|
||||
Symbol="Settings"
|
||||
<fi:FluentIcon x:Name="OpenSettingsIcon"
|
||||
Icon="Settings"
|
||||
IconVariant="Regular" />
|
||||
<TextBlock x:Name="OpenSettingsButtonTextBlock"
|
||||
IsVisible="False"
|
||||
@@ -413,32 +415,32 @@
|
||||
SelectionChanged="OnSettingsNavSelectionChanged">
|
||||
<ListBoxItem x:Name="SettingsNavWallpaperItem" ToolTip.Tip="壁纸">
|
||||
<StackPanel Orientation="Horizontal" Spacing="12">
|
||||
<fi:SymbolIcon Symbol="Image" IconVariant="Regular" />
|
||||
<TextBlock Text="壁纸" VerticalAlignment="Center" />
|
||||
<fi:SymbolIcon x:Name="SettingsNavWallpaperIcon" Symbol="Wallpaper" IconVariant="Regular" />
|
||||
<TextBlock x:Name="SettingsNavWallpaperTextBlock" Text="壁纸" VerticalAlignment="Center" />
|
||||
</StackPanel>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem x:Name="SettingsNavGridItem" ToolTip.Tip="网格">
|
||||
<StackPanel Orientation="Horizontal" Spacing="12">
|
||||
<fi:SymbolIcon Symbol="Grid" IconVariant="Regular" />
|
||||
<TextBlock Text="网格" VerticalAlignment="Center" />
|
||||
<fi:SymbolIcon x:Name="SettingsNavGridIcon" Symbol="Grid" IconVariant="Regular" />
|
||||
<TextBlock x:Name="SettingsNavGridTextBlock" Text="网格" VerticalAlignment="Center" />
|
||||
</StackPanel>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem x:Name="SettingsNavColorItem" ToolTip.Tip="颜色">
|
||||
<StackPanel Orientation="Horizontal" Spacing="12">
|
||||
<fi:SymbolIcon Symbol="Color" IconVariant="Regular" />
|
||||
<TextBlock Text="颜色" VerticalAlignment="Center" />
|
||||
<fi:SymbolIcon x:Name="SettingsNavColorIcon" Symbol="Color" IconVariant="Regular" />
|
||||
<TextBlock x:Name="SettingsNavColorTextBlock" Text="颜色" VerticalAlignment="Center" />
|
||||
</StackPanel>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem x:Name="SettingsNavStatusBarItem" ToolTip.Tip="状态栏">
|
||||
<StackPanel Orientation="Horizontal" Spacing="12">
|
||||
<fi:SymbolIcon Symbol="Clock" IconVariant="Regular" />
|
||||
<TextBlock Text="状态栏" VerticalAlignment="Center" />
|
||||
<fi:SymbolIcon x:Name="SettingsNavStatusBarIcon" Symbol="Status" IconVariant="Regular" />
|
||||
<TextBlock x:Name="SettingsNavStatusBarTextBlock" Text="状态栏" VerticalAlignment="Center" />
|
||||
</StackPanel>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem x:Name="SettingsNavRegionItem" ToolTip.Tip="地区">
|
||||
<StackPanel Orientation="Horizontal" Spacing="12">
|
||||
<fi:SymbolIcon Symbol="Earth" IconVariant="Regular" />
|
||||
<TextBlock Text="地区" VerticalAlignment="Center" />
|
||||
<fi:SymbolIcon x:Name="SettingsNavRegionIcon" Symbol="Globe" IconVariant="Regular" />
|
||||
<TextBlock x:Name="SettingsNavRegionTextBlock" Text="地区" VerticalAlignment="Center" />
|
||||
</StackPanel>
|
||||
</ListBoxItem>
|
||||
</ListBox>
|
||||
@@ -461,12 +463,6 @@
|
||||
Foreground="{DynamicResource AdaptiveTextPrimaryBrush}"
|
||||
Margin="0,0,0,24"
|
||||
Text="个性化您的背景" />
|
||||
<TextBlock x:Name="WallpaperPanelDescriptionTextBlock"
|
||||
Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"
|
||||
FontSize="14"
|
||||
Foreground="{DynamicResource AdaptiveTextSecondaryBrush}"
|
||||
Margin="0,-18,0,24"
|
||||
Text="更改您的壁纸并将预览投影到显示器上。" />
|
||||
|
||||
<!-- Left Column: Monitor Preview -->
|
||||
<Border x:Name="WallpaperPreviewHost"
|
||||
@@ -603,45 +599,120 @@
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
<StackPanel x:Name="GridSettingsPanel"
|
||||
IsVisible="False"
|
||||
Spacing="16">
|
||||
<Grid x:Name="GridSettingsPanel"
|
||||
IsVisible="False"
|
||||
ColumnDefinitions="*, *"
|
||||
RowDefinitions="Auto, *">
|
||||
<TextBlock x:Name="GridPanelTitleTextBlock"
|
||||
FontSize="24"
|
||||
Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"
|
||||
FontSize="28"
|
||||
FontWeight="SemiBold"
|
||||
Foreground="{DynamicResource AdaptiveTextPrimaryBrush}"
|
||||
Text="Grid layout" />
|
||||
Margin="0,0,0,24"
|
||||
Text="调整网格布局" />
|
||||
|
||||
<ui:SettingsExpander x:Name="GridSizeSettingsExpander"
|
||||
Header="短边格数"
|
||||
Description="决定桌面短边的基础格子数量">
|
||||
<ui:SettingsExpander.IconSource>
|
||||
<!-- Left Column: Grid Preview -->
|
||||
<Border x:Name="GridPreviewHost"
|
||||
Grid.Row="1" Grid.Column="0"
|
||||
Margin="0,0,16,0"
|
||||
VerticalAlignment="Top"
|
||||
HorizontalAlignment="Stretch">
|
||||
<Border x:Name="GridPreviewFrame"
|
||||
HorizontalAlignment="Stretch"
|
||||
CornerRadius="14"
|
||||
Background="#FF1A1A1A"
|
||||
Padding="12">
|
||||
<Border x:Name="GridPreviewViewport"
|
||||
ClipToBounds="True"
|
||||
CornerRadius="4"
|
||||
Background="#30111827">
|
||||
<Panel>
|
||||
<Canvas x:Name="GridPreviewLinesCanvas" />
|
||||
<Grid x:Name="GridPreviewGrid"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center">
|
||||
<Border x:Name="GridPreviewTopStatusBarHost"
|
||||
Grid.Row="0"
|
||||
Background="Transparent"
|
||||
Padding="2">
|
||||
<StackPanel x:Name="GridPreviewTopStatusComponentsPanel"
|
||||
Orientation="Horizontal"
|
||||
Spacing="3">
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
</ui:SettingsExpander.IconSource>
|
||||
<ui:SettingsExpander.Footer>
|
||||
<Grid ColumnDefinitions="Auto,Auto"
|
||||
ColumnSpacing="8">
|
||||
<ui:NumberBox x:Name="GridSizeNumberBox"
|
||||
Grid.Column="0"
|
||||
Width="120"
|
||||
Minimum="6"
|
||||
Maximum="96"
|
||||
Foreground="{DynamicResource AdaptiveTextPrimaryBrush}"
|
||||
Value="12" />
|
||||
<Button x:Name="ApplyGridButton"
|
||||
Grid.Column="1"
|
||||
Padding="12,6"
|
||||
Foreground="{DynamicResource AdaptiveTextPrimaryBrush}"
|
||||
Click="OnApplyGridSizeClick"
|
||||
Content="应用" />
|
||||
</Grid>
|
||||
</ui:SettingsExpander.Footer>
|
||||
</ui:SettingsExpander>
|
||||
<Border x:Name="GridPreviewBottomTaskbarContainer"
|
||||
Classes="glass-strong"
|
||||
Grid.Row="1"
|
||||
Margin="3"
|
||||
CornerRadius="8"
|
||||
Padding="2">
|
||||
<Grid ColumnDefinitions="Auto,*,Auto"
|
||||
ColumnSpacing="3">
|
||||
<Border x:Name="GridPreviewTaskbarFixedActionsHost" Grid.Column="0">
|
||||
<StackPanel x:Name="GridPreviewBackButtonVisual" Orientation="Horizontal" Spacing="3">
|
||||
<fi:SymbolIcon Classes="icon-s" Symbol="Window" />
|
||||
<TextBlock x:Name="GridPreviewBackButtonTextBlock" Text="回到Windows" VerticalAlignment="Center" />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<StackPanel x:Name="GridPreviewTaskbarDynamicActionsHost"
|
||||
Grid.Column="1"
|
||||
Orientation="Horizontal"
|
||||
HorizontalAlignment="Center"
|
||||
Spacing="3" />
|
||||
<Border x:Name="GridPreviewTaskbarSettingsActionHost" Grid.Column="2">
|
||||
<StackPanel Orientation="Horizontal" Spacing="3">
|
||||
<StackPanel x:Name="GridPreviewComponentLibraryVisual" IsVisible="False" Orientation="Horizontal" Spacing="3">
|
||||
<fi:FluentIcon x:Name="GridPreviewComponentLibraryIcon" Classes="icon-s" Icon="Apps" />
|
||||
<TextBlock x:Name="GridPreviewComponentLibraryTextBlock" Text="组件库" VerticalAlignment="Center" />
|
||||
</StackPanel>
|
||||
<fi:SymbolIcon x:Name="GridPreviewSettingsButtonIcon" Classes="icon-s" Symbol="Settings" />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Panel>
|
||||
</Border>
|
||||
</Border>
|
||||
</Border>
|
||||
|
||||
<TextBlock x:Name="GridInfoTextBlock"
|
||||
Foreground="{DynamicResource AdaptiveTextSecondaryBrush}"
|
||||
Text="Grid: - cols x - rows (1:1)" />
|
||||
</StackPanel>
|
||||
<!-- Right Column: Settings Content -->
|
||||
<StackPanel Grid.Row="1" Grid.Column="1"
|
||||
Margin="16,0,0,0"
|
||||
Spacing="16">
|
||||
<TextBlock Text="竖排格数" FontSize="16" FontWeight="SemiBold" Foreground="{DynamicResource AdaptiveTextPrimaryBrush}" />
|
||||
|
||||
<Grid ColumnDefinitions="*,Auto" ColumnSpacing="12">
|
||||
<Slider x:Name="GridSizeSlider"
|
||||
Grid.Column="0"
|
||||
Minimum="6"
|
||||
Maximum="96"
|
||||
TickFrequency="1"
|
||||
TickPlacement="None"
|
||||
Value="12"
|
||||
ValueChanged="OnGridSizeSliderChanged" />
|
||||
<ui:NumberBox x:Name="GridSizeNumberBox"
|
||||
Grid.Column="1"
|
||||
Width="80"
|
||||
Minimum="6"
|
||||
Maximum="96"
|
||||
Foreground="{DynamicResource AdaptiveTextPrimaryBrush}"
|
||||
Value="12" />
|
||||
</Grid>
|
||||
|
||||
<Button x:Name="ApplyGridButton"
|
||||
HorizontalAlignment="Stretch"
|
||||
Padding="0,10"
|
||||
Foreground="{DynamicResource AdaptiveTextPrimaryBrush}"
|
||||
Click="OnApplyGridSizeClick"
|
||||
Content="应用" />
|
||||
|
||||
<TextBlock x:Name="GridInfoTextBlock"
|
||||
Foreground="{DynamicResource AdaptiveTextSecondaryBrush}"
|
||||
Text="Grid: - cols x - rows (1:1)" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
<StackPanel x:Name="ColorSettingsPanel"
|
||||
IsVisible="False"
|
||||
@@ -899,6 +970,18 @@
|
||||
</ComboBox>
|
||||
</ui:SettingsExpander.Footer>
|
||||
</ui:SettingsExpander>
|
||||
<ui:SettingsExpander x:Name="TimeZoneSettingsExpander"
|
||||
Header="时区"
|
||||
Description="选择时区,时钟和日历将根据此时区显示时间。">
|
||||
<ui:SettingsExpander.IconSource>
|
||||
|
||||
</ui:SettingsExpander.IconSource>
|
||||
<ui:SettingsExpander.Footer>
|
||||
<ComboBox x:Name="TimeZoneComboBox"
|
||||
Width="280"
|
||||
SelectionChanged="OnTimeZoneSelectionChanged" />
|
||||
</ui:SettingsExpander.Footer>
|
||||
</ui:SettingsExpander>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Border>
|
||||
@@ -956,20 +1039,89 @@
|
||||
CornerRadius="12"
|
||||
Padding="14">
|
||||
<Grid>
|
||||
<ScrollViewer x:Name="ComponentLibraryItemsScrollViewer"
|
||||
VerticalScrollBarVisibility="Auto"
|
||||
HorizontalScrollBarVisibility="Disabled">
|
||||
<WrapPanel x:Name="ComponentLibraryItemsPanel"
|
||||
ItemWidth="190"
|
||||
ItemHeight="104"
|
||||
Orientation="Horizontal" />
|
||||
</ScrollViewer>
|
||||
<!-- Category picker (outer) -->
|
||||
<Grid x:Name="ComponentLibraryCategoriesView">
|
||||
<Border x:Name="ComponentLibraryCategoryViewport"
|
||||
Background="Transparent"
|
||||
ClipToBounds="True"
|
||||
PointerPressed="OnComponentLibraryCategoryViewportPointerPressed"
|
||||
PointerMoved="OnComponentLibraryCategoryViewportPointerMoved"
|
||||
PointerReleased="OnComponentLibraryCategoryViewportPointerReleased"
|
||||
PointerCaptureLost="OnComponentLibraryCategoryViewportPointerCaptureLost">
|
||||
<Grid>
|
||||
<Grid x:Name="ComponentLibraryCategoryPagesHost"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Top">
|
||||
<Grid.RenderTransform>
|
||||
<TranslateTransform>
|
||||
<TranslateTransform.Transitions>
|
||||
<Transitions>
|
||||
<DoubleTransition Property="X" Duration="0:0:0.22" />
|
||||
</Transitions>
|
||||
</TranslateTransform.Transitions>
|
||||
</TranslateTransform>
|
||||
</Grid.RenderTransform>
|
||||
|
||||
<TextBlock x:Name="ComponentLibraryEmptyTextBlock"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Center"
|
||||
Foreground="{DynamicResource AdaptiveTextSecondaryBrush}"
|
||||
Text="暂无组件,后续将在这里显示。" />
|
||||
<Grid x:Name="ComponentLibraryCategoryPagesContainer" />
|
||||
</Grid>
|
||||
|
||||
<TextBlock x:Name="ComponentLibraryEmptyTextBlock"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Center"
|
||||
Foreground="{DynamicResource AdaptiveTextSecondaryBrush}"
|
||||
Text="No components." />
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
<!-- Component picker (inner) -->
|
||||
<Grid x:Name="ComponentLibraryComponentsView"
|
||||
IsVisible="False"
|
||||
RowDefinitions="Auto,*"
|
||||
RowSpacing="10">
|
||||
<Button x:Name="ComponentLibraryBackButton"
|
||||
Grid.Row="0"
|
||||
HorizontalAlignment="Left"
|
||||
Padding="8,6"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
Foreground="{DynamicResource AdaptiveTextPrimaryBrush}"
|
||||
Click="OnComponentLibraryBackClick">
|
||||
<StackPanel Orientation="Horizontal" Spacing="8">
|
||||
<fi:SymbolIcon Classes="icon-s" Symbol="ArrowLeft" IconVariant="Regular" />
|
||||
<TextBlock x:Name="ComponentLibraryBackTextBlock"
|
||||
VerticalAlignment="Center"
|
||||
Text="Back" />
|
||||
</StackPanel>
|
||||
</Button>
|
||||
|
||||
<Border x:Name="ComponentLibraryComponentViewport"
|
||||
Grid.Row="1"
|
||||
Background="Transparent"
|
||||
ClipToBounds="True"
|
||||
PointerPressed="OnComponentLibraryComponentViewportPointerPressed"
|
||||
PointerMoved="OnComponentLibraryComponentViewportPointerMoved"
|
||||
PointerReleased="OnComponentLibraryComponentViewportPointerReleased"
|
||||
PointerCaptureLost="OnComponentLibraryComponentViewportPointerCaptureLost">
|
||||
<Grid>
|
||||
<Grid x:Name="ComponentLibraryComponentPagesHost"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Top">
|
||||
<Grid.RenderTransform>
|
||||
<TranslateTransform>
|
||||
<TranslateTransform.Transitions>
|
||||
<Transitions>
|
||||
<DoubleTransition Property="X" Duration="0:0:0.22" />
|
||||
</Transitions>
|
||||
</TranslateTransform.Transitions>
|
||||
</TranslateTransform>
|
||||
</Grid.RenderTransform>
|
||||
|
||||
<Grid x:Name="ComponentLibraryComponentPagesContainer" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
Reference in New Issue
Block a user