delete console.writeline; add vertical drag; improve code style;

This commit is contained in:
LiWenhao
2024-04-07 10:57:57 +08:00
parent a03591516a
commit 436faccd9b
3 changed files with 61 additions and 35 deletions

View File

@@ -46,8 +46,7 @@
<Panel Name="{x:Static u:TimeBox.PART_HourDragPanel}"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Background="Transparent"
Cursor="SizeWestEast"/>
Background="Transparent"/>
</Grid>
</Border>
<TextBlock
@@ -74,8 +73,7 @@
<Panel Name="{x:Static u:TimeBox.PART_MinuteDragPanel}"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Background="Transparent"
Cursor="SizeWestEast"/>
Background="Transparent"/>
</Grid>
</Border>
<TextBlock
@@ -102,8 +100,7 @@
<Panel Name="{x:Static u:TimeBox.PART_SecondDragPanel}"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Background="Transparent"
Cursor="SizeWestEast"/>
Background="Transparent"/>
</Grid>
</Border>
<TextBlock
@@ -130,8 +127,7 @@
<Panel Name="{x:Static u:TimeBox.PART_MilliSecondDragPanel}"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Background="Transparent"
Cursor="SizeWestEast"/>
Background="Transparent"/>
</Grid>
</Border>
</Grid>
@@ -145,5 +141,15 @@
<Setter Property="Background" Value="{DynamicResource TimeBoxDisabledBackground}" />
<Setter Property="Foreground" Value="{DynamicResource SemiColorDisabledText}" />
</Style>
<Style Selector="^[DragOrientation=Horizontal]">
<Style Selector="^/template/ Panel">
<Setter Property="Cursor" Value="SizeWestEast"/>
</Style>
</Style>
<Style Selector="^[DragOrientation=Vertical]">
<Style Selector="^/template/ Panel">
<Setter Property="Cursor" Value="SizeNorthSouth"/>
</Style>
</Style>
</ControlTheme>
</ResourceDictionary>