Rar! ϐs
t X 3 3 K
SD03 ToolTipOnCellDemo\ToolTipCustomUILayerDemo\App.xaml F
-t [ n n SD06 ToolTipOnCellDemo\ToolTipCustomUILayerDemo\App.xaml.cs 3/using 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 ToolTipCustomUILayerDemo
{
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)
{
}
}
}
}
t f 3G͒D0A ToolTipOnCellDemo\ToolTipCustomUILayerDemo\CustomLayersBuilder.cs Obusing System;
using Telerik.Windows.Controls.Spreadsheet.Layers;
using Telerik.Windows.Controls.Spreadsheet.Worksheets.Layers;
namespace ToolTipCustomUILayerDemo
{
public class CustomLayersBuilder : WorksheetUILayersBuilder
{
private readonly TooltipManager tooltipManager;
public CustomLayersBuilder(TooltipManager tooltipManager)
{
this.tooltipManager = tooltipManager;
}
public override void BuildUILayers(UILayerStack uiLayers)
{
base.BuildUILayers(uiLayers);
uiLayers.AddLast(new TooltipUILayer(this.tooltipManager));
}
}
}
vt ] h h akGD08 ToolTipOnCellDemo\ToolTipCustomUILayerDemo\MainPage.xaml Frl
>t ` m m -ʒD0; ToolTipOnCellDemo\ToolTipCustomUILayerDemo\MainPage.xaml.cs Vusing System;
using System.Linq;
using System.Windows.Controls;
using System.Windows.Media;
using Telerik.Windows.Documents.Spreadsheet.Model;
using Telerik.Windows.Documents.Spreadsheet.Utilities;
namespace ToolTipCustomUILayerDemo
{
public partial class MainPage : UserControl
{
private readonly TooltipManager tooltipManager;
public MainPage()
{
InitializeComponent();
this.tooltipManager = new TooltipManager(this.radSpreadsheet);
this.InputSampleTooltipData();
}
private void InputSampleTooltipData()
{
Worksheet worksheet = this.radSpreadsheet.ActiveWorksheet;
CellRange sampleTooltipValidationRange = new CellRange(13, 3, 15, 8);
EnumerateCells(sampleTooltipValidationRange, (cellIndex) =>
{
this.tooltipManager.SetTooltipInfo(worksheet, cellIndex, GetTooltipText(cellIndex));
worksheet.Cells[cellIndex].SetFill(PatternFill.CreateSolidFill(Colors.Green));
});
worksheet.Columns[sampleTooltipValidationRange].AutoFitWidth();
}
private static void EnumerateCells(CellRange rangeToEnumerate, Action actionOnCellIndex)
{
for (int row = rangeToEnumerate.FromIndex.RowIndex; row <= rangeToEnumerate.ToIndex.RowIndex; row++)
{
for (int column = rangeToEnumerate.FromIndex.ColumnIndex; column <= rangeToEnumerate.ToIndex.ColumnIndex; column++)
{
actionOnCellIndex(new CellIndex(row, column));
}
}
}
private static string GetTooltipText(CellIndex cellIndex)
{
return String.Format("This is cell {0}", NameConverter.ConvertCellIndexToName(cellIndex));
}
}
}
t j SD0E ToolTipOnCellDemo\ToolTipCustomUILayerDemo\Properties\AppManifest.xml
t j usSD0E ToolTipOnCellDemo\ToolTipCustomUILayerDemo\Properties\AssemblyInfo.cs Vusing 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("ToolTipCustomUILayerDemo")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ToolTipCustomUILayerDemo")]
[assembly: AssemblyCopyright("Copyright © 2014")]
[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("e38eb779-8956-4067-97f3-e5e9a17cacd7")]
// 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")]
st o e͒D0J ToolTipOnCellDemo\ToolTipCustomUILayerDemo\ToolTipCustomUILayerDemo.csproj zb
Debug
AnyCPU
8.0.50727
2.0
{E38EB779-8956-4067-97F3-E5E9A17CACD7}
{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}
Library
Properties
ToolTipCustomUILayerDemo
ToolTipCustomUILayerDemo
Silverlight
v5.0
$(TargetFrameworkVersion)
true
true
true
ToolTipCustomUILayerDemo.xap
Properties\AppManifest.xml
ToolTipCustomUILayerDemo.App
ToolTipCustomUILayerDemoTestPage.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
$(TargetFrameworkDirectory)System.Core.dll
..\..\..\..\WPF_Scrum\Current\Binaries\Silverlight\Telerik.Windows.Controls.dll
..\..\..\..\WPF_Scrum\Current\Binaries\Silverlight\Telerik.Windows.Controls.GridView.dll
..\..\..\..\WPF_Scrum\Current\Binaries\Silverlight\Telerik.Windows.Controls.Input.dll
..\..\..\..\WPF_Scrum\Current\Binaries\Silverlight\Telerik.Windows.Controls.Navigation.dll
..\..\..\..\WPF_Scrum\Current\Binaries\Silverlight\Telerik.Windows.Controls.Spreadsheet.dll
..\..\..\..\WPF_Scrum\Current\Binaries\Silverlight\Telerik.Windows.Data.dll
..\..\..\..\WPF_Scrum\Current\Binaries\Silverlight\Telerik.Windows.Documents.Core.dll
..\..\..\..\WPF_Scrum\Current\Binaries\Silverlight\Telerik.Windows.Documents.Spreadsheet.dll
..\..\..\..\WPF_Scrum\Current\Binaries\Silverlight\Telerik.Windows.Maths.dll
App.xaml
MainPage.xaml
Designer
MSBuild:Compile
Designer
MSBuild:Compile
t t v v h.͒D0O ToolTipOnCellDemo\ToolTipCustomUILayerDemo\ToolTipCustomUILayerDemo.csproj.user b
DynamicPage
True
False
False
True
True
t a / / TD0<