PK
K
An2 2 App.xaml
PK
K
A App.xaml.csusing System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
namespace SilverlightApplication1
{
public partial class App : Application
{
public App()
{
this.Startup += this.Application_Startup;
this.Exit += this.Application_Exit;
this.UnhandledException += this.Application_UnhandledException;
InitializeComponent();
}
private void Application_Startup(object sender, StartupEventArgs e)
{
this.RootVisual = new MainPage();
}
private void Application_Exit(object sender, EventArgs e)
{
}
private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
{
// If the app is running outside of the debugger then report the exception using
// the browser's exception mechanism. On IE this will display it a yellow alert
// icon in the status bar and Firefox will display a script error.
if (!System.Diagnostics.Debugger.IsAttached)
{
// NOTE: This will allow the application to continue running after an exception has been thrown
// but not handled.
// For production applications this error handling should be replaced with something that will
// report the error to the website and stop the application.
e.Handled = true;
Deployment.Current.Dispatcher.BeginInvoke(delegate { ReportErrorToDOM(e); });
}
}
private void ReportErrorToDOM(ApplicationUnhandledExceptionEventArgs e)
{
try
{
string errorMsg = e.ExceptionObject.Message + e.ExceptionObject.StackTrace;
errorMsg = errorMsg.Replace('"', '\'').Replace("\r\n", @"\n");
System.Windows.Browser.HtmlPage.Window.Eval("throw new Error(\"Unhandled Error in Silverlight Application " + errorMsg + "\");");
}
catch (Exception)
{
}
}
}
}
PK
*S2BV CustomShape.csusing System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Telerik.Windows.Controls;
namespace SilverlightApplication1
{
public class CustomShape : RadDiagramShape
{
public CustomShape()
{
this.Geometry = new EllipseGeometry(){ RadiusX = 20, RadiusY = 50};
}
}
}
PK
T;A)w
MainPage.xaml
PK
S2BG; ; MainPage.xaml.csusing System;
using System.Linq;
using System.Windows.Controls;
using Telerik.Windows.Controls;
using Telerik.Windows.Controls.Diagrams.Extensions;
using System.Windows.Media.Imaging;
using Telerik.Windows.DragDrop;
using System.Windows;
using Telerik.Windows.Diagrams.Core;
using Telerik.Windows.Controls.Diagrams;
namespace SilverlightApplication1
{
public partial class MainPage : UserControl
{
BitmapImage currentDraggedShapeImageSource;
public MainPage()
{
InitializeComponent();
this.PopulateToolBox();
}
private void PopulateToolBox()
{
RadDiagramToolboxGroup group = new RadDiagramToolboxGroup(){Header ="Custom Shapes Group"};
CustomShape custom = new CustomShape();
group.Items.Add(custom);
this.toolBox.Items.Add(group);
}
}
}
PK
DR2B Properties/PK
K
A Properties/AppManifest.xml
PK
K
AXǛ Properties/AssemblyInfo.csusing System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 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("SilverlightApplication1")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("SilverlightApplication1")]
[assembly: AssemblyCopyright("Copyright © Microsoft 2012")]
[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)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("59669d62-6e23-4520-9a99-c777c8de4cc6")]
// 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 Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
PK
S2BNK@ @ SilverlightApplication1.csproj
Debug
AnyCPU
8.0.50727
2.0
{1CBDDD2B-B6EF-4BE5-83E8-D971C4836BF2}
{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}
Library
Properties
SilverlightApplication1
SilverlightApplication1
Silverlight
v5.0
$(TargetFrameworkVersion)
true
true
true
SilverlightApplication1.xap
Properties\AppManifest.xml
SilverlightApplication1.App
SilverlightApplication1TestPage.html
true
true
false
Properties\OutOfBrowserSettings.xml
false
true
v3.5
true
full
false
Bin\Debug
DEBUG;TRACE;SILVERLIGHT
true
true
prompt
4
pdbonly
true
Bin\Release
TRACE;SILVERLIGHT
true
true
prompt
4
False
..\Binaries\2012_Q3\RadControls_for_Silverlight5_2012_3_1017_Trial_hotfix\Binaries\Silverlight\Telerik.Windows.Controls.dll
False
..\Binaries\2012_Q3\RadControls_for_Silverlight5_2012_3_1017_Trial_hotfix\Binaries\Silverlight\Telerik.Windows.Controls.Diagrams.dll
False
..\Binaries\2012_Q3\RadControls_for_Silverlight5_2012_3_1017_Trial_hotfix\Binaries\Silverlight\Telerik.Windows.Controls.Diagrams.Extensions.dll
False
..\Binaries\2012_Q3\RadControls_for_Silverlight5_2012_3_1017_Trial_hotfix\Binaries\Silverlight\Telerik.Windows.Controls.Input.dll
False
..\Binaries\2012_Q3\RadControls_for_Silverlight5_2012_3_1017_Trial_hotfix\Binaries\Silverlight\Telerik.Windows.Controls.Navigation.dll
False
..\Binaries\2012_Q3\RadControls_for_Silverlight5_2012_3_1017_Trial_hotfix\Binaries\Silverlight\Telerik.Windows.Diagrams.Core.dll
App.xaml
MainPage.xaml
Designer
MSBuild:Compile
Designer
MSBuild:Compile
PK
S2Bh.v v # SilverlightApplication1.csproj.user
DynamicPage
True
False
False
True
True
PK
K
An2 2 App.xamlPK
K
A X App.xaml.csPK
*S2BV CustomShape.csPK
T;A)w
MainPage.xamlPK
S2BG; ; MainPage.xaml.csPK
DR2B B Properties/PK
K
A k Properties/AppManifest.xmlPK
K
AXǛ r Properties/AssemblyInfo.csPK
S2BNK@ @ E SilverlightApplication1.csprojPK
S2Bh.v v # 6 SilverlightApplication1.csproj.userPK
x;