Skip to content

Commit f9f2715

Browse files
Sample for populating child nodes in uwp treegrid included.
1 parent 00ae263 commit f9f2715

24 files changed

+16866
-1
lines changed

App.xaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<Application
2+
x:Class="OnDemandLoading.App"
3+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
4+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5+
xmlns:local="using:OnDemandLoading"
6+
RequestedTheme="Light">
7+
8+
</Application>

App.xaml.cs

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.IO;
4+
using System.Linq;
5+
using System.Runtime.InteropServices.WindowsRuntime;
6+
using Windows.ApplicationModel;
7+
using Windows.ApplicationModel.Activation;
8+
using Windows.Foundation;
9+
using Windows.Foundation.Collections;
10+
using Windows.UI.Xaml;
11+
using Windows.UI.Xaml.Controls;
12+
using Windows.UI.Xaml.Controls.Primitives;
13+
using Windows.UI.Xaml.Data;
14+
using Windows.UI.Xaml.Input;
15+
using Windows.UI.Xaml.Media;
16+
using Windows.UI.Xaml.Navigation;
17+
18+
namespace OnDemandLoading
19+
{
20+
/// <summary>
21+
/// Provides application-specific behavior to supplement the default Application class.
22+
/// </summary>
23+
sealed partial class App : Application
24+
{
25+
/// <summary>
26+
/// Initializes the singleton application object. This is the first line of authored code
27+
/// executed, and as such is the logical equivalent of main() or WinMain().
28+
/// </summary>
29+
public App()
30+
{
31+
this.InitializeComponent();
32+
this.Suspending += OnSuspending;
33+
}
34+
35+
/// <summary>
36+
/// Invoked when the application is launched normally by the end user. Other entry points
37+
/// will be used such as when the application is launched to open a specific file.
38+
/// </summary>
39+
/// <param name="e">Details about the launch request and process.</param>
40+
protected override void OnLaunched(LaunchActivatedEventArgs e)
41+
{
42+
#if DEBUG
43+
if (System.Diagnostics.Debugger.IsAttached)
44+
{
45+
//this.DebugSettings.EnableFrameRateCounter = true;
46+
}
47+
#endif
48+
Frame rootFrame = Window.Current.Content as Frame;
49+
50+
// Do not repeat app initialization when the Window already has content,
51+
// just ensure that the window is active
52+
if (rootFrame == null)
53+
{
54+
// Create a Frame to act as the navigation context and navigate to the first page
55+
rootFrame = new Frame();
56+
57+
rootFrame.NavigationFailed += OnNavigationFailed;
58+
59+
if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
60+
{
61+
//TODO: Load state from previously suspended application
62+
}
63+
64+
// Place the frame in the current Window
65+
Window.Current.Content = rootFrame;
66+
}
67+
68+
if (e.PrelaunchActivated == false)
69+
{
70+
if (rootFrame.Content == null)
71+
{
72+
// When the navigation stack isn't restored navigate to the first page,
73+
// configuring the new page by passing required information as a navigation
74+
// parameter
75+
rootFrame.Navigate(typeof(MainPage), e.Arguments);
76+
}
77+
// Ensure the current window is active
78+
Window.Current.Activate();
79+
}
80+
}
81+
82+
/// <summary>
83+
/// Invoked when Navigation to a certain page fails
84+
/// </summary>
85+
/// <param name="sender">The Frame which failed navigation</param>
86+
/// <param name="e">Details about the navigation failure</param>
87+
void OnNavigationFailed(object sender, NavigationFailedEventArgs e)
88+
{
89+
throw new Exception("Failed to load Page " + e.SourcePageType.FullName);
90+
}
91+
92+
/// <summary>
93+
/// Invoked when application execution is being suspended. Application state is saved
94+
/// without knowing whether the application will be terminated or resumed with the contents
95+
/// of memory still intact.
96+
/// </summary>
97+
/// <param name="sender">The source of the suspend request.</param>
98+
/// <param name="e">Details about the suspend request.</param>
99+
private void OnSuspending(object sender, SuspendingEventArgs e)
100+
{
101+
var deferral = e.SuspendingOperation.GetDeferral();
102+
//TODO: Save application state and stop any background activity
103+
deferral.Complete();
104+
}
105+
}
106+
}

App1.csproj

Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
7+
<ProjectGuid>{799887C7-4BD5-42B2-B938-08A26A4DB827}</ProjectGuid>
8+
<OutputType>AppContainerExe</OutputType>
9+
<AppDesignerFolder>Properties</AppDesignerFolder>
10+
<RootNamespace>OnDemandLoading</RootNamespace>
11+
<AssemblyName>OnDemandLoading</AssemblyName>
12+
<DefaultLanguage>en-US</DefaultLanguage>
13+
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
14+
<TargetPlatformVersion>10.0.14393.0</TargetPlatformVersion>
15+
<TargetPlatformMinVersion>10.0.10586.0</TargetPlatformMinVersion>
16+
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
17+
<FileAlignment>512</FileAlignment>
18+
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
19+
<PackageCertificateKeyFile>App1_TemporaryKey.pfx</PackageCertificateKeyFile>
20+
</PropertyGroup>
21+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
22+
<DebugSymbols>true</DebugSymbols>
23+
<OutputPath>bin\x86\Debug\</OutputPath>
24+
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
25+
<NoWarn>;2008</NoWarn>
26+
<DebugType>full</DebugType>
27+
<PlatformTarget>x86</PlatformTarget>
28+
<UseVSHostingProcess>false</UseVSHostingProcess>
29+
<ErrorReport>prompt</ErrorReport>
30+
<Prefer32Bit>true</Prefer32Bit>
31+
</PropertyGroup>
32+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
33+
<OutputPath>bin\x86\Release\</OutputPath>
34+
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
35+
<Optimize>true</Optimize>
36+
<NoWarn>;2008</NoWarn>
37+
<DebugType>pdbonly</DebugType>
38+
<PlatformTarget>x86</PlatformTarget>
39+
<UseVSHostingProcess>false</UseVSHostingProcess>
40+
<ErrorReport>prompt</ErrorReport>
41+
<Prefer32Bit>true</Prefer32Bit>
42+
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
43+
</PropertyGroup>
44+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM'">
45+
<DebugSymbols>true</DebugSymbols>
46+
<OutputPath>bin\ARM\Debug\</OutputPath>
47+
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
48+
<NoWarn>;2008</NoWarn>
49+
<DebugType>full</DebugType>
50+
<PlatformTarget>ARM</PlatformTarget>
51+
<UseVSHostingProcess>false</UseVSHostingProcess>
52+
<ErrorReport>prompt</ErrorReport>
53+
<Prefer32Bit>true</Prefer32Bit>
54+
</PropertyGroup>
55+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM'">
56+
<OutputPath>bin\ARM\Release\</OutputPath>
57+
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
58+
<Optimize>true</Optimize>
59+
<NoWarn>;2008</NoWarn>
60+
<DebugType>pdbonly</DebugType>
61+
<PlatformTarget>ARM</PlatformTarget>
62+
<UseVSHostingProcess>false</UseVSHostingProcess>
63+
<ErrorReport>prompt</ErrorReport>
64+
<Prefer32Bit>true</Prefer32Bit>
65+
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
66+
</PropertyGroup>
67+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
68+
<DebugSymbols>true</DebugSymbols>
69+
<OutputPath>bin\x64\Debug\</OutputPath>
70+
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
71+
<NoWarn>;2008</NoWarn>
72+
<DebugType>full</DebugType>
73+
<PlatformTarget>x64</PlatformTarget>
74+
<UseVSHostingProcess>false</UseVSHostingProcess>
75+
<ErrorReport>prompt</ErrorReport>
76+
<Prefer32Bit>true</Prefer32Bit>
77+
</PropertyGroup>
78+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
79+
<OutputPath>bin\x64\Release\</OutputPath>
80+
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
81+
<Optimize>true</Optimize>
82+
<NoWarn>;2008</NoWarn>
83+
<DebugType>pdbonly</DebugType>
84+
<PlatformTarget>x64</PlatformTarget>
85+
<UseVSHostingProcess>false</UseVSHostingProcess>
86+
<ErrorReport>prompt</ErrorReport>
87+
<Prefer32Bit>true</Prefer32Bit>
88+
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
89+
</PropertyGroup>
90+
<ItemGroup>
91+
<!-- A reference to the entire .Net Framework and Windows SDK are automatically included -->
92+
<None Include="project.json" />
93+
</ItemGroup>
94+
<ItemGroup>
95+
<Compile Include="App.xaml.cs">
96+
<DependentUpon>App.xaml</DependentUpon>
97+
</Compile>
98+
<Compile Include="MainPage.xaml.cs">
99+
<DependentUpon>MainPage.xaml</DependentUpon>
100+
</Compile>
101+
<Compile Include="Model.cs" />
102+
<Compile Include="Properties\AssemblyInfo.cs" />
103+
<Compile Include="ViewModel.cs" />
104+
</ItemGroup>
105+
<ItemGroup>
106+
<AppxManifest Include="Package.appxmanifest">
107+
<SubType>Designer</SubType>
108+
</AppxManifest>
109+
<None Include="App1_TemporaryKey.pfx" />
110+
</ItemGroup>
111+
<ItemGroup>
112+
<Content Include="Properties\Default.rd.xml" />
113+
<Content Include="Assets\LockScreenLogo.scale-200.png" />
114+
<Content Include="Assets\SplashScreen.scale-200.png" />
115+
<Content Include="Assets\Square150x150Logo.scale-200.png" />
116+
<Content Include="Assets\Square44x44Logo.scale-200.png" />
117+
<Content Include="Assets\Square44x44Logo.targetsize-24_altform-unplated.png" />
118+
<Content Include="Assets\StoreLogo.png" />
119+
<Content Include="Assets\Wide310x150Logo.scale-200.png" />
120+
</ItemGroup>
121+
<ItemGroup>
122+
<ApplicationDefinition Include="App.xaml">
123+
<Generator>MSBuild:Compile</Generator>
124+
<SubType>Designer</SubType>
125+
</ApplicationDefinition>
126+
<Page Include="MainPage.xaml">
127+
<Generator>MSBuild:Compile</Generator>
128+
<SubType>Designer</SubType>
129+
</Page>
130+
</ItemGroup>
131+
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
132+
<VisualStudioVersion>14.0</VisualStudioVersion>
133+
</PropertyGroup>
134+
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
135+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
136+
Other similar extension points exist, see Microsoft.Common.targets.
137+
<Target Name="BeforeBuild">
138+
</Target>
139+
<Target Name="AfterBuild">
140+
</Target>
141+
-->
142+
</Project>

App1.csproj.user

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM'">
4+
<DeviceId>30F105C9-681E-420b-A277-7C086EAD8A4E</DeviceId>
5+
<UseEmulator>true</UseEmulator>
6+
</PropertyGroup>
7+
<PropertyGroup>
8+
<ReferencePath>
9+
</ReferencePath>
10+
</PropertyGroup>
11+
</Project>

App1.sln

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 14
4+
VisualStudioVersion = 14.0.25420.1
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "App1", "App1.csproj", "{799887C7-4BD5-42B2-B938-08A26A4DB827}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Debug|ARM = Debug|ARM
12+
Debug|x64 = Debug|x64
13+
Debug|x86 = Debug|x86
14+
Release|Any CPU = Release|Any CPU
15+
Release|ARM = Release|ARM
16+
Release|x64 = Release|x64
17+
Release|x86 = Release|x86
18+
Release-Xml|Any CPU = Release-Xml|Any CPU
19+
Release-Xml|ARM = Release-Xml|ARM
20+
Release-Xml|x64 = Release-Xml|x64
21+
Release-Xml|x86 = Release-Xml|x86
22+
EndGlobalSection
23+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
24+
{799887C7-4BD5-42B2-B938-08A26A4DB827}.Debug|Any CPU.ActiveCfg = Debug|x86
25+
{799887C7-4BD5-42B2-B938-08A26A4DB827}.Debug|ARM.ActiveCfg = Debug|ARM
26+
{799887C7-4BD5-42B2-B938-08A26A4DB827}.Debug|ARM.Build.0 = Debug|ARM
27+
{799887C7-4BD5-42B2-B938-08A26A4DB827}.Debug|ARM.Deploy.0 = Debug|ARM
28+
{799887C7-4BD5-42B2-B938-08A26A4DB827}.Debug|x64.ActiveCfg = Debug|x64
29+
{799887C7-4BD5-42B2-B938-08A26A4DB827}.Debug|x64.Build.0 = Debug|x64
30+
{799887C7-4BD5-42B2-B938-08A26A4DB827}.Debug|x64.Deploy.0 = Debug|x64
31+
{799887C7-4BD5-42B2-B938-08A26A4DB827}.Debug|x86.ActiveCfg = Debug|x86
32+
{799887C7-4BD5-42B2-B938-08A26A4DB827}.Debug|x86.Build.0 = Debug|x86
33+
{799887C7-4BD5-42B2-B938-08A26A4DB827}.Debug|x86.Deploy.0 = Debug|x86
34+
{799887C7-4BD5-42B2-B938-08A26A4DB827}.Release|Any CPU.ActiveCfg = Release|x86
35+
{799887C7-4BD5-42B2-B938-08A26A4DB827}.Release|ARM.ActiveCfg = Release|ARM
36+
{799887C7-4BD5-42B2-B938-08A26A4DB827}.Release|ARM.Build.0 = Release|ARM
37+
{799887C7-4BD5-42B2-B938-08A26A4DB827}.Release|ARM.Deploy.0 = Release|ARM
38+
{799887C7-4BD5-42B2-B938-08A26A4DB827}.Release|x64.ActiveCfg = Release|x64
39+
{799887C7-4BD5-42B2-B938-08A26A4DB827}.Release|x64.Build.0 = Release|x64
40+
{799887C7-4BD5-42B2-B938-08A26A4DB827}.Release|x64.Deploy.0 = Release|x64
41+
{799887C7-4BD5-42B2-B938-08A26A4DB827}.Release|x86.ActiveCfg = Release|x86
42+
{799887C7-4BD5-42B2-B938-08A26A4DB827}.Release|x86.Build.0 = Release|x86
43+
{799887C7-4BD5-42B2-B938-08A26A4DB827}.Release|x86.Deploy.0 = Release|x86
44+
{799887C7-4BD5-42B2-B938-08A26A4DB827}.Release-Xml|Any CPU.ActiveCfg = Release|x86
45+
{799887C7-4BD5-42B2-B938-08A26A4DB827}.Release-Xml|Any CPU.Build.0 = Release|x86
46+
{799887C7-4BD5-42B2-B938-08A26A4DB827}.Release-Xml|Any CPU.Deploy.0 = Release|x86
47+
{799887C7-4BD5-42B2-B938-08A26A4DB827}.Release-Xml|ARM.ActiveCfg = Release|ARM
48+
{799887C7-4BD5-42B2-B938-08A26A4DB827}.Release-Xml|ARM.Build.0 = Release|ARM
49+
{799887C7-4BD5-42B2-B938-08A26A4DB827}.Release-Xml|ARM.Deploy.0 = Release|ARM
50+
{799887C7-4BD5-42B2-B938-08A26A4DB827}.Release-Xml|x64.ActiveCfg = Release|x64
51+
{799887C7-4BD5-42B2-B938-08A26A4DB827}.Release-Xml|x64.Build.0 = Release|x64
52+
{799887C7-4BD5-42B2-B938-08A26A4DB827}.Release-Xml|x64.Deploy.0 = Release|x64
53+
{799887C7-4BD5-42B2-B938-08A26A4DB827}.Release-Xml|x86.ActiveCfg = Release|x86
54+
{799887C7-4BD5-42B2-B938-08A26A4DB827}.Release-Xml|x86.Build.0 = Release|x86
55+
{799887C7-4BD5-42B2-B938-08A26A4DB827}.Release-Xml|x86.Deploy.0 = Release|x86
56+
EndGlobalSection
57+
GlobalSection(SolutionProperties) = preSolution
58+
HideSolutionNode = FALSE
59+
EndGlobalSection
60+
EndGlobal

App1Error2018-08-28.log

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
2+
3+
Date:2018-08-28 11:52:51,319
4+
Thread:[1]
5+
Level:ERROR
6+
Logger:Microsoft.SyncfusionAssemblyReference.SyncfusionAssemblyReferencePackage [(null)]
7+
Message:System.NotImplementedException: Not implemented (Exception from HRESULT: 0x80004001 (E_NOTIMPL))
8+
at EnvDTE.Project.get_FullName()
9+
at Microsoft.SyncfusionAssemblyReference.SyncfusionAssemblyReferencePackage.GetPlatformNames(String projectGuid)

App1_TemporaryKey.pfx

2.4 KB
Binary file not shown.
1.4 KB
Loading

Assets/SplashScreen.scale-200.png

7.52 KB
Loading
2.87 KB
Loading

0 commit comments

Comments
 (0)