整理
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:controls="clr-namespace:NeumUI.Controls"
|
||||
xmlns:svd="clr-namespace:NeumUI.Controls.Decorations"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:assists="clr-namespace:NeoUI.Assists"
|
||||
xmlns:controls="clr-namespace:NeoUI.Controls"
|
||||
xmlns:svd="clr-namespace:NeoUI.Controls.Decorations">
|
||||
|
||||
<!-- ListBoxItem 的样式保持不变,因为我们内部还是用 ListBox 来显示锚点 -->
|
||||
<Style TargetType="{x:Type ListBoxItem}" x:Key="AnchorItemStyle">
|
||||
<Style x:Key="AnchorItemStyle" TargetType="{x:Type ListBoxItem}">
|
||||
<Setter Property="Foreground" Value="{DynamicResource TextPrimaryBrush}" />
|
||||
<Setter Property="Background" Value="{DynamicResource BackgroundLayoutBrush}" />
|
||||
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
|
||||
@@ -17,33 +18,34 @@
|
||||
<ControlTemplate TargetType="{x:Type ListBoxItem}">
|
||||
<Grid>
|
||||
<svd:SlotBorder
|
||||
x:Name="slot"
|
||||
Margin="-4"
|
||||
HorizontalAlignment="Stretch"
|
||||
Background="Transparent"
|
||||
ClipToBounds="True"
|
||||
HorizontalAlignment="Stretch"
|
||||
Intensity="0"
|
||||
ShaderEnabled="False"
|
||||
x:Name="slot">
|
||||
ShaderEnabled="False">
|
||||
<ContentPresenter
|
||||
x:Name="content"
|
||||
HorizontalAlignment="Center"
|
||||
TextElement.FontWeight="Normal"
|
||||
TextElement.Foreground="{DynamicResource TextDisabledBrush}"
|
||||
VerticalAlignment="Center"
|
||||
x:Name="content" />
|
||||
TextElement.FontWeight="Normal"
|
||||
TextElement.Foreground="{DynamicResource TextDisabledBrush}" />
|
||||
</svd:SlotBorder>
|
||||
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="TextElement.Foreground" TargetName="content" Value="{DynamicResource PrimaryFocusedBrush}" />
|
||||
<Setter Property="Intensity" TargetName="slot" Value="0.15" />
|
||||
<Setter Property="ShaderEnabled" TargetName="slot" Value="True" />
|
||||
<Setter TargetName="content" Property="TextElement.Foreground" Value="{DynamicResource PrimaryFocusedBrush}" />
|
||||
<Setter TargetName="slot" Property="Intensity" Value="0.15" />
|
||||
<Setter TargetName="slot" Property="ShaderEnabled" Value="True" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsSelected" Value="True">
|
||||
<!-- <Setter TargetName="ConvexShadow" Property="Background" Value="Transparent" /> -->
|
||||
<Setter Property="Intensity" TargetName="slot" Value="0.6" />
|
||||
<Setter Property="ShaderEnabled" TargetName="slot" Value="True" />
|
||||
<Setter Property="TextElement.FontWeight" TargetName="content" Value="Bold" />
|
||||
<Setter Property="TextElement.Foreground" TargetName="content" Value="{DynamicResource PrimaryGradientBrush}" />
|
||||
<Setter TargetName="slot" Property="Intensity" Value="0.6" />
|
||||
<Setter TargetName="slot" Property="ShaderEnabled" Value="True" />
|
||||
<Setter TargetName="content" Property="TextElement.FontWeight" Value="Bold" />
|
||||
<Setter TargetName="content" Property="TextElement.Foreground" Value="{DynamicResource PrimaryGradientBrush}" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
@@ -66,26 +68,26 @@
|
||||
|
||||
<!-- 左侧: 锚点列表 -->
|
||||
<svd:EmbossBorder
|
||||
HorizontalAlignment="Stretch"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
ClipToBounds="True"
|
||||
HorizontalAlignment="Stretch"
|
||||
Intensity="0">
|
||||
<ListBox
|
||||
x:Name="PART_AnchorList"
|
||||
Grid.Column="0"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
Grid.Column="0"
|
||||
ItemContainerStyle="{StaticResource AnchorItemStyle}"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
||||
x:Name="PART_AnchorList" />
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Disabled" />
|
||||
</svd:EmbossBorder>
|
||||
|
||||
<!-- 右侧: 内容滚动区 -->
|
||||
<ScrollViewer
|
||||
x:Name="PART_ContentScroller"
|
||||
Grid.Column="1"
|
||||
VerticalScrollBarVisibility="Auto"
|
||||
x:Name="PART_ContentScroller">
|
||||
VerticalScrollBarVisibility="Auto">
|
||||
<!-- ContentPresenter 会将 Anchor 的 Content 放置在这里 -->
|
||||
<ContentPresenter />
|
||||
</ScrollViewer>
|
||||
|
||||
Reference in New Issue
Block a user