PK
.WBy@λ
App.config
PK
.WB O O App.xaml
PK
.WBU^S S App.xaml.csusing System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
namespace DiagramMVVM_UserControls
{
///
/// Interaction logic for App.xaml
///
public partial class App : Application
{
}
}
PK
ZB
#
# DiagramMVVM_UserControls.csproj
Debug
AnyCPU
{E001C8DF-EE53-4142-820E-897A9B485FA3}
WinExe
Properties
DiagramMVVM_UserControls
DiagramMVVM_UserControls
v4.5
512
{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
4
AnyCPU
true
full
false
bin\Debug\
DEBUG;TRACE
prompt
4
AnyCPU
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.Data.dll
False
..\..\Binaries\2013_Q1\RadControls_for_WPF_2013_1_0220_Trial_hotfix\Binaries\WPF40\Telerik.Windows.Controls.Diagrams.dll
False
..\..\Binaries\2013_Q1\RadControls_for_WPF_2013_1_0220_Trial_hotfix\Binaries\WPF40\Telerik.Windows.Controls.Diagrams.Extensions.dll
False
..\..\Binaries\2013_Q1\RadControls_for_WPF_2013_1_0220_Trial_hotfix\Binaries\WPF40\Telerik.Windows.Controls.GridView.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
False
..\..\Binaries\2013_Q1\RadControls_for_WPF_2013_1_0220_Trial_hotfix\Binaries\WPF40\Telerik.Windows.Diagrams.Core.dll
MSBuild:Compile
Designer
GridViewUserControl.xaml
ProgressBarUserControl.xaml
TreeViewUserControl.xaml
MSBuild:Compile
Designer
App.xaml
Code
MainWindow.xaml
Code
Designer
MSBuild:Compile
Designer
MSBuild:Compile
Designer
MSBuild:Compile
Code
True
True
Resources.resx
True
Settings.settings
True
ResXFileCodeGenerator
Resources.Designer.cs
SettingsSingleFileGenerator
Settings.Designer.cs
PK
.WBo DiagramMVVM_UserControls.sln
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DiagramMVVM_UserControls", "DiagramMVVM_UserControls.csproj", "{E001C8DF-EE53-4142-820E-897A9B485FA3}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{E001C8DF-EE53-4142-820E-897A9B485FA3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E001C8DF-EE53-4142-820E-897A9B485FA3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E001C8DF-EE53-4142-820E-897A9B485FA3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E001C8DF-EE53-4142-820E-897A9B485FA3}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
PK
]BU MainWindow.xaml
PK
0^B0 MainWindow.xaml.csusing System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
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 DiagramMVVM_UserControls.ViewModels;
using Telerik.Windows.Controls;
using Telerik.Windows.Controls.Diagrams.Extensions.ViewModels;
namespace DiagramMVVM_UserControls
{
///
/// Interaction logic for MainWindow.xaml
///
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
this.BindDiagram();
}
private void BindDiagram()
{
GraphSource source = new GraphSource();
GridViewViewModel gridModel = new GridViewViewModel(){Position = new Point(0, 200)};
gridModel.GridItems = new ObservableCollection(){"alpha", "beta", "gamma"};
TreeViewViewModel treeModel = new TreeViewViewModel() { Position = new Point(300, 50) };
treeModel.TreeItems = new ObservableCollection() { "tree item A", "tree item B", "tree item C", "tree item D" };
ProgressBarViewModel progressModel = new ProgressBarViewModel(){ Position = new Point(500, 100)};
source.AddNode(gridModel);
source.AddNode(treeModel);
source.AddNode(progressModel);
source.AddLink(new LinkViewModelBase(gridModel, treeModel));
source.AddLink(new LinkViewModelBase(treeModel, progressModel));
this.diagram.GraphSource = source;
}
private void diagram_ShapeDeserialized_1(object sender, Telerik.Windows.Controls.Diagrams.ShapeSerializationRoutedEventArgs e)
{
if (e.SerializationInfo["DataContextType"].ToString() == "ProgressBarViewModel")
{
(e.Shape as RadDiagramShape).DataContext = new ProgressBarViewModel();
(e.Shape as RadDiagramShape).ContentTemplate = this.rootGrid.Resources["progressBarTemplate"] as DataTemplate;
}
}
private void diagram_ShapeSerialized_1(object sender, Telerik.Windows.Controls.Diagrams.ShapeSerializationRoutedEventArgs e)
{
if ((e.Shape as RadDiagramShape).DataContext is ProgressBarViewModel)
{
e.SerializationInfo["DataContextType"] = "ProgressBarViewModel";
}
}
}
}
PK
.WB Properties/PK
.WBu% Properties/AssemblyInfo.csusing 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("DiagramMVVM_UserControls")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("DiagramMVVM_UserControls")]
[assembly: AssemblyCopyright("Copyright © Microsoft 2013")]
[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
.WB(-
Properties/Resources.Designer.cs//------------------------------------------------------------------------------
//
// This code was generated by a tool.
// Runtime Version:4.0.30319.17929
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
//------------------------------------------------------------------------------
namespace DiagramMVVM_UserControls.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("DiagramMVVM_UserControls.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
.WBZtv 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
.WBah Properties/Settings.Designer.cs//------------------------------------------------------------------------------
//
// This code was generated by a tool.
// Runtime Version:4.0.30319.17929
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
//------------------------------------------------------------------------------
namespace DiagramMVVM_UserControls.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.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
.WBڥ! Properties/Settings.settings
PK
BYB@8 8 ShapeTemplateSelector.csusing System;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using DiagramMVVM_UserControls.ViewModels;
namespace DiagramMVVM_UserControls
{
public class ShapeTemplateSelector : DataTemplateSelector
{
public override System.Windows.DataTemplate SelectTemplate(object item, System.Windows.DependencyObject container)
{
if (item is GridViewViewModel)
return this.GridViewTemplate;
else if (item is TreeViewViewModel)
return this.TreeViewTemplate;
else if (item is ProgressBarViewModel)
return this.ProgressBarTemplate;
return base.SelectTemplate(item, container);
}
public DataTemplate GridViewTemplate { get; set; }
public DataTemplate TreeViewTemplate { get; set; }
public DataTemplate ProgressBarTemplate { get; set; }
}
}
PK
XB ViewModels/PK
V]BG ViewModels/GraphSource.csusing System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Telerik.Windows.Controls.Diagrams.Extensions.ViewModels;
namespace DiagramMVVM_UserControls.ViewModels
{
public class GraphSource : ObservableGraphSourceBase>
{
public override void AddNode(NodeViewModelBase node)
{
base.AddNode(node);
}
}
}
PK
ZB9 ViewModels/GridViewViewModel.csusing System;
using System.Collections.ObjectModel;
using System.Linq;
using Telerik.Windows.Controls;
using Telerik.Windows.Controls.Diagrams.Extensions.ViewModels;
namespace DiagramMVVM_UserControls.ViewModels
{
public class GridViewViewModel : NodeViewModelBase
{
public GridViewViewModel()
{
this.GridItems = new ObservableCollection();
}
public ObservableCollection GridItems
{
get;
set;
}
}
}
PK
)^B6[V V " ViewModels/ProgressBarViewModel.csusing System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Telerik.Windows.Controls;
using Telerik.Windows.Controls.Diagrams.Extensions.ViewModels;
namespace DiagramMVVM_UserControls.ViewModels
{
public class ProgressBarViewModel : NodeViewModelBase
{
}
}
PK
XB4#-& & ViewModels/TreeViewViewModel.csusing System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Telerik.Windows.Controls;
using Telerik.Windows.Controls.Diagrams.Extensions.ViewModels;
namespace DiagramMVVM_UserControls.ViewModels
{
public class TreeViewViewModel : NodeViewModelBase
{
public TreeViewViewModel()
{
this.TreeItems = new ObservableCollection();
}
public ObservableCollection TreeItems
{
get;
set;
}
}
}
PK
3XB Views/PK
ZB Views/GridViewUserControl.xaml
PK
[WBҜ؎ ! Views/GridViewUserControl.xaml.csusing System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
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;
namespace DiagramMVVM_UserControls.Views
{
///
/// Interaction logic for GridViewUserControl.xaml
///
public partial class GridViewUserControl : UserControl
{
public GridViewUserControl()
{
InitializeComponent();
}
}
}
PK
%^BV#P P ! Views/ProgressBarUserControl.xaml
PK
3XB6_ $ Views/ProgressBarUserControl.xaml.csusing System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
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;
namespace DiagramMVVM_UserControls.Views
{
///
/// Interaction logic for ProgressBarUserControl.xaml
///
public partial class ProgressBarUserControl : UserControl
{
public ProgressBarUserControl()
{
InitializeComponent();
}
}
}
PK
m[B`Й Views/TreeViewUserControl.xaml
PK
tWB
G ! Views/TreeViewUserControl.xaml.csusing System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
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;
namespace DiagramMVVM_UserControls.Views
{
///
/// Interaction logic for TreeViewUserControl.xaml
///
public partial class TreeViewUserControl : UserControl
{
public TreeViewUserControl()
{
InitializeComponent();
}
}
}
PK
.WBy@λ
App.configPK
.WB O O App.xamlPK
.WBU^S S X App.xaml.csPK
ZB
#
# DiagramMVVM_UserControls.csprojPK
.WBo ' DiagramMVVM_UserControls.slnPK
]BU + MainWindow.xamlPK
0^B0 %4 MainWindow.xaml.csPK
.WB = Properties/PK
.WBu% > Properties/AssemblyInfo.csPK
.WB(-
YG Properties/Resources.Designer.csPK
.WBZtv yQ Properties/Resources.resxPK
.WBah g Properties/Settings.Designer.csPK
.WBڥ! k Properties/Settings.settingsPK
BYB@8 8 l ShapeTemplateSelector.csPK
XB Sp ViewModels/PK
V]BG |p ViewModels/GraphSource.csPK
ZB9 xr ViewModels/GridViewViewModel.csPK
)^B6[V V " t ViewModels/ProgressBarViewModel.csPK
XB4#-& & v ViewModels/TreeViewViewModel.csPK
3XB ~x Views/PK
ZB x Views/GridViewUserControl.xamlPK
[WBҜ؎ ! v{ Views/GridViewUserControl.xaml.csPK
%^BV#P P ! R~ Views/ProgressBarUserControl.xamlPK
3XB6_ $ Views/ProgressBarUserControl.xaml.csPK
m[B`Й Ʌ Views/TreeViewUserControl.xamlPK
tWB
G ! Views/TreeViewUserControl.xaml.csPK # z