-
Notifications
You must be signed in to change notification settings - Fork 152
Expand file tree
/
Copy pathSettingsExpanderDragHandleSample.xaml.cs
More file actions
56 lines (45 loc) · 1.7 KB
/
SettingsExpanderDragHandleSample.xaml.cs
File metadata and controls
56 lines (45 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using CommunityToolkit.Mvvm.ComponentModel;
namespace SettingsControlsExperiment.Samples;
[ToolkitSample(id: nameof(SettingsExpanderDragHandleSample), "SettingsExpanderDragHandle", description: "The SettingsCard/SettingsExpander can be within a collection itself which can be re-ordered.")]
public sealed partial class SettingsExpanderDragHandleSample : Page
{
public ObservableCollection<ExpandedCardInfo> MyDataSet = new() {
new()
{
Name = "First Item",
Info = "More about first item.",
LinkDescription = "Click the link for more on first item.",
Url = "https://microsoft.com/",
},
new()
{
Name = "Second Item",
Info = "More about second item.",
LinkDescription = "Click the link for more on second item.",
Url = "https://xbox.com/",
},
new()
{
Name = "Third Item",
Info = "More about third item.",
LinkDescription = "Click the link for more on third item.",
Url = "https://toolkitlabs.dev/",
},
};
public SettingsExpanderDragHandleSample()
{
this.InitializeComponent();
}
}
public partial class ExpandedCardInfo : ObservableObject
{
public string? Name { get; set; }
public string? Info { get; set; }
public string? LinkDescription { get; set; }
public string? Url { get; set; }
[ObservableProperty]
public partial bool IsExpanded { get; set; } = false;
}