forked from microsoft/microsoft-ui-xaml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTreeViewTestPage.xaml.h
53 lines (42 loc) · 1.66 KB
/
TreeViewTestPage.xaml.h
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
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.
#pragma once
#include "TreeViewTestPage.g.h"
namespace TestAppCX
{
public ref class TreeViewData sealed
{
private:
Platform::String^ m_content;
Windows::Foundation::Collections::IObservableVector<TreeViewData^>^ m_children;
public:
TreeViewData(Platform::String^ content) : m_content(content)
{
m_content = content;
m_children = ref new Platform::Collections::Vector<TreeViewData^>();
}
property Platform::String^ Content
{
Platform::String^ get() { return m_content; }
}
property Windows::Foundation::Collections::IObservableVector<TreeViewData^>^ Children
{
Windows::Foundation::Collections::IObservableVector<TreeViewData^>^ get() { return m_children; }
}
};
[Windows::Foundation::Metadata::WebHostHidden]
public ref class TreeViewTestPage sealed
{
private:
Windows::Foundation::Collections::IObservableVector<TreeViewData^>^ m_items = ref new Platform::Collections::Vector<TreeViewData^>();
public:
property Windows::Foundation::Collections::IObservableVector<TreeViewData^>^ Items
{
Windows::Foundation::Collections::IObservableVector<TreeViewData^>^ get() { return m_items; }
}
TreeViewTestPage();
private:
void ReplaceAll_Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
void Clear_Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
};
}