Mercurial > silverbladetech
changeset 72:177a9d1eba10
Latest version
author | Steven Hollidge <stevenhollidge@hotmail.com> |
---|---|
date | Mon, 23 Apr 2012 17:57:21 +0100 |
parents | 96e6fbd70f49 |
children | d06c852e0167 |
files | Glimpse/Glimpse.Old.vbproj Glimpse/Glimpse.Old.vbproj.user Glimpse/Glimpse.vbproj Glimpse/Glimpse.vbproj.user SilverlightGlimpse/SilverlightGlimpse/Controls/FloatableWindow/FloatableWindow.cs SilverlightGlimpse/SilverlightGlimpse/Models/ObservableQueue.cs SilverlightGlimpse/SilverlightGlimpse/Services/Glimpse.cs SilverlightGlimpse/SilverlightGlimpse/SilverlightGlimpse.csproj SilverlightGlimpse/SilverlightGlimpse/Views/BindingsViewer.xaml SilverlightGlimpse/SilverlightGlimpse/Views/BindingsViewer.xaml.cs SilverlightGlimpse/SilverlightGlimpse/Views/LogViewer.xaml SilverlightGlimpse/SilverlightGlimpse/Views/LogViewer.xaml.cs SilverlightGlimpse/SilverlightValidation/Views/UserListView.xaml SilverlightGlimpse/SilverlightValidation/Views/UserListView.xaml.cs |
diffstat | 14 files changed, 322 insertions(+), 698 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Glimpse/Glimpse.Old.vbproj Mon Apr 23 17:57:21 2012 +0100 @@ -0,0 +1,190 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup Condition="'$(MSBuildToolsVersion)' == '3.5'"> + <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> + </PropertyGroup> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion>9.0.30729</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{C72D72F7-C49B-46DF-BD6C-0E14DBCD8F95}</ProjectGuid> + <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{F184B08F-C81C-45F6-A57F-5ABD9991F28F}</ProjectTypeGuids> + <OutputType>Library</OutputType> + <RootNamespace>Glimpse</RootNamespace> + <AssemblyName>Glimpse</AssemblyName> + <TargetFrameworkVersion>v5.0</TargetFrameworkVersion> + <SilverlightApplication>false</SilverlightApplication> + <ValidateXaml>true</ValidateXaml> + <ThrowErrorsInValidation>true</ThrowErrorsInValidation> + <OptionExplicit>On</OptionExplicit> + <OptionCompare>Binary</OptionCompare> + <OptionStrict>On</OptionStrict> + <OptionInfer>On</OptionInfer> + <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier> + <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion> + <FileUpgradeFlags> + </FileUpgradeFlags> + <UpgradeBackupLocation> + </UpgradeBackupLocation> + <OldToolsVersion>4.0</OldToolsVersion> + <PublishUrl>publish\</PublishUrl> + <Install>true</Install> + <InstallFrom>Disk</InstallFrom> + <UpdateEnabled>false</UpdateEnabled> + <UpdateMode>Foreground</UpdateMode> + <UpdateInterval>7</UpdateInterval> + <UpdateIntervalUnits>Days</UpdateIntervalUnits> + <UpdatePeriodically>false</UpdatePeriodically> + <UpdateRequired>false</UpdateRequired> + <MapFileExtensions>true</MapFileExtensions> + <ApplicationRevision>0</ApplicationRevision> + <ApplicationVersion>1.0.0.%2a</ApplicationVersion> + <IsWebBootstrapper>false</IsWebBootstrapper> + <UseApplicationTrust>false</UseApplicationTrust> + <BootstrapperEnabled>true</BootstrapperEnabled> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <DefineDebug>true</DefineDebug> + <DefineTrace>true</DefineTrace> + <NoStdLib>true</NoStdLib> + <NoConfig>true</NoConfig> + <MyType>Empty</MyType> + <OutputPath>Bin\Debug</OutputPath> + <DocumentationFile>Glimpse.xml</DocumentationFile> + <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn> + <DefineConstants>SILVERLIGHT=1</DefineConstants> + <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <DefineDebug>false</DefineDebug> + <DefineTrace>true</DefineTrace> + <NoStdLib>true</NoStdLib> + <NoConfig>true</NoConfig> + <Optimize>true</Optimize> + <OutputPath>Bin\Release</OutputPath> + <DocumentationFile>Glimpse.xml</DocumentationFile> + <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn> + <DefineConstants>SILVERLIGHT=1</DefineConstants> + <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> + </PropertyGroup> + <ItemGroup> + <Reference Include="System.Windows" /> + <Reference Include="mscorlib" /> + <Reference Include="system" /> + <Reference Include="System.Core" /> + <Reference Include="System.Net" /> + <Reference Include="System.Windows.Controls, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" /> + <Reference Include="System.Xml" /> + <Reference Include="System.Windows.Browser" /> + </ItemGroup> + <ItemGroup> + <Import Include="Microsoft.VisualBasic" /> + <Import Include="System" /> + <Import Include="System.Linq" /> + <Import Include="System.Collections.Generic" /> + <Import Include="System.Net" /> + <Import Include="System.Xml" /> + <Import Include="System.Windows" /> + <Import Include="System.Windows.Controls" /> + <Import Include="System.Windows.Documents" /> + <Import Include="System.Windows.Ink" /> + <Import Include="System.Windows.Input" /> + <Import Include="System.Windows.Media" /> + <Import Include="System.Windows.Media.Animation" /> + <Import Include="System.Windows.Shapes" /> + </ItemGroup> + <ItemGroup> + <Compile Include="Glimpse Controls\BrokenBindingsViewer.xaml.vb"> + <DependentUpon>BrokenBindingsViewer.xaml</DependentUpon> + </Compile> + <Compile Include="Glimpse Controls\ExceptionsViewer.xaml.vb"> + <DependentUpon>ExceptionsViewer.xaml</DependentUpon> + </Compile> + <Compile Include="Glimpse Controls\LoadExceptionViewer.xaml.vb"> + <DependentUpon>LoadExceptionViewer.xaml</DependentUpon> + </Compile> + <Compile Include="Glimpse Controls\GlimpseViewer.xaml.vb"> + <DependentUpon>GlimpseViewer.xaml</DependentUpon> + </Compile> + <Compile Include="Glimpse Services\GlimpseService.vb" /> + <Compile Include="Model\BrokenBinding.vb" /> + <Compile Include="Model\ExceptionWrapper.vb" /> + <Compile Include="My Project\AssemblyInfo.vb" /> + </ItemGroup> + <ItemGroup> + <Page Include="Glimpse Controls\BrokenBindingsViewer.xaml"> + <SubType>Designer</SubType> + <Generator>MSBuild:MarkupCompilePass1</Generator> + <Generator>MSBuild:Compile</Generator> + <SubType>Designer</SubType> + <Generator>MSBuild:Compile</Generator> + <SubType>Designer</SubType> + </Page> + <Page Include="Glimpse Controls\ExceptionsViewer.xaml"> + <SubType>Designer</SubType> + <Generator>MSBuild:MarkupCompilePass1</Generator> + <Generator>MSBuild:Compile</Generator> + <SubType>Designer</SubType> + <Generator>MSBuild:Compile</Generator> + <SubType>Designer</SubType> + </Page> + <Page Include="Glimpse Controls\LoadExceptionViewer.xaml"> + <SubType>Designer</SubType> + <Generator>MSBuild:MarkupCompilePass1</Generator> + <Generator>MSBuild:Compile</Generator> + <SubType>Designer</SubType> + <Generator>MSBuild:Compile</Generator> + <SubType>Designer</SubType> + </Page> + <Page Include="Glimpse Controls\GlimpseViewer.xaml"> + <SubType>Designer</SubType> + <Generator>MSBuild:MarkupCompilePass1</Generator> + <Generator>MSBuild:Compile</Generator> + <SubType>Designer</SubType> + <Generator>MSBuild:Compile</Generator> + <SubType>Designer</SubType> + </Page> + </ItemGroup> + <ItemGroup> + <BootstrapperPackage Include="Microsoft.Net.Client.3.5"> + <Visible>False</Visible> + <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName> + <Install>false</Install> + </BootstrapperPackage> + <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1"> + <Visible>False</Visible> + <ProductName>.NET Framework 3.5 SP1</ProductName> + <Install>true</Install> + </BootstrapperPackage> + <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1"> + <Visible>False</Visible> + <ProductName>Windows Installer 3.1</ProductName> + <Install>true</Install> + </BootstrapperPackage> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\SilverlightGlimpse\FloatableWindow\FloatableWindow.csproj"> + <Project>{D47E6045-91BB-4CD0-942F-FF015F10F7F2}</Project> + <Name>FloatableWindow</Name> + </ProjectReference> + </ItemGroup> + <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.VisualBasic.targets" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> + <ProjectExtensions> + <VisualStudio> + <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}"> + <SilverlightProjectProperties /> + </FlavorProperties> + </VisualStudio> + </ProjectExtensions> +</Project> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Glimpse/Glimpse.Old.vbproj.user Mon Apr 23 17:57:21 2012 +0100 @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> + <PropertyGroup> + <PublishUrlHistory /> + <InstallUrlHistory /> + <SupportUrlHistory /> + <UpdateUrlHistory /> + <BootstrapperUrlHistory /> + <ErrorReportUrlHistory /> + <FallbackCulture>en-US</FallbackCulture> + <VerifyUploadedFiles>false</VerifyUploadedFiles> + </PropertyGroup> + <ProjectExtensions> + <VisualStudio> + <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}"> + <SilverlightProjectProperties> + <StartPageUrl> + </StartPageUrl> + <StartAction>DynamicPage</StartAction> + <AspNetDebugging>True</AspNetDebugging> + <NativeDebugging>False</NativeDebugging> + <SQLDebugging>False</SQLDebugging> + <ExternalProgram> + </ExternalProgram> + <StartExternalURL> + </StartExternalURL> + <StartCmdLineArguments> + </StartCmdLineArguments> + <StartWorkingDirectory> + </StartWorkingDirectory> + <ShowWebRefOnDebugPrompt>True</ShowWebRefOnDebugPrompt> + <OutOfBrowserProjectToDebug> + </OutOfBrowserProjectToDebug> + <ShowRiaSvcsOnDebugPrompt>True</ShowRiaSvcsOnDebugPrompt> + </SilverlightProjectProperties> + </FlavorProperties> + </VisualStudio> + </ProjectExtensions> +</Project> \ No newline at end of file
--- a/Glimpse/Glimpse.vbproj Mon Apr 23 14:54:24 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,182 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <PropertyGroup Condition="'$(MSBuildToolsVersion)' == '3.5'"> - <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> - </PropertyGroup> - <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProductVersion>9.0.30729</ProductVersion> - <SchemaVersion>2.0</SchemaVersion> - <ProjectGuid>{C72D72F7-C49B-46DF-BD6C-0E14DBCD8F95}</ProjectGuid> - <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{F184B08F-C81C-45F6-A57F-5ABD9991F28F}</ProjectTypeGuids> - <OutputType>Library</OutputType> - <RootNamespace>Glimpse</RootNamespace> - <AssemblyName>Glimpse</AssemblyName> - <TargetFrameworkVersion>v3.0</TargetFrameworkVersion> - <SilverlightApplication>false</SilverlightApplication> - <ValidateXaml>true</ValidateXaml> - <ThrowErrorsInValidation>true</ThrowErrorsInValidation> - <OptionExplicit>On</OptionExplicit> - <OptionCompare>Binary</OptionCompare> - <OptionStrict>On</OptionStrict> - <OptionInfer>On</OptionInfer> - <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier> - <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion> - <FileUpgradeFlags> - </FileUpgradeFlags> - <UpgradeBackupLocation> - </UpgradeBackupLocation> - <OldToolsVersion>3.5</OldToolsVersion> - <PublishUrl>publish\</PublishUrl> - <Install>true</Install> - <InstallFrom>Disk</InstallFrom> - <UpdateEnabled>false</UpdateEnabled> - <UpdateMode>Foreground</UpdateMode> - <UpdateInterval>7</UpdateInterval> - <UpdateIntervalUnits>Days</UpdateIntervalUnits> - <UpdatePeriodically>false</UpdatePeriodically> - <UpdateRequired>false</UpdateRequired> - <MapFileExtensions>true</MapFileExtensions> - <ApplicationRevision>0</ApplicationRevision> - <ApplicationVersion>1.0.0.%2a</ApplicationVersion> - <IsWebBootstrapper>false</IsWebBootstrapper> - <UseApplicationTrust>false</UseApplicationTrust> - <BootstrapperEnabled>true</BootstrapperEnabled> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <DebugSymbols>true</DebugSymbols> - <DebugType>full</DebugType> - <DefineDebug>true</DefineDebug> - <DefineTrace>true</DefineTrace> - <NoStdLib>true</NoStdLib> - <NoConfig>true</NoConfig> - <MyType>Empty</MyType> - <OutputPath>Bin\Debug</OutputPath> - <DocumentationFile>Glimpse.xml</DocumentationFile> - <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn> - <DefineConstants>SILVERLIGHT=1</DefineConstants> - <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <DebugType>pdbonly</DebugType> - <DefineDebug>false</DefineDebug> - <DefineTrace>true</DefineTrace> - <NoStdLib>true</NoStdLib> - <NoConfig>true</NoConfig> - <Optimize>true</Optimize> - <OutputPath>Bin\Release</OutputPath> - <DocumentationFile>Glimpse.xml</DocumentationFile> - <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn> - <DefineConstants>SILVERLIGHT=1</DefineConstants> - <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> - </PropertyGroup> - <ItemGroup> - <Reference Include="System.Windows" /> - <Reference Include="mscorlib" /> - <Reference Include="system" /> - <Reference Include="System.Core" /> - <Reference Include="System.Net" /> - <Reference Include="System.Windows.Controls, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" /> - <Reference Include="System.Xml" /> - <Reference Include="System.Windows.Browser" /> - </ItemGroup> - <ItemGroup> - <Import Include="Microsoft.VisualBasic" /> - <Import Include="System" /> - <Import Include="System.Linq" /> - <Import Include="System.Collections.Generic" /> - <Import Include="System.Net" /> - <Import Include="System.Xml" /> - <Import Include="System.Windows" /> - <Import Include="System.Windows.Controls" /> - <Import Include="System.Windows.Documents" /> - <Import Include="System.Windows.Ink" /> - <Import Include="System.Windows.Input" /> - <Import Include="System.Windows.Media" /> - <Import Include="System.Windows.Media.Animation" /> - <Import Include="System.Windows.Shapes" /> - </ItemGroup> - <ItemGroup> - <Compile Include="Glimpse Controls\BrokenBindingsViewer.xaml.vb"> - <DependentUpon>BrokenBindingsViewer.xaml</DependentUpon> - </Compile> - <Compile Include="Glimpse Controls\ExceptionsViewer.xaml.vb"> - <DependentUpon>ExceptionsViewer.xaml</DependentUpon> - </Compile> - <Compile Include="Glimpse Controls\LoadExceptionViewer.xaml.vb"> - <DependentUpon>LoadExceptionViewer.xaml</DependentUpon> - </Compile> - <Compile Include="Glimpse Controls\GlimpseViewer.xaml.vb"> - <DependentUpon>GlimpseViewer.xaml</DependentUpon> - </Compile> - <Compile Include="Glimpse Services\GlimpseService.vb" /> - <Compile Include="Model\BrokenBinding.vb" /> - <Compile Include="Model\ExceptionWrapper.vb" /> - <Compile Include="My Project\AssemblyInfo.vb" /> - </ItemGroup> - <ItemGroup> - <Page Include="Glimpse Controls\BrokenBindingsViewer.xaml"> - <SubType>Designer</SubType> - <Generator>MSBuild:MarkupCompilePass1</Generator> - <Generator>MSBuild:Compile</Generator> - <SubType>Designer</SubType> - </Page> - <Page Include="Glimpse Controls\ExceptionsViewer.xaml"> - <SubType>Designer</SubType> - <Generator>MSBuild:MarkupCompilePass1</Generator> - <Generator>MSBuild:Compile</Generator> - <SubType>Designer</SubType> - </Page> - <Page Include="Glimpse Controls\LoadExceptionViewer.xaml"> - <SubType>Designer</SubType> - <Generator>MSBuild:MarkupCompilePass1</Generator> - <Generator>MSBuild:Compile</Generator> - <SubType>Designer</SubType> - </Page> - <Page Include="Glimpse Controls\GlimpseViewer.xaml"> - <SubType>Designer</SubType> - <Generator>MSBuild:MarkupCompilePass1</Generator> - <Generator>MSBuild:Compile</Generator> - <SubType>Designer</SubType> - </Page> - </ItemGroup> - <ItemGroup> - <BootstrapperPackage Include="Microsoft.Net.Client.3.5"> - <Visible>False</Visible> - <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName> - <Install>false</Install> - </BootstrapperPackage> - <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1"> - <Visible>False</Visible> - <ProductName>.NET Framework 3.5 SP1</ProductName> - <Install>true</Install> - </BootstrapperPackage> - <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1"> - <Visible>False</Visible> - <ProductName>Windows Installer 3.1</ProductName> - <Install>true</Install> - </BootstrapperPackage> - </ItemGroup> - <ItemGroup> - <ProjectReference Include="..\SilverlightGlimpse\FloatableWindow\FloatableWindow.csproj"> - <Project>{D47E6045-91BB-4CD0-942F-FF015F10F7F2}</Project> - <Name>FloatableWindow</Name> - </ProjectReference> - </ItemGroup> - <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.VisualBasic.targets" /> - <!-- To modify your build process, add your task inside one of the targets below and uncomment it. - Other similar extension points exist, see Microsoft.Common.targets. - <Target Name="BeforeBuild"> - </Target> - <Target Name="AfterBuild"> - </Target> - --> - <ProjectExtensions> - <VisualStudio> - <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}"> - <SilverlightProjectProperties /> - </FlavorProperties> - </VisualStudio> - </ProjectExtensions> -</Project> \ No newline at end of file
--- a/Glimpse/Glimpse.vbproj.user Mon Apr 23 14:54:24 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> - <PropertyGroup> - <PublishUrlHistory /> - <InstallUrlHistory /> - <SupportUrlHistory /> - <UpdateUrlHistory /> - <BootstrapperUrlHistory /> - <ErrorReportUrlHistory /> - <FallbackCulture>en-US</FallbackCulture> - <VerifyUploadedFiles>false</VerifyUploadedFiles> - </PropertyGroup> - <ProjectExtensions> - <VisualStudio> - <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}"> - <SilverlightProjectProperties> - <StartPageUrl> - </StartPageUrl> - <StartAction>DynamicPage</StartAction> - <AspNetDebugging>True</AspNetDebugging> - <NativeDebugging>False</NativeDebugging> - <SQLDebugging>False</SQLDebugging> - <ExternalProgram> - </ExternalProgram> - <StartExternalURL> - </StartExternalURL> - <StartCmdLineArguments> - </StartCmdLineArguments> - <StartWorkingDirectory> - </StartWorkingDirectory> - <ShowWebRefOnDebugPrompt>True</ShowWebRefOnDebugPrompt> - <OutOfBrowserProjectToDebug> - </OutOfBrowserProjectToDebug> - <ShowRiaSvcsOnDebugPrompt>True</ShowRiaSvcsOnDebugPrompt> - </SilverlightProjectProperties> - </FlavorProperties> - </VisualStudio> - </ProjectExtensions> -</Project> \ No newline at end of file
--- a/SilverlightGlimpse/SilverlightGlimpse/Controls/FloatableWindow/FloatableWindow.cs Mon Apr 23 14:54:24 2012 +0100 +++ b/SilverlightGlimpse/SilverlightGlimpse/Controls/FloatableWindow/FloatableWindow.cs Mon Apr 23 17:57:21 2012 +0100 @@ -432,7 +432,14 @@ public Panel ParentLayoutRoot { get { return _parentLayoutRoot; } - set { _parentLayoutRoot = value; } + set + { + _parentLayoutRoot = value; + var grid = _parentLayoutRoot as Grid; + if (grid == null) return; + Grid.SetRowSpan(this, grid.RowDefinitions.Count); + Grid.SetColumnSpan(this, grid.ColumnDefinitions.Count); + } } /// <summary> @@ -1295,8 +1302,18 @@ { if (ParentLayoutRoot != null) { - this.SetValue(Canvas.TopProperty, _verticalOffset); - this.SetValue(Canvas.LeftProperty, _horizontalOffset); + var canvas = ParentLayoutRoot as Canvas; + if (canvas != null) + { + this.SetValue(Canvas.TopProperty, _verticalOffset); + this.SetValue(Canvas.LeftProperty, _horizontalOffset); + } + else + { + this.HorizontalAlignment = HorizontalAlignment.Left; + this.VerticalAlignment = VerticalAlignment.Top; + } + this.ParentLayoutRoot.Children.Add(this); this.BringToFront(); }
--- a/SilverlightGlimpse/SilverlightGlimpse/Models/ObservableQueue.cs Mon Apr 23 14:54:24 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,432 +0,0 @@ -//Original code: http://baboon.eu/post/2011/10/02/Using-a-decompiler-to-make-an-ObservableQueuelt;Tgt;.aspx -//Author: Baboon http://baboon.eu/ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using System.Runtime.InteropServices; -using System.Threading; -using System.Collections.Specialized; -using System.ComponentModel; - -namespace SilverlightGlimpse.Models -{ - /// <summary>Represents a first-in, first-out collection of objects.</summary> - /// <typeparam name="T">Specifies the type of elements in the queue.</typeparam> - /// <filterpriority>1</filterpriority> - [DebuggerTypeProxy(typeof(System_QueueDebugView<>)), ComVisible(false), DebuggerDisplay("Count = {Count}")] - public class ObservableQueue<T> : IEnumerable<T>, ICollection, INotifyCollectionChanged, INotifyPropertyChanged - { - /// <summary>Enumerates the elements of a ObservableQueue.</summary> - - public struct Enumerator : IEnumerator<T> - { - private readonly ObservableQueue<T> _queue; - private int _index; - private readonly int _version; - private T _currentElement; - /// <summary>Gets the element at the current position of the enumerator.</summary> - /// <returns>The element in the ObservableQueue at the current position of the enumerator.</returns> - /// <exception cref="T:System.InvalidOperationException">The enumerator is positioned before the first element of the collection or after - /// the last element. </exception> - public T Current - { - get - { - if (this._index < 0) - { - if (this._index == -1) throw new InvalidOperationException("Enumerator not started"); - throw new InvalidOperationException("Enumeration ended"); - } - return this._currentElement; - } - } - object IEnumerator.Current - { - get - { - if (this._index < 0) - { - if (this._index == -1) throw new InvalidOperationException("Enumerator not started"); - throw new InvalidOperationException("Enumeration ended"); - } - return this._currentElement; - } - } - internal Enumerator(ObservableQueue<T> queue) - { - this._queue = queue; - this._version = this._queue._version; - this._index = -1; - this._currentElement = default(T); - } - /// <summary>Releases all resources used by the <see cref="T:System.Collections.Generic.Queue`1.Enumerator" />.</summary> - public void Dispose() - { - this._index = -2; - this._currentElement = default(T); - } - /// <summary>Advances the enumerator to the next element of the ObservableQueue.</summary> - /// <returns>true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection.</returns> - /// <exception cref="T:System.InvalidOperationException">The collection was modified after the enumerator was created. </exception> - public bool MoveNext() - { - if (this._version != this._queue._version) throw new InvalidOperationException("Enumerator version mismatch"); - if (this._index == -2) return false; - - this._index++; - if (this._index == this._queue._size) - { - this._index = -2; - this._currentElement = default(T); - return false; - } - this._currentElement = this._queue.GetElement(this._index); - return true; - } - void IEnumerator.Reset() - { - if (this._version != this._queue._version) throw new InvalidOperationException("Enumerator version mismatch"); - - this._index = -1; - this._currentElement = default(T); - } - } - - //TODO: refactor these: in or out? - private const int _MinimumGrow = 4; - private const int _ShrinkThreshold = 32; - private const int _GrowFactor = 200; - private const int _DefaultCapacity = 4; - - private T[] _arrayBackupField; - private T[] _array - { - get { return _arrayBackupField; } - set - { - if (_arrayBackupField == value) return; - _arrayBackupField = value; - RaiseCollectionChanged(NotifyCollectionChangedAction.Reset); - } - } - - private int _head; - private int _tail; - - private int _sizeBackupField; - private int _size - { - get { return _sizeBackupField; } - set - { - if (_sizeBackupField == value) return; - _sizeBackupField = value; - RaisePropertyChanged("Count"); - } - } - - private int _version; - private object _syncRoot; - private static T[] _emptyArray = new T[0]; - /// <summary>Gets the number of elements contained in the ObservableQueue.</summary> - /// <returns>The number of elements contained in the ObservableQueue.</returns> - public int Count { get { return this._size; } } - - bool ICollection.IsSynchronized { get { return false; } } - - object ICollection.SyncRoot - { - get - { - if (this._syncRoot == null) - { - Interlocked.CompareExchange<object>(ref this._syncRoot, new object(), null); - } - return this._syncRoot; - } - } - /// <summary>Initializes a new instance of the ObservableQueue class that is empty and has the default - /// initial capacity.</summary> - public ObservableQueue() - { - this._array = _emptyArray; - } - /// <summary>Initializes a new instance of the ObservableQueue class that is empty and has - /// the specified initial capacity.</summary> - /// <param name="capacity">The initial number of elements that the ObservableQueue can contain.</param> - /// <exception cref="T:System.ArgumentOutOfRangeException"> - /// <paramref name="capacity" /> is less than zero.</exception> - public ObservableQueue(int capacity) - { - if (capacity < 0) throw new ArgumentOutOfRangeException("capacity", "Capacity cannot be negative"); - - this._array = new T[capacity]; - this._head = 0; - this._tail = 0; - this._size = 0; - } - /// <summary>Initializes a new instance of the ObservableQueue class that contains elements copied from - /// the specified collection and has sufficient capacity to accommodate the number of elements copied.</summary> - /// <param name="collection">The collection whose elements are copied to the new ObservableQueue.</param> - /// <exception cref="T:System.ArgumentNullException"> - /// <paramref name="collection" /> is null.</exception> - public ObservableQueue(IEnumerable<T> collection) - { - if (collection == null) throw new ArgumentNullException("collection"); - this._array = new T[4]; - this._size = 0; - this._version = 0; - using (var enumerator = collection.GetEnumerator()) - { - while (enumerator.MoveNext()) - { - this.Enqueue(enumerator.Current); - } - } - } - /// <summary>Removes all objects from the ObservableQueue.</summary> - /// <filterpriority>1</filterpriority> - public void Clear() - { - if (this._head < this._tail) - { - Array.Clear(this._array, this._head, this._size); - } - else - { - Array.Clear(this._array, this._head, this._array.Length - this._head); - Array.Clear(this._array, 0, this._tail); - } - this._head = 0; - this._tail = 0; - this._size = 0; - this._version++; - RaiseCollectionChanged(NotifyCollectionChangedAction.Reset); - } - /// <summary>Copies the ObservableQueue elements to an existing one-dimensional <see cref="T:System.Array" />, - /// starting at the specified array index.</summary> - /// <param name="array">The one-dimensional <see cref="T:System.Array" /> that is the destination of the elements copied from - /// ObservableQueue. The <see cref="T:System.Array" /> must have zero-based indexing.</param> - /// <param name="arrayIndex">The zero-based index in <paramref name="array" /> at which copying begins.</param> - /// <exception cref="T:System.ArgumentNullException"> - /// <paramref name="array" /> is null.</exception> - /// <exception cref="T:System.ArgumentOutOfRangeException"> - /// <paramref name="arrayIndex" /> is less than zero.</exception>B - /// <exception cref="T:System.ArgumentException">The number of elements in the source ObservableQueue - /// is greater than the available space from <paramref name="arrayIndex" /> to the end of the destination <paramref name="array" />.</exception> - public void CopyTo(T[] array, int arrayIndex) - { - if (array == null) throw new ArgumentNullException("array"); - if (arrayIndex < 0 || arrayIndex > array.Length) throw new ArgumentOutOfRangeException("arrayIndex", "Index is out of range"); - int num = array.Length; - if (num - arrayIndex < this._size) throw new ArgumentException("Invalid offset length"); - - int num2 = (num - arrayIndex < this._size) ? (num - arrayIndex) : this._size; - if (num2 == 0) - { - return; - } - int num3 = (this._array.Length - this._head < num2) ? (this._array.Length - this._head) : num2; - Array.Copy(this._array, this._head, array, arrayIndex, num3); - num2 -= num3; - if (num2 > 0) - { - Array.Copy(this._array, 0, array, arrayIndex + this._array.Length - this._head, num2); - } - } - void ICollection.CopyTo(Array array, int index) - { - if (array == null) throw new ArgumentNullException("array"); - if (array.Rank != 1) throw new ArgumentException("Multidimension ranks are not supported"); - if (array.GetLowerBound(0) != 0) throw new ArgumentException("Lower bound cannot be zero"); - int length = array.Length; - if (index < 0 || index > length) throw new ArgumentOutOfRangeException("index", "Index is out of range"); - if (length - index < this._size) throw new ArgumentException("Invalid offset length"); - - int num = (length - index < this._size) ? (length - index) : this._size; - if (num == 0) return; - - try - { - int num2 = (this._array.Length - this._head < num) ? (this._array.Length - this._head) : num; - Array.Copy(this._array, this._head, array, index, num2); - num -= num2; - if (num > 0) - { - Array.Copy(this._array, 0, array, index + this._array.Length - this._head, num); - } - } - catch (ArrayTypeMismatchException) - { - throw new ArgumentException("Invalid array type"); - } - } - /// <summary>Adds an object to the end of the ObservableQueue.</summary> - /// <param name="item">The object to add to the ObservableQueue. The value can be null for reference types.</param> - public void Enqueue(T item) - { - if (this._size == this._array.Length) - { - int num = (int)(this._array.Length * 200L / 100L); - if (num < this._array.Length + 4) - { - num = this._array.Length + 4; - } - this.SetCapacity(num); - } - this._array[this._tail] = item; - this._tail = (this._tail + 1) % this._array.Length; - this._size++; - this._version++; - RaiseCollectionChanged(NotifyCollectionChangedAction.Add); - } - /// <summary>Returns an enumerator that iterates through the ObservableQueue.</summary> - /// <returns>An <see cref="T:System.Collections.Generic.Queue`1.Enumerator" /> for the ObservableQueue.</returns> - public Enumerator GetEnumerator() - { - return new Enumerator(this); - } - IEnumerator<T> IEnumerable<T>.GetEnumerator() - { - return new Enumerator(this); - } - IEnumerator IEnumerable.GetEnumerator() - { - return new Enumerator(this); - } - /// <summary>Removes and returns the object at the beginning of the ObservableQueue.</summary> - /// <returns>The object that is removed from the beginning of the ObservableQueue.</returns> - /// <exception cref="T:System.InvalidOperationException">The ObservableQueue is empty.</exception> - public T Dequeue() - { - if (this._size == 0) throw new InvalidOperationException("Cannot dequeue from an empty queue!"); - T result = this._array[this._head]; - this._array[this._head] = default(T); - this._head = (this._head + 1) % this._array.Length; - this._size--; - this._version++; - RaiseCollectionChanged(NotifyCollectionChangedAction.Remove); - return result; - } - /// <summary>Returns the object at the beginning of the ObservableQueue without removing it.</summary> - /// <returns>The object at the beginning of the ObservableQueue.</returns> - /// <exception cref="T:System.InvalidOperationException">The ObservableQueue is empty.</exception> - public T Peek() - { - if (this._size == 0) throw new InvalidOperationException("Cannot peek at en empty queue!"); - return this._array[this._head]; - } - /// <summary>Determines whether an element is in the ObservableQueue.</summary> - /// <returns>true if <paramref name="item" /> is found in the ObservableQueue; otherwise, false.</returns> - /// <param name="item">The object to locate in the ObservableQueue. The value can be null for reference types.</param> - public bool Contains(T item) - { - int num = this._head; - int size = this._size; - EqualityComparer<T> @default = EqualityComparer<T>.Default; - while (size-- > 0) - { - if (item == null) - { - if (this._array[num] == null) - { - return true; - } - } - else - { - if (this._array[num] != null && @default.Equals(this._array[num], item)) - { - return true; - } - } - num = (num + 1) % this._array.Length; - } - return false; - } - internal T GetElement(int i) - { - return this._array[(this._head + i) % this._array.Length]; - } - /// <summary>Copies the ObservableQueue elements to a new array.</summary> - /// <returns>A new array containing elements copied from the ObservableQueue.</returns> - public T[] ToArray() - { - T[] array = new T[this._size]; - if (this._size == 0) - { - return array; - } - if (this._head < this._tail) - { - Array.Copy(this._array, this._head, array, 0, this._size); - } - else - { - Array.Copy(this._array, this._head, array, 0, this._array.Length - this._head); - Array.Copy(this._array, 0, array, this._array.Length - this._head, this._tail); - } - return array; - } - private void SetCapacity(int capacity) - { - T[] array = new T[capacity]; - if (this._size > 0) - { - if (this._head < this._tail) - { - Array.Copy(this._array, this._head, array, 0, this._size); - } - else - { - Array.Copy(this._array, this._head, array, 0, this._array.Length - this._head); - Array.Copy(this._array, 0, array, this._array.Length - this._head, this._tail); - } - } - this._array = array; - this._head = 0; - this._tail = ((this._size == capacity) ? 0 : this._size); - this._version++; - } - /// <summary>Sets the capacity to the actual number of elements in the ObservableQueue, - /// if that number is less than 90 percent of current capacity.</summary> - public void TrimExcess() - { - int num = (int)(this._array.Length * 0.9); - if (this._size < num) - { - this.SetCapacity(this._size); - } - } - - public event NotifyCollectionChangedEventHandler CollectionChanged = delegate { }; - private void RaiseCollectionChanged(NotifyCollectionChangedAction action) - { - var e = (action == NotifyCollectionChangedAction.Reset) - ? new NotifyCollectionChangedEventArgs(action) - : new NotifyCollectionChangedEventArgs(action, null, 0); - - CollectionChanged(this, e); - } - - public event PropertyChangedEventHandler PropertyChanged = delegate { }; - private void RaisePropertyChanged(string property) - { - PropertyChanged(this, new PropertyChangedEventArgs(property)); - } - } - - internal sealed class System_QueueDebugView<T> - { - private readonly ObservableQueue<T> _queue; - [DebuggerBrowsable(DebuggerBrowsableState.RootHidden)] - public T[] Items { get { return this._queue.ToArray(); } } - - public System_QueueDebugView(ObservableQueue<T> queue) - { - if (queue == null) throw new ArgumentNullException("queue"); - this._queue = queue; - } - } -} \ No newline at end of file
--- a/SilverlightGlimpse/SilverlightGlimpse/Services/Glimpse.cs Mon Apr 23 14:54:24 2012 +0100 +++ b/SilverlightGlimpse/SilverlightGlimpse/Services/Glimpse.cs Mon Apr 23 17:57:21 2012 +0100 @@ -18,7 +18,7 @@ private static Glimpse _instance; private DispatcherTimer _refreshBindingCountTimer; private static readonly TimeSpan FiveSeconds = new TimeSpan(0, 0, 0, 5); - private const int MAX_LOG_ITEMS = 100; + private const int MAX_LOG_ITEMS = 5; #endregion @@ -29,7 +29,7 @@ BindingErrors = new ObservableCollection<BindingError>(); ValidationErrors = new ObservableCollection<ValidationWrapper>(); Exceptions = new ObservableCollection<Exception>(); - Log = new ObservableQueue<string>(); + Log = new ObservableCollection<string>(); } #endregion @@ -40,12 +40,12 @@ internal Application App { get; private set; } internal FloatableWindow GlimpseWindow { get; set;} internal string Title { get; set; } - internal ObservableCollection<BindingError> BindingErrors { get; private set; } - internal ObservableCollection<ValidationWrapper> ValidationErrors { get; private set; } - internal ObservableCollection<Exception> Exceptions { get; private set; } + public ObservableCollection<BindingError> BindingErrors { get; private set; } + public ObservableCollection<ValidationWrapper> ValidationErrors { get; private set; } + public ObservableCollection<Exception> Exceptions { get; private set; } internal FrameworkElement RootVisual { get; private set; } internal TimeSpan BindingsRefreshRate { get; private set; } - internal ObservableQueue<string> Log { get; private set; } + public ObservableCollection<string> Log { get; private set; } public bool IsInDebugMode { get { @@ -62,8 +62,9 @@ private void WriteToLog(string text, params object[] args) { - Log.Enqueue(string.Format(text, args)); - if (Log.Count > MAX_LOG_ITEMS) Log.Dequeue(); + var date = DateTime.Now.ToString("HH:mm:ss.ffff"); + Log.Add(string.Concat(date, "\t", string.Format(text, args))); + if (Log.Count > MAX_LOG_ITEMS) Log.RemoveAt(0); } #region UI Creation and Loading @@ -89,10 +90,6 @@ RootVisual.BindingValidationError += HostRootVisual_BindingValidationError; App.UnhandledException += Application_UnhandledException; - _refreshBindingCountTimer = new DispatcherTimer(); - _refreshBindingCountTimer.Tick += RefreshBindingCountTimer_Tick; - _refreshBindingCountTimer.Interval = BindingsRefreshRate; - GlimpseWindow = new FloatableWindow { Title = Title, @@ -103,7 +100,7 @@ if (Double.IsNaN(RootVisual.Width)) { //if the host control is autosized (consumes the browser window) then locate Glimpse in the top, left - GlimpseWindow.Show(50,10); + GlimpseWindow.Show(5,5); } else { @@ -116,6 +113,11 @@ GlimpseWindow.Show(dblLeft, 10); } + LoadBrokenBindings(RootVisual); + + _refreshBindingCountTimer = new DispatcherTimer(); + _refreshBindingCountTimer.Tick += RefreshBindingCountTimer_Tick; + _refreshBindingCountTimer.Interval = BindingsRefreshRate; _refreshBindingCountTimer.Start(); } @@ -151,6 +153,16 @@ if (isInherited) break; + //this code handles empty bindings on the Button controls + // unsure as to why the Button has an empty or unresolved binding of textblock type... + if ((frameworkElement.Name == "") + && (frameworkElement.GetType().Name == "TextBlock") + && (fieldInfo.Name == "TextProperty") + && (bindingExpression.ParentBinding.Path.Path == "")) + { + continue; + } + var brokenBinding = new BindingError( frameworkElement.Name, frameworkElement.GetType().Name,
--- a/SilverlightGlimpse/SilverlightGlimpse/SilverlightGlimpse.csproj Mon Apr 23 14:54:24 2012 +0100 +++ b/SilverlightGlimpse/SilverlightGlimpse/SilverlightGlimpse.csproj Mon Apr 23 17:57:21 2012 +0100 @@ -90,7 +90,6 @@ <Compile Include="Converters\BoolToValueConverter.cs" /> <Compile Include="Converters\BoolToVisibilityConverter.cs" /> <Compile Include="Models\BindingError.cs" /> - <Compile Include="Models\ObservableQueue.cs" /> <Compile Include="Models\ValidationWrapper.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Services\Glimpse.cs" />
--- a/SilverlightGlimpse/SilverlightGlimpse/Views/BindingsViewer.xaml Mon Apr 23 14:54:24 2012 +0100 +++ b/SilverlightGlimpse/SilverlightGlimpse/Views/BindingsViewer.xaml Mon Apr 23 17:57:21 2012 +0100 @@ -16,11 +16,10 @@ <TextBlock Width="120" Text="Type" /> <TextBlock Width="120" Text="Property" /> <TextBlock Width="150" Text="Path" /> - <TextBlock Width="50" Text="Quantity" /> </StackPanel> <ScrollViewer Grid.Row="1"> - <ListBox x:Name="lbBindings" ItemsSource="{Binding Mode=OneWay}"> + <ListBox x:Name="lbBindings"> <ListBox.ItemTemplate> <DataTemplate> <StackPanel Orientation="Horizontal" ToolTipService.ToolTip="{Binding ToStringProperty}"> @@ -28,8 +27,6 @@ <TextBlock Width="120" Text="{Binding ControlTypeName}" /> <TextBlock Width="120" Text="{Binding PropertyName}" /> <TextBlock Width="150" Text="{Binding Path}" /> - <TextBlock Width="50" Text="1" /> - <!-- {Binding Quantity} --> </StackPanel> </DataTemplate> </ListBox.ItemTemplate>
--- a/SilverlightGlimpse/SilverlightGlimpse/Views/BindingsViewer.xaml.cs Mon Apr 23 14:54:24 2012 +0100 +++ b/SilverlightGlimpse/SilverlightGlimpse/Views/BindingsViewer.xaml.cs Mon Apr 23 17:57:21 2012 +0100 @@ -7,7 +7,7 @@ public BindingsViewer() { InitializeComponent(); - lbBindings.DataContext = Glimpse.Service.BindingErrors; + lbBindings.ItemsSource = Glimpse.Service.BindingErrors; } } } \ No newline at end of file
--- a/SilverlightGlimpse/SilverlightGlimpse/Views/LogViewer.xaml Mon Apr 23 14:54:24 2012 +0100 +++ b/SilverlightGlimpse/SilverlightGlimpse/Views/LogViewer.xaml Mon Apr 23 17:57:21 2012 +0100 @@ -11,15 +11,7 @@ </Grid.RowDefinitions> <ScrollViewer> - <ListBox x:Name="lbLog" ItemsSource="{Binding Mode=OneWay}"> - <ListBox.ItemTemplate> - <DataTemplate> - <TextBlock Width="Auto" - Height="Auto" - Text="{Binding}" /> - </DataTemplate> - </ListBox.ItemTemplate> - </ListBox> + <ListBox x:Name="lbLog" /> </ScrollViewer> </Grid> </UserControl>
--- a/SilverlightGlimpse/SilverlightGlimpse/Views/LogViewer.xaml.cs Mon Apr 23 14:54:24 2012 +0100 +++ b/SilverlightGlimpse/SilverlightGlimpse/Views/LogViewer.xaml.cs Mon Apr 23 17:57:21 2012 +0100 @@ -7,7 +7,7 @@ public LogViewer() { InitializeComponent(); - lbLog.DataContext = Glimpse.Service.Log; + lbLog.ItemsSource = Glimpse.Service.Log; } } } \ No newline at end of file
--- a/SilverlightGlimpse/SilverlightValidation/Views/UserListView.xaml Mon Apr 23 14:54:24 2012 +0100 +++ b/SilverlightGlimpse/SilverlightValidation/Views/UserListView.xaml Mon Apr 23 17:57:21 2012 +0100 @@ -5,18 +5,20 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" - d:DesignHeight="400" + d:DesignHeight="500" d:DesignWidth="725" mc:Ignorable="d"> <Grid x:Name="LayoutRoot"> <Grid.RowDefinitions> - <RowDefinition Height="auto" /> + <RowDefinition Height="30" /> <RowDefinition Height="40" /> <RowDefinition Height="300" /> + <RowDefinition Height="30" /> + <RowDefinition Height="100" /> </Grid.RowDefinitions> <Grid.ColumnDefinitions> - <ColumnDefinition Width="auto" /> + <ColumnDefinition Width="*" /> <ColumnDefinition Width="725" /> <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions> @@ -25,17 +27,20 @@ Grid.Column="1" HorizontalAlignment="Right" Orientation="Horizontal"> - <Button Width="60" + <Button x:Name="btnAdd" + Width="60" Command="{Binding AddCommand}" Content="Add" Style="{StaticResource ButtonStyle}" /> - <Button Width="60" + <Button x:Name="btnDelete" + Width="60" Command="{Binding DeleteCommand}" Content="Delete" Style="{StaticResource ButtonStyle}" /> </StackPanel> - <controls:DataGrid Grid.Row="2" + <controls:DataGrid x:Name="dataGridUsers" + Grid.Row="2" Grid.Column="1" AutoGenerateColumns="False" ItemsSource="{Binding Data}" @@ -43,20 +48,24 @@ Mode=TwoWay}" SelectionMode="Single"> <controls:DataGrid.Columns> - <controls:DataGridTextColumn Width="125" + <controls:DataGridTextColumn x:Name="dgtcUsername" + Width="125" Binding="{Binding Username, Mode=TwoWay, ValidatesOnNotifyDataErrors=True, NotifyOnValidationError=True}" Header="Username" /> - <controls:DataGridTemplateColumn Width="125" Header="Password"> + <controls:DataGridTemplateColumn x:Name="dgtcPassword" + Width="125" + Header="Password"> <sdk:DataGridTemplateColumn.CellTemplate> <DataTemplate> - <PasswordBox Password="{Binding Password, Mode=TwoWay, ValidatesOnNotifyDataErrors=True, NotifyOnValidationError=True}" /> + <PasswordBox x:Name="pbPassword" Password="{Binding Password, Mode=TwoWay, ValidatesOnNotifyDataErrors=True, NotifyOnValidationError=True}" /> </DataTemplate> </sdk:DataGridTemplateColumn.CellTemplate> </controls:DataGridTemplateColumn> - <controls:DataGridTextColumn Width="150" + <controls:DataGridTextColumn x:Name="dgtcEmail" + Width="150" Binding="{Binding Email, Mode=TwoWay, ValidatesOnNotifyDataErrors=True, @@ -66,11 +75,17 @@ <controls:DataGridTemplateColumn Width="150" Header="Date of Birth"> <sdk:DataGridTemplateColumn.CellTemplate> <DataTemplate> - <sdk:DatePicker KeyDown="DatePicker_KeyDown" SelectedDate="{Binding DateOfBirth, Mode=TwoWay, ValidatesOnNotifyDataErrors=True, NotifyOnValidationError=True}" /> + <sdk:DatePicker x:Name="dpDateOfBirth" + KeyDown="DatePicker_KeyDown" + SelectedDate="{Binding DateOfBirth, + Mode=TwoWay, + ValidatesOnNotifyDataErrors=True, + NotifyOnValidationError=True}" /> </DataTemplate> </sdk:DataGridTemplateColumn.CellTemplate> </controls:DataGridTemplateColumn> - <controls:DataGridTextColumn Width="150" + <controls:DataGridTextColumn x:Name="dgtcDescription" + Width="150" Binding="{Binding INCORRECTPATH, Mode=TwoWay, ValidatesOnNotifyDataErrors=True, @@ -78,5 +93,14 @@ Header="Description" /> </controls:DataGrid.Columns> </controls:DataGrid> + + <Button x:Name="btnThrowException" + Grid.Row="4" + Grid.Column="1" + Width="150" + Height="50" + HorizontalAlignment="Center" + Content="Throw Exception" + Click="btnThrowException_Click"/> </Grid> </UserControl>
--- a/SilverlightGlimpse/SilverlightValidation/Views/UserListView.xaml.cs Mon Apr 23 14:54:24 2012 +0100 +++ b/SilverlightGlimpse/SilverlightValidation/Views/UserListView.xaml.cs Mon Apr 23 17:57:21 2012 +0100 @@ -1,4 +1,5 @@ -using System.Windows.Browser; +using System; +using System.Windows.Browser; using System.Windows.Input; using SilverlightValidation.Data; using SilverlightValidation.ViewModels; @@ -24,5 +25,11 @@ if (e.Key != Key.Tab) e.Handled = true; } + + private void btnThrowException_Click(object sender, System.Windows.RoutedEventArgs e) + { + throw new Exception("Oh dear we've hit an exception!", + new Exception("This is an inner exception")); + } } }