feat: swap placement.
This commit is contained in:
@@ -131,27 +131,6 @@
|
|||||||
<Setter Property="Fill" Value="{DynamicResource SemiOrange6}"/>
|
<Setter Property="Fill" Value="{DynamicResource SemiOrange6}"/>
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:all-left">
|
<Style Selector="^:all-left">
|
||||||
<Style Selector="^ /template/ ContentPresenter#PART_Header">
|
|
||||||
<Setter Property="Grid.Row" Value="0" />
|
|
||||||
<Setter Property="Grid.Column" Value="0" />
|
|
||||||
<Setter Property="HorizontalContentAlignment" Value="Right" />
|
|
||||||
<Setter Property="HorizontalAlignment" Value="Right" />
|
|
||||||
</Style>
|
|
||||||
<Style Selector="^ /template/ ContentPresenter#PART_Content">
|
|
||||||
<Setter Property="Grid.Row" Value="1" />
|
|
||||||
<Setter Property="Grid.Column" Value="0" />
|
|
||||||
<Setter Property="HorizontalContentAlignment" Value="Right" />
|
|
||||||
<Setter Property="HorizontalAlignment" Value="Right" />
|
|
||||||
</Style>
|
|
||||||
<Style Selector="^ /template/ TextBlock#PART_Time">
|
|
||||||
<Setter Property="Grid.Row" Value="2" />
|
|
||||||
<Setter Property="Grid.Column" Value="0" />
|
|
||||||
<Setter Property="TextAlignment" Value="Right" />
|
|
||||||
<Setter Property="HorizontalAlignment" Value="Right" />
|
|
||||||
<Setter Property="Margin" Value="8 2 8 12"></Setter>
|
|
||||||
</Style>
|
|
||||||
</Style>
|
|
||||||
<Style Selector="^:all-right">
|
|
||||||
<Style Selector="^ /template/ ContentPresenter#PART_Header">
|
<Style Selector="^ /template/ ContentPresenter#PART_Header">
|
||||||
<Setter Property="Grid.Row" Value="0" />
|
<Setter Property="Grid.Row" Value="0" />
|
||||||
<Setter Property="Grid.Column" Value="2" />
|
<Setter Property="Grid.Column" Value="2" />
|
||||||
@@ -172,6 +151,27 @@
|
|||||||
<Setter Property="Margin" Value="8 2 8 12"></Setter>
|
<Setter Property="Margin" Value="8 2 8 12"></Setter>
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
|
<Style Selector="^:all-right">
|
||||||
|
<Style Selector="^ /template/ ContentPresenter#PART_Header">
|
||||||
|
<Setter Property="Grid.Row" Value="0" />
|
||||||
|
<Setter Property="Grid.Column" Value="0" />
|
||||||
|
<Setter Property="HorizontalContentAlignment" Value="Right" />
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Right" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^ /template/ ContentPresenter#PART_Content">
|
||||||
|
<Setter Property="Grid.Row" Value="1" />
|
||||||
|
<Setter Property="Grid.Column" Value="0" />
|
||||||
|
<Setter Property="HorizontalContentAlignment" Value="Right" />
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Right" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^ /template/ TextBlock#PART_Time">
|
||||||
|
<Setter Property="Grid.Row" Value="2" />
|
||||||
|
<Setter Property="Grid.Column" Value="0" />
|
||||||
|
<Setter Property="TextAlignment" Value="Right" />
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Right" />
|
||||||
|
<Setter Property="Margin" Value="8 2 8 12"></Setter>
|
||||||
|
</Style>
|
||||||
|
</Style>
|
||||||
<Style Selector="^:separate">
|
<Style Selector="^:separate">
|
||||||
<Style Selector="^ /template/ ContentPresenter#PART_Header">
|
<Style Selector="^ /template/ ContentPresenter#PART_Header">
|
||||||
<Setter Property="Grid.Row" Value="0" />
|
<Setter Property="Grid.Row" Value="0" />
|
||||||
|
|||||||
@@ -8,6 +8,12 @@ public enum TimelineDisplayMode
|
|||||||
Alternate,
|
Alternate,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Placement of timeline.
|
||||||
|
/// Left means line is placed left to TimelineItem content.
|
||||||
|
/// Right means line is placed right to TimelineItem content.
|
||||||
|
/// Separate means line is placed between TimelineItem content and time.
|
||||||
|
/// </summary>
|
||||||
public enum TimelineItemDisplayMode
|
public enum TimelineItemDisplayMode
|
||||||
{
|
{
|
||||||
Left,
|
Left,
|
||||||
|
|||||||
@@ -169,12 +169,12 @@ public class TimelineItem: HeaderedContentControl
|
|||||||
if (Mode == TimelineItemDisplayMode.Left)
|
if (Mode == TimelineItemDisplayMode.Left)
|
||||||
{
|
{
|
||||||
max = Math.Max(max, time);
|
max = Math.Max(max, time);
|
||||||
return (max, icon, 0);
|
return (0, icon, max);
|
||||||
}
|
}
|
||||||
if (Mode == TimelineItemDisplayMode.Right)
|
if (Mode == TimelineItemDisplayMode.Right)
|
||||||
{
|
{
|
||||||
max = Math.Max(max, time);
|
max = Math.Max(max, time);
|
||||||
return (0, icon, max);
|
return (max , icon, 0);
|
||||||
}
|
}
|
||||||
if (Mode == TimelineItemDisplayMode.Separate)
|
if (Mode == TimelineItemDisplayMode.Separate)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user