|
@@ -13,23 +13,6 @@ using XamlTestApplication.Views;
|
|
|
|
|
|
|
|
namespace XamlTestApplication
|
|
namespace XamlTestApplication
|
|
|
{
|
|
{
|
|
|
- internal class Item
|
|
|
|
|
- {
|
|
|
|
|
- public string Name { get; set; }
|
|
|
|
|
- public string Value { get; set; }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- internal class Node
|
|
|
|
|
- {
|
|
|
|
|
- public Node()
|
|
|
|
|
- {
|
|
|
|
|
- Children = new PerspexList<Node>();
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- public string Name { get; set; }
|
|
|
|
|
- public PerspexList<Node> Children { get; set; }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
internal class Program
|
|
internal class Program
|
|
|
{
|
|
{
|
|
|
private static void Main()
|
|
private static void Main()
|
|
@@ -38,18 +21,9 @@ namespace XamlTestApplication
|
|
|
|
|
|
|
|
App application = new App
|
|
App application = new App
|
|
|
{
|
|
{
|
|
|
- DataTemplates = new DataTemplates
|
|
|
|
|
- {
|
|
|
|
|
- new TreeDataTemplate<Node>(
|
|
|
|
|
- x => new TextBlock { Text = x.Name },
|
|
|
|
|
- x => x.Children,
|
|
|
|
|
- x => true),
|
|
|
|
|
- },
|
|
|
|
|
- };
|
|
|
|
|
-
|
|
|
|
|
- var testCommand = ReactiveCommand.Create();
|
|
|
|
|
- testCommand.Subscribe(_ => Debug.WriteLine("Test command executed."));
|
|
|
|
|
|
|
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
var window = new MainWindow();
|
|
var window = new MainWindow();
|
|
|
window.Show();
|
|
window.Show();
|
|
|
Application.Current.Run(window);
|
|
Application.Current.Run(window);
|