Skip to content

Commit 5495af1

Browse files
author
saravanan.ayyanar
committed
How to populate nodes with binding to a data in wpf treeview
1 parent f198ae5 commit 5495af1

37 files changed

+1491
-0
lines changed

DataBinding_BoundMode/App.config

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<startup>
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
5+
</startup>
6+
</configuration>

DataBinding_BoundMode/App.ico

4.19 KB
Binary file not shown.

DataBinding_BoundMode/App.xaml

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

DataBinding_BoundMode/App.xaml.cs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Configuration;
4+
using System.Data;
5+
using System.Linq;
6+
using System.Threading.Tasks;
7+
using System.Windows;
8+
9+
namespace GettingStarted_BoundMode
10+
{
11+
/// <summary>
12+
/// Interaction logic for App.xaml
13+
/// </summary>
14+
public partial class App : Application
15+
{
16+
}
17+
}
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="15.0" 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)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{3232F258-6D7D-4A21-97FC-927538C89991}</ProjectGuid>
8+
<OutputType>WinExe</OutputType>
9+
<RootNamespace>NodeWithImageDemo</RootNamespace>
10+
<AssemblyName>NodeWithImageDemo</AssemblyName>
11+
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
12+
<FileAlignment>512</FileAlignment>
13+
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
14+
<WarningLevel>4</WarningLevel>
15+
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
16+
<Deterministic>true</Deterministic>
17+
<TargetFrameworkProfile />
18+
</PropertyGroup>
19+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
20+
<PlatformTarget>AnyCPU</PlatformTarget>
21+
<DebugSymbols>true</DebugSymbols>
22+
<DebugType>full</DebugType>
23+
<Optimize>false</Optimize>
24+
<OutputPath>bin\Debug\</OutputPath>
25+
<DefineConstants>DEBUG;TRACE</DefineConstants>
26+
<ErrorReport>prompt</ErrorReport>
27+
<WarningLevel>4</WarningLevel>
28+
</PropertyGroup>
29+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
30+
<PlatformTarget>AnyCPU</PlatformTarget>
31+
<DebugType>pdbonly</DebugType>
32+
<Optimize>true</Optimize>
33+
<OutputPath>bin\Release\</OutputPath>
34+
<DefineConstants>TRACE</DefineConstants>
35+
<ErrorReport>prompt</ErrorReport>
36+
<WarningLevel>4</WarningLevel>
37+
</PropertyGroup>
38+
<ItemGroup>
39+
<Reference Include="Syncfusion.SfGridCommon.WPF">
40+
</Reference>
41+
<Reference Include="Syncfusion.SfProgressBar.WPF">
42+
</Reference>
43+
<Reference Include="Syncfusion.SfTreeView.WPF">
44+
</Reference>
45+
<Reference Include="System" />
46+
<Reference Include="System.Data" />
47+
<Reference Include="System.Xml" />
48+
<Reference Include="Microsoft.CSharp" />
49+
<Reference Include="System.Core" />
50+
<Reference Include="System.Xml.Linq" />
51+
<Reference Include="System.Data.DataSetExtensions" />
52+
<Reference Include="System.Net.Http" />
53+
<Reference Include="System.Xaml">
54+
<RequiredTargetFramework>4.0</RequiredTargetFramework>
55+
</Reference>
56+
<Reference Include="WindowsBase" />
57+
<Reference Include="PresentationCore" />
58+
<Reference Include="PresentationFramework" />
59+
</ItemGroup>
60+
<ItemGroup>
61+
<ApplicationDefinition Include="App.xaml">
62+
<Generator>MSBuild:Compile</Generator>
63+
<SubType>Designer</SubType>
64+
</ApplicationDefinition>
65+
<Page Include="MainWindow.xaml">
66+
<Generator>MSBuild:Compile</Generator>
67+
<SubType>Designer</SubType>
68+
</Page>
69+
<Compile Include="App.xaml.cs">
70+
<DependentUpon>App.xaml</DependentUpon>
71+
<SubType>Code</SubType>
72+
</Compile>
73+
<Compile Include="Model\FileManager.cs" />
74+
<Compile Include="ViewModel\FileManagerViewModel.cs" />
75+
<Compile Include="MainWindow.xaml.cs">
76+
<DependentUpon>MainWindow.xaml</DependentUpon>
77+
<SubType>Code</SubType>
78+
</Compile>
79+
</ItemGroup>
80+
<ItemGroup>
81+
<Compile Include="Model\Model.cs" />
82+
<Compile Include="Properties\AssemblyInfo.cs">
83+
<SubType>Code</SubType>
84+
</Compile>
85+
<Compile Include="Properties\Resources.Designer.cs">
86+
<AutoGen>True</AutoGen>
87+
<DesignTime>True</DesignTime>
88+
<DependentUpon>Resources.resx</DependentUpon>
89+
</Compile>
90+
<Compile Include="Properties\Settings.Designer.cs">
91+
<AutoGen>True</AutoGen>
92+
<DependentUpon>Settings.settings</DependentUpon>
93+
<DesignTimeSharedInput>True</DesignTimeSharedInput>
94+
</Compile>
95+
<EmbeddedResource Include="Properties\Resources.resx">
96+
<Generator>ResXFileCodeGenerator</Generator>
97+
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
98+
</EmbeddedResource>
99+
<None Include="Properties\Settings.settings">
100+
<Generator>SettingsSingleFileGenerator</Generator>
101+
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
102+
</None>
103+
</ItemGroup>
104+
<ItemGroup>
105+
<None Include="App.config" />
106+
</ItemGroup>
107+
<ItemGroup>
108+
<Resource Include="Icons\treeview_exe.png" />
109+
<Resource Include="Icons\treeview_folder.png" />
110+
<Resource Include="Icons\treeview_img0.png" />
111+
<Resource Include="Icons\treeview_img1.png" />
112+
<Resource Include="Icons\treeview_mp3.png" />
113+
<Resource Include="Icons\treeview_pdf.png" />
114+
<Resource Include="Icons\treeview_png.png" />
115+
<Resource Include="Icons\treeview_ppt.png" />
116+
<Resource Include="Icons\treeview_video.png" />
117+
<Resource Include="Icons\treeview_word.png" />
118+
<Resource Include="Icons\treeview_zip.png" />
119+
</ItemGroup>
120+
<ItemGroup>
121+
<Resource Include="App.ico" />
122+
</ItemGroup>
123+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
124+
</Project>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 11.00
3+
# Visual Studio 2010
4+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GettingStarted_BoundMode_2010", "GettingStarted_BoundMode_2010.csproj", "{3232F258-6D7D-4A21-97FC-927538C89991}"
5+
EndProject
6+
Global
7+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
8+
Debug|Any CPU = Debug|Any CPU
9+
Release|Any CPU = Release|Any CPU
10+
EndGlobalSection
11+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
12+
{3232F258-6D7D-4A21-97FC-927538C89991}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
13+
{3232F258-6D7D-4A21-97FC-927538C89991}.Debug|Any CPU.Build.0 = Debug|Any CPU
14+
{3232F258-6D7D-4A21-97FC-927538C89991}.Release|Any CPU.ActiveCfg = Release|Any CPU
15+
{3232F258-6D7D-4A21-97FC-927538C89991}.Release|Any CPU.Build.0 = Release|Any CPU
16+
EndGlobalSection
17+
GlobalSection(SolutionProperties) = preSolution
18+
HideSolutionNode = FALSE
19+
EndGlobalSection
20+
EndGlobal
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="15.0" 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)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{3232F258-6D7D-4A21-97FC-927538C89991}</ProjectGuid>
8+
<OutputType>WinExe</OutputType>
9+
<RootNamespace>NodeWithImageDemo</RootNamespace>
10+
<AssemblyName>NodeWithImageDemo</AssemblyName>
11+
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
12+
<FileAlignment>512</FileAlignment>
13+
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
14+
<WarningLevel>4</WarningLevel>
15+
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
16+
<Deterministic>true</Deterministic>
17+
<TargetFrameworkProfile />
18+
</PropertyGroup>
19+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
20+
<PlatformTarget>AnyCPU</PlatformTarget>
21+
<DebugSymbols>true</DebugSymbols>
22+
<DebugType>full</DebugType>
23+
<Optimize>false</Optimize>
24+
<OutputPath>bin\Debug\</OutputPath>
25+
<DefineConstants>DEBUG;TRACE</DefineConstants>
26+
<ErrorReport>prompt</ErrorReport>
27+
<WarningLevel>4</WarningLevel>
28+
</PropertyGroup>
29+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
30+
<PlatformTarget>AnyCPU</PlatformTarget>
31+
<DebugType>pdbonly</DebugType>
32+
<Optimize>true</Optimize>
33+
<OutputPath>bin\Release\</OutputPath>
34+
<DefineConstants>TRACE</DefineConstants>
35+
<ErrorReport>prompt</ErrorReport>
36+
<WarningLevel>4</WarningLevel>
37+
</PropertyGroup>
38+
<ItemGroup>
39+
<Reference Include="Syncfusion.SfGridCommon.WPF">
40+
</Reference>
41+
<Reference Include="Syncfusion.SfProgressBar.WPF">
42+
</Reference>
43+
<Reference Include="Syncfusion.SfTreeView.WPF">
44+
</Reference>
45+
<Reference Include="System" />
46+
<Reference Include="System.Data" />
47+
<Reference Include="System.Xml" />
48+
<Reference Include="Microsoft.CSharp" />
49+
<Reference Include="System.Core" />
50+
<Reference Include="System.Xml.Linq" />
51+
<Reference Include="System.Data.DataSetExtensions" />
52+
<Reference Include="System.Net.Http" />
53+
<Reference Include="System.Xaml">
54+
<RequiredTargetFramework>4.0</RequiredTargetFramework>
55+
</Reference>
56+
<Reference Include="WindowsBase" />
57+
<Reference Include="PresentationCore" />
58+
<Reference Include="PresentationFramework" />
59+
</ItemGroup>
60+
<ItemGroup>
61+
<ApplicationDefinition Include="App.xaml">
62+
<Generator>MSBuild:Compile</Generator>
63+
<SubType>Designer</SubType>
64+
</ApplicationDefinition>
65+
<Page Include="MainWindow.xaml">
66+
<Generator>MSBuild:Compile</Generator>
67+
<SubType>Designer</SubType>
68+
</Page>
69+
<Compile Include="App.xaml.cs">
70+
<DependentUpon>App.xaml</DependentUpon>
71+
<SubType>Code</SubType>
72+
</Compile>
73+
<Compile Include="Model\FileManager.cs" />
74+
<Compile Include="ViewModel\FileManagerViewModel.cs" />
75+
<Compile Include="MainWindow.xaml.cs">
76+
<DependentUpon>MainWindow.xaml</DependentUpon>
77+
<SubType>Code</SubType>
78+
</Compile>
79+
</ItemGroup>
80+
<ItemGroup>
81+
<Compile Include="Model\Model.cs" />
82+
<Compile Include="Properties\AssemblyInfo.cs">
83+
<SubType>Code</SubType>
84+
</Compile>
85+
<Compile Include="Properties\Resources.Designer.cs">
86+
<AutoGen>True</AutoGen>
87+
<DesignTime>True</DesignTime>
88+
<DependentUpon>Resources.resx</DependentUpon>
89+
</Compile>
90+
<Compile Include="Properties\Settings.Designer.cs">
91+
<AutoGen>True</AutoGen>
92+
<DependentUpon>Settings.settings</DependentUpon>
93+
<DesignTimeSharedInput>True</DesignTimeSharedInput>
94+
</Compile>
95+
<EmbeddedResource Include="Properties\Resources.resx">
96+
<Generator>ResXFileCodeGenerator</Generator>
97+
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
98+
</EmbeddedResource>
99+
<None Include="Properties\Settings.settings">
100+
<Generator>SettingsSingleFileGenerator</Generator>
101+
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
102+
</None>
103+
</ItemGroup>
104+
<ItemGroup>
105+
<None Include="App.config" />
106+
</ItemGroup>
107+
<ItemGroup>
108+
<Resource Include="Icons\treeview_exe.png" />
109+
<Resource Include="Icons\treeview_folder.png" />
110+
<Resource Include="Icons\treeview_img0.png" />
111+
<Resource Include="Icons\treeview_img1.png" />
112+
<Resource Include="Icons\treeview_mp3.png" />
113+
<Resource Include="Icons\treeview_pdf.png" />
114+
<Resource Include="Icons\treeview_png.png" />
115+
<Resource Include="Icons\treeview_ppt.png" />
116+
<Resource Include="Icons\treeview_video.png" />
117+
<Resource Include="Icons\treeview_word.png" />
118+
<Resource Include="Icons\treeview_zip.png" />
119+
</ItemGroup>
120+
<ItemGroup>
121+
<Resource Include="App.ico" />
122+
</ItemGroup>
123+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
124+
</Project>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 2012
4+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GettingStarted_BoundMode_2012", "GettingStarted_BoundMode_2012.csproj", "{3232F258-6D7D-4A21-97FC-927538C89991}"
5+
EndProject
6+
Global
7+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
8+
Debug|Any CPU = Debug|Any CPU
9+
Release|Any CPU = Release|Any CPU
10+
EndGlobalSection
11+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
12+
{3232F258-6D7D-4A21-97FC-927538C89991}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
13+
{3232F258-6D7D-4A21-97FC-927538C89991}.Debug|Any CPU.Build.0 = Debug|Any CPU
14+
{3232F258-6D7D-4A21-97FC-927538C89991}.Release|Any CPU.ActiveCfg = Release|Any CPU
15+
{3232F258-6D7D-4A21-97FC-927538C89991}.Release|Any CPU.Build.0 = Release|Any CPU
16+
EndGlobalSection
17+
GlobalSection(SolutionProperties) = preSolution
18+
HideSolutionNode = FALSE
19+
EndGlobalSection
20+
EndGlobal

0 commit comments

Comments
 (0)