PK
ZLх@хjЋ5 5 App.xamlяЛП
PK
%b=[щu: : App.xaml.csяЛПusing System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Windows;
namespace TreeViewTest
{
///
/// Interaction logic for App.xaml
///
public partial class App : Application
{
}
}
PK
tQ?:` CheckStateConverter.csяЛПusing System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Data;
using System.Windows.Automation;
namespace TreeViewTest
{
public class CheckStateConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
bool? result = (bool?)value;
if (result.HasValue)
{
return (bool)result ? ToggleState.On : ToggleState.Off;
}
else
{
return ToggleState.Indeterminate;
}
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
ToggleState state = (ToggleState)value;
if (state == ToggleState.On)
{
return true;
}
else if (state == ToggleState.Off)
{
return false;
}
else
return null;
}
}
}
PK
ы^ЖBEeЪ Ъ DataItem.csяЛПusing System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.ObjectModel;
using System.ComponentModel;
using Telerik.Windows.Controls;
using System.Windows.Automation;
using System.Collections;
using System.Diagnostics;
using Telerik.Windows;
namespace TreeViewTest
{
class DataItem : ViewModelBase
{
public DataItem()
{
this.Children = new ObservableCollection();
}
public int ID
{
get;
set;
}
private ToggleState state;
public ToggleState State
{
get { return state; }
set
{
state = value;
RaisePropertyChanged("State");
}
}
private bool isInEditMode;
public bool IsInEditMode
{
get { return this.isInEditMode; }
set
{
if (this.isInEditMode != value)
{
this.isInEditMode = value;
this.OnPropertyChanged("IsInEditMode");
}
}
}
private string name ;
public string Name
{
get { return name; }
set
{
name = value;
this.OnPropertyChanged("Name");
}
}
public ObservableCollection Children
{
get;
set;
}
private bool expanded;
public bool Expanded
{
get { return expanded; }
set
{
expanded = value;
RaisePropertyChanged("Expanded");
}
}
#region MyProperty (INotifyPropertyChanged Property)
private bool selected;
public bool Selected
{
get { return selected; }
set
{
selected = value;
Debug.WriteLine(value.ToString());
RaisePropertyChanged("Selected");
}
}
#endregion
private bool? loadondemand;
public bool? LoadOnDemand
{
get { return loadondemand; }
set
{
loadondemand = value;
RaisePropertyChanged("LoadOnDemand");
}
}
private bool isChecked;
public bool IsChecked
{
get { return isChecked; }
set
{
isChecked = value;
RaisePropertyChanged("IsChecked");
}
}
public event PropertyChangedEventHandler PropertyChanged;
protected void RaisePropertyChanged(string propertyName)
{
var handler = PropertyChanged;
if (handler != null)
{
handler(this, new PropertyChangedEventArgs(propertyName));
}
}
private bool isVisible;
public bool IsVisible
{
get { return this.isVisible; }
set
{
if (this.isVisible != value)
{
this.isVisible = value;
this.OnPropertyChanged("MyProperty");
}
}
}
}
}
PK
q\?ZQ[с с IDtoFontColor.csяЛПusing System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Data;
using System.Windows.Media;
namespace TreeViewTest
{
class IDtoFontColor : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
var val = value as int?;
if (val.HasValue)
{
if (val % 2 == 0)
{
return new SolidColorBrush() { Color = Colors.Blue };
}
else
return new SolidColorBrush() { Color = Colors.Red };
}
return new SolidColorBrush() { Color = Colors.Black};
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
throw new NotImplementedException();
}
}
}
PK
C`ЖBVfOP P MainWindow.xamlяЛП
PK
L`ЖBqfx MainWindow.xaml.csяЛПusing System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Windows.Automation;
using Telerik.Windows.Controls;
using Telerik.Windows.Controls.DragDrop;
using Telerik.Windows.Controls.TreeView;
using Telerik.Windows.DragDrop;
using System.Windows.Controls;
using System.ComponentModel;
namespace TreeViewTest
{
///
/// Interaction logic for MainWindow.xaml
///
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
this.Bind();
}
private void Bind()
{
ObservableCollection root = new ObservableCollection();
for (int i = 0; i < 5; i++)
{
DataItem item = new DataItem(){Name = "name" + i};
for (int j = 0; j < 3; j++)
{
DataItem child = new DataItem(){Name = "Child" + j};
child.IsVisible = j % 2 == 0;
item.Children.Add(child);
}
item.IsVisible = i % 2 != 0;
root.Add(item);
}
this.treeView.ItemsSource = root;
}
}
}
PK
v^ЖB Properties/PK
%b= Ч Properties/AssemblyInfo.csяЛПusing System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Windows;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("TreeViewTest")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("TreeViewTest")]
[assembly: AssemblyCopyright("Copyright ТЉ Microsoft 2010")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
//In order to begin building localizable applications, set
//CultureYouAreCodingWith in your .csproj file
//inside a . For example, if you are using US english
//in your source files, set the to en-US. Then uncomment
//the NeutralResourceLanguage attribute below. Update the "en-US" in
//the line below to match the UICulture setting in the project file.
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
PK
%b=ё_Ф" " Properties/Resources.Designer.csяЛП//------------------------------------------------------------------------------
//
// This code was generated by a tool.
// Runtime Version:4.0.30319.1
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
//------------------------------------------------------------------------------
namespace TreeViewTest.Properties
{
///
/// A strongly-typed resource class, for looking up localized strings, etc.
///
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources
{
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources()
{
}
///
/// Returns the cached ResourceManager instance used by this class.
///
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get
{
if ((resourceMan == null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("TreeViewTest.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
///
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
///
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
return resourceCulture;
}
set
{
resourceCulture = value;
}
}
}
}
PK
%b=Ztvь ь Properties/Resources.resxяЛП
text/microsoft-resx
2.0
System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
PK
%b=ZеoG G Properties/Settings.Designer.csяЛП//------------------------------------------------------------------------------
//
// This code was generated by a tool.
// Runtime Version:4.0.30319.1
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
//------------------------------------------------------------------------------
namespace TreeViewTest.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
{
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get
{
return defaultInstance;
}
}
}
}
PK
%b=кЅѕ!Щ Щ Properties/Settings.settingsяЛП
PK
s!?еІ_ЉЮ Ю ToogleToBoolConverter.csяЛПusing System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Data;
using System.Windows.Automation;
namespace TreeViewTest
{
class ToogleToBoolConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
var state = value as ToggleState?;
if (state != null)
{
if (state == ToggleState.On)
{
return true;
}
else if(state == ToggleState.Off)
{
return false;
}
}
return null;
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
throw new NotImplementedException();
}
}
}
PK
Q,Auzщ щ TreeViewModel.csяЛПusing System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.ObjectModel;
using Telerik.Windows.Controls;
namespace TreeViewTest
{
class TreeViewModel
{
public TreeViewModel()
{
this.RootCollection = new ObservableCollection();
}
public ObservableCollection RootCollection
{
get;
set;
}
}
}
PK
^ЖBсХ|З< < TreeViewTest.csprojяЛП
Debug
x86
8.0.30703
2.0
{67F8AC73-BEDE-49A2-A927-9B7E6F7EEF8A}
WinExe
Properties
TreeViewTest
TreeViewTest
v4.0
Client
512
{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
4
x86
true
full
false
bin\Debug\
DEBUG;TRACE
prompt
4
x86
pdbonly
true
bin\Release\
TRACE
prompt
4
4.0
False
..\..\..\Binaries\2013_Q1\RadControls_for_WPF_2013_1_0220_Trial_hotfix\Binaries\WPF40\Telerik.Windows.Controls.dll
False
..\..\..\Binaries\2013_Q1\RadControls_for_WPF_2013_1_0220_Trial_hotfix\Binaries\WPF40\Telerik.Windows.Controls.Input.dll
False
..\..\..\Binaries\2013_Q1\RadControls_for_WPF_2013_1_0220_Trial_hotfix\Binaries\WPF40\Telerik.Windows.Controls.Navigation.dll
False
..\..\..\Binaries\2013_Q1\RadControls_for_WPF_2013_1_0220_Trial_hotfix\Binaries\WPF40\Telerik.Windows.Data.dll
MSBuild:Compile
Designer
MSBuild:Compile
Designer
App.xaml
Code
MainWindow.xaml
Code
Code
True
True
Resources.resx
True
Settings.settings
True
ResXFileCodeGenerator
Resources.Designer.cs
SettingsSingleFileGenerator
Settings.Designer.cs
PK
w>лу у TreeViewTest.csproj.userяЛП
ShowAllFiles
PK
rЫ@їFZ§a a TreeViewTest.slnяЛП
Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TreeViewTest", "TreeViewTest.csproj", "{67F8AC73-BEDE-49A2-A927-9B7E6F7EEF8A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x86 = Debug|x86
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{67F8AC73-BEDE-49A2-A927-9B7E6F7EEF8A}.Debug|x86.ActiveCfg = Debug|x86
{67F8AC73-BEDE-49A2-A927-9B7E6F7EEF8A}.Debug|x86.Build.0 = Debug|x86
{67F8AC73-BEDE-49A2-A927-9B7E6F7EEF8A}.Release|x86.ActiveCfg = Release|x86
{67F8AC73-BEDE-49A2-A927-9B7E6F7EEF8A}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
PK
зT,A
ї И И TreeViewTest.suoаЯрЁБс > ўџ ўџџџ џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ§џџџ #
D ! " $ &