feat: update demo.
This commit is contained in:
@@ -39,6 +39,7 @@
|
|||||||
<DataTemplate x:DataType="viewModels:TimelineItemViewModel">
|
<DataTemplate x:DataType="viewModels:TimelineItemViewModel">
|
||||||
<u:TimelineItem
|
<u:TimelineItem
|
||||||
Content="{Binding Content}"
|
Content="{Binding Content}"
|
||||||
|
ItemType="{Binding ItemType}"
|
||||||
Time="{Binding Time}"
|
Time="{Binding Time}"
|
||||||
TimeFormat="{Binding TimeFormat}">
|
TimeFormat="{Binding TimeFormat}">
|
||||||
<u:TimelineItem.ContentTemplate>
|
<u:TimelineItem.ContentTemplate>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using CommunityToolkit.Mvvm.ComponentModel;
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||||||
|
using Ursa.Controls;
|
||||||
|
|
||||||
namespace Ursa.Demo.ViewModels;
|
namespace Ursa.Demo.ViewModels;
|
||||||
|
|
||||||
@@ -12,21 +13,24 @@ public class TimelineDemoViewModel: ObservableObject
|
|||||||
Time = DateTime.Now,
|
Time = DateTime.Now,
|
||||||
TimeFormat = "yyyy-MM-dd HH:mm:ss",
|
TimeFormat = "yyyy-MM-dd HH:mm:ss",
|
||||||
Description = "Item 1",
|
Description = "Item 1",
|
||||||
Content = "First"
|
Content = "First",
|
||||||
|
ItemType = TimelineItemType.Success,
|
||||||
},
|
},
|
||||||
new()
|
new()
|
||||||
{
|
{
|
||||||
Time = DateTime.Now,
|
Time = DateTime.Now,
|
||||||
TimeFormat = "HH:mm:ss",
|
TimeFormat = "HH:mm:ss",
|
||||||
Description = "Item 2",
|
Description = "Item 2",
|
||||||
Content = "Content 2"
|
Content = "Content 2",
|
||||||
|
ItemType = TimelineItemType.Success,
|
||||||
},
|
},
|
||||||
new()
|
new()
|
||||||
{
|
{
|
||||||
Time = DateTime.Now,
|
Time = DateTime.Now,
|
||||||
TimeFormat = "HH:mm:ss",
|
TimeFormat = "HH:mm:ss",
|
||||||
Description = "Item 3",
|
Description = "Item 3",
|
||||||
Content = "Content 3"
|
Content = "Content 3",
|
||||||
|
ItemType = TimelineItemType.Ongoing,
|
||||||
},
|
},
|
||||||
new()
|
new()
|
||||||
{
|
{
|
||||||
@@ -107,4 +111,5 @@ public class TimelineItemViewModel: ObservableObject
|
|||||||
public string? TimeFormat { get; set; }
|
public string? TimeFormat { get; set; }
|
||||||
public string? Description { get; set; }
|
public string? Description { get; set; }
|
||||||
public string? Content { get; set; }
|
public string? Content { get; set; }
|
||||||
|
public TimelineItemType ItemType { get; set; }
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user