11 changed files with 57 additions and 73 deletions
@ -1,52 +0,0 @@ |
|||
// Copyright (c) The Perspex Project. All rights reserved.
|
|||
// Licensed under the MIT license. See licence.md file in the project root for full license information.
|
|||
|
|||
using System.Collections.Generic; |
|||
using ReactiveUI; |
|||
|
|||
namespace XamlTestApplication |
|||
{ |
|||
public class MainViewModel : ReactiveObject |
|||
{ |
|||
private string _name; |
|||
|
|||
public MainViewModel() |
|||
{ |
|||
Name = "Jos\u00E9 Manuel"; |
|||
People = new List<Person> |
|||
{ |
|||
new Person("a little bit of Monica in my life"), |
|||
new Person("a little bit of Erica by my side"), |
|||
new Person("a little bit of Rita is all I need"), |
|||
new Person("a little bit of Tina is what I see"), |
|||
new Person("a little bit of Sandra in the sun"), |
|||
new Person("a little bit of Mary all night long"), |
|||
new Person("a little bit of Jessica here I am"), |
|||
}; |
|||
} |
|||
|
|||
public string Name |
|||
{ |
|||
get { return _name; } |
|||
set { this.RaiseAndSetIfChanged(ref _name, value); } |
|||
} |
|||
|
|||
public List<Person> People { get; set; } |
|||
} |
|||
|
|||
public class Person |
|||
{ |
|||
private string _name; |
|||
|
|||
public Person(string name) |
|||
{ |
|||
_name = name; |
|||
} |
|||
|
|||
public string Name |
|||
{ |
|||
get { return _name; } |
|||
set { _name = value; } |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,22 @@ |
|||
// Copyright (c) The Perspex Project. All rights reserved.
|
|||
// Licensed under the MIT license. See licence.md file in the project root for full license information.
|
|||
|
|||
using System.Collections.Generic; |
|||
|
|||
namespace XamlTestApplication.ViewModels |
|||
{ |
|||
public class MainWindowViewModel |
|||
{ |
|||
public MainWindowViewModel() |
|||
{ |
|||
Items = new List<TestItem>(); |
|||
|
|||
for (int i = 0; i < 10; ++i) |
|||
{ |
|||
Items.Add(new TestItem($"Item {i}", $"Item {i} Value")); |
|||
} |
|||
} |
|||
|
|||
public List<TestItem> Items { get; } |
|||
} |
|||
} |
|||
@ -0,0 +1,17 @@ |
|||
// Copyright (c) The Perspex Project. All rights reserved.
|
|||
// Licensed under the MIT license. See licence.md file in the project root for full license information.
|
|||
|
|||
namespace XamlTestApplication.ViewModels |
|||
{ |
|||
public class TestItem |
|||
{ |
|||
public TestItem(string header, string subheader) |
|||
{ |
|||
Header = header; |
|||
SubHeader = subheader; |
|||
} |
|||
|
|||
public string Header { get; } |
|||
public string SubHeader { get; } |
|||
} |
|||
} |
|||
@ -1 +1 @@ |
|||
Subproject commit 1461be589a5d39d378fd177648c61a780271c742 |
|||
Subproject commit 1aa1e5080b04ccf40baef4420ee29ffef9303811 |
|||
Loading…
Reference in new issue