Skip to content

Commit

Permalink
First commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Apress committed Oct 14, 2016
0 parents commit 25644af
Show file tree
Hide file tree
Showing 918 changed files with 32,677 additions and 0 deletions.
Binary file added 4262.pdf
Binary file not shown.
Binary file added 4263.pdf
Binary file not shown.
Binary file added 9781590599525.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions BegSilverlight2/Ch10_BlendAnimation/Ch10_BlendAnimation.sln
@@ -0,0 +1,17 @@

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ch10_BlendAnimation", "Ch10_BlendAnimation\Ch10_BlendAnimation.csproj", "{197B2DAE-40FB-4FC3-9D9D-943AA10838ED}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{197B2DAE-40FB-4FC3-9D9D-943AA10838ED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{197B2DAE-40FB-4FC3-9D9D-943AA10838ED}.Debug|Any CPU.Build.0 = Debug|Any CPU
{197B2DAE-40FB-4FC3-9D9D-943AA10838ED}.Release|Any CPU.ActiveCfg = Release|Any CPU
{197B2DAE-40FB-4FC3-9D9D-943AA10838ED}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
115 changes: 115 additions & 0 deletions BegSilverlight2/Ch10_BlendAnimation/Ch10_BlendAnimation.sln.cache

Large diffs are not rendered by default.

Binary file not shown.
@@ -0,0 +1,8 @@
<Application
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="Ch10_BlendAnimation.App">
<Application.Resources>
<!-- Resources scoped at the Application level should be defined here. -->
</Application.Resources>
</Application>
@@ -0,0 +1,48 @@
using System.Windows;
using System;

namespace Ch10_BlendAnimation
{
public partial class App : Application
{

public App()
{
this.Startup += this.OnStartup;
this.Exit += this.OnExit;
this.UnhandledException += this.Application_UnhandledException;

InitializeComponent();
}

private void OnStartup(object sender, StartupEventArgs e)
{
// Load the main control here
this.RootVisual = new Page();
}

private void OnExit(object sender, EventArgs e)
{

}

private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
{
if (!System.Diagnostics.Debugger.IsAttached)
{
e.Handled = true;

try
{
string errorMsg = e.ExceptionObject.Message + @"\n" + e.ExceptionObject.StackTrace;
errorMsg = errorMsg.Replace("\"", "\\\"").Replace("\r\n", @"\n");

System.Windows.Browser.HtmlPage.Window.Eval("throw new Error(\"Unhandled Error in Silverlight 2 Application: " + errorMsg + "\");");
}
catch (Exception)
{
}
}
}
}
}
@@ -0,0 +1,70 @@
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<DefaultClrNameSpace>Ch10_BlendAnimation</DefaultClrNameSpace>
<AssemblyName>Ch10_BlendAnimation</AssemblyName>
<RootNamespace>Ch10_BlendAnimation</RootNamespace>
<ApplicationVersion>1.0.0.*</ApplicationVersion>
<ApplicationRevision>0</ApplicationRevision>
<AlwaysCompileMarkupFilesInSeparateDomain>false</AlwaysCompileMarkupFilesInSeparateDomain>
<ExpressionBlendCreationVersion>2.1.1535.0</ExpressionBlendCreationVersion>
<ProjectGuid>{197B2DAE-40FB-4FC3-9D9D-943AA10838ED}</ProjectGuid>
<OutputType>Library</OutputType>
<NoStdLib>true</NoStdLib>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<StartPageUrl>Default.html</StartPageUrl>
<XapOutputs>true</XapOutputs>
<XapFilename>Ch10_BlendAnimation.xap</XapFilename>
<GenerateSilverlightManifest>true</GenerateSilverlightManifest>
<SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
<SilverlightAppEntry>Ch10_BlendAnimation.App</SilverlightAppEntry>
<CreateTestPage>true</CreateTestPage>
<TestPageFileName>Default.html</TestPageFileName>
<DefineConstants>SILVERLIGHT</DefineConstants>
<SilverlightApplication>true</SilverlightApplication>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="mscorlib" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Windows" />
<Reference Include="System.Windows.Browser" />
<Reference Include="System.Xml" />
<ApplicationDefinition Include="App.xaml">
<Generator>MSBuild:MarkupCompilePass1</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
</Compile>
<Compile Include="Page.xaml.cs">
<DependentUpon>Page.xaml</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Page Include="Page.xaml">
<Generator>MSBuild:MarkupCompilePass1</Generator>
<SubType>Designer</SubType>
</Page>
<None Include="Properties\AppManifest.xml" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight\V2.0\Microsoft.Silverlight.CSharp.targets" />
</Project>
52 changes: 52 additions & 0 deletions BegSilverlight2/Ch10_BlendAnimation/Ch10_BlendAnimation/Page.xaml
@@ -0,0 +1,52 @@
<UserControl
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="Ch10_BlendAnimation.Page"
Width="640" Height="480">
<UserControl.Resources>
<Storyboard x:Name="BounceBall">
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ellipse"
Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
<SplineDoubleKeyFrame KeyTime="00:00:03" Value="303.908">
<SplineDoubleKeyFrame.KeySpline>
<KeySpline ControlPoint1="0,0" ControlPoint2="0.720000028610229,0.054"/>
</SplineDoubleKeyFrame.KeySpline>
</SplineDoubleKeyFrame>
<SplineDoubleKeyFrame KeyTime="00:00:06" Value="87.968">
<SplineDoubleKeyFrame.KeySpline>
<KeySpline ControlPoint1="0.188999995589256,0.884" ControlPoint2="1,1"/>
</SplineDoubleKeyFrame.KeySpline>
</SplineDoubleKeyFrame>
<SplineDoubleKeyFrame KeyTime="00:00:08" Value="303.91">
<SplineDoubleKeyFrame.KeySpline>
<KeySpline ControlPoint1="0,0" ControlPoint2="0.802999973297119,0.164"/>
</SplineDoubleKeyFrame.KeySpline>
</SplineDoubleKeyFrame>
<SplineDoubleKeyFrame KeyTime="00:00:10" Value="206.737">
<SplineDoubleKeyFrame.KeySpline>
<KeySpline ControlPoint1="0.209000006318092,0.869" ControlPoint2="1,1"/>
</SplineDoubleKeyFrame.KeySpline>
</SplineDoubleKeyFrame>
<SplineDoubleKeyFrame KeyTime="00:00:11" Value="260.722"/>
<SplineDoubleKeyFrame KeyTime="00:00:11.5000000" Value="303.91"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</UserControl.Resources>

<Grid x:Name="LayoutRoot" Background="White" >
<Ellipse Height="128" HorizontalAlignment="Stretch" Margin="256,8,256,0"
x:Name="ellipse" VerticalAlignment="Top" Fill="#FFFF0000" Stroke="#FF000000"
StrokeThickness="3" RenderTransformOrigin="0.5,0.5" >
<Ellipse.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform/>
<TranslateTransform/>
</TransformGroup>
</Ellipse.RenderTransform>
</Ellipse>
<Rectangle Height="40" HorizontalAlignment="Stretch" Margin="0,0,0,0"
VerticalAlignment="Bottom" Fill="#FF000000" Stroke="#FF000000"/>
</Grid>
</UserControl>
@@ -0,0 +1,27 @@
using System;
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;

namespace Ch10_BlendAnimation
{
public partial class Page : UserControl
{
public Page()
{
// Required to initialize variables
InitializeComponent();
this.Loaded += new RoutedEventHandler(Page_Loaded);
}

void Page_Loaded(object sender, RoutedEventArgs e)
{
this.BounceBall.Begin();
}
}
}
@@ -0,0 +1,5 @@
<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Deployment.Parts>
</Deployment.Parts>
</Deployment>
@@ -0,0 +1,37 @@
using 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("Ch10_BlendAnimation")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Ch10_BlendAnimation")]
[assembly: AssemblyCopyright("Copyright © 2008")]
[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("197b2dae-40fb-4fc3-9d9d-943aa10838ed")]

// 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.*")]

[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
@@ -0,0 +1,5 @@
<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" EntryPointAssembly="Ch10_BlendAnimation" EntryPointType="Ch10_BlendAnimation.App" RuntimeVersion="2.0.30523.6">
<Deployment.Parts>
<AssemblyPart x:Name="Ch10_BlendAnimation" Source="Ch10_BlendAnimation.dll" />
</Deployment.Parts>
</Deployment>
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,76 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<!-- saved from url=(0014)about:internet -->
<head>
<title>Silverlight Project Test Page </title>

<style type="text/css">
html, body {
height: 100%;
overflow: auto;
}
body {
padding: 0;
margin: 0;
}
#silverlightControlHost {
height: 100%;
}
</style>

<script type="text/javascript">
function onSilverlightError(sender, args) {

var appSource = "";
if (sender != null && sender != 0) {
appSource = sender.getHost().Source;
}
var errorType = args.ErrorType;
var iErrorCode = args.ErrorCode;

var errMsg = "Unhandled Error in Silverlight 2 Application " + appSource + "\n" ;

errMsg += "Code: "+ iErrorCode + " \n";
errMsg += "Category: " + errorType + " \n";
errMsg += "Message: " + args.ErrorMessage + " \n";

if (errorType == "ParserError")
{
errMsg += "File: " + args.xamlFile + " \n";
errMsg += "Line: " + args.lineNumber + " \n";
errMsg += "Position: " + args.charPosition + " \n";
}
else if (errorType == "RuntimeError")
{
if (args.lineNumber != 0)
{
errMsg += "Line: " + args.lineNumber + " \n";
errMsg += "Position: " + args.charPosition + " \n";
}
errMsg += "MethodName: " + args.methodName + " \n";
}

throw new Error(errMsg);
}
</script>
</head>

<body>
<!-- Runtime errors from Silverlight will be displayed here.
This will contain debugging information and should be removed or hidden when debugging is completed -->
<div id='errorLocation' style="font-size: small;color: Gray;"></div>

<div id="silverlightControlHost">
<object data="data:application/x-silverlight," type="application/x-silverlight-2-b2" width="100%" height="100%">
<param name="source" value="Ch10_BlendAnimation.xap"/>
<param name="onerror" value="onSilverlightError" />
<param name="background" value="white" />

<a href="http://go.microsoft.com/fwlink/?LinkID=115261" style="text-decoration: none;">
<img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none"/>
</a>
</object>
<iframe style='visibility:hidden;height:0;width:0;border:0px'></iframe>
</div>
</body>
</html>

0 comments on commit 25644af

Please sign in to comment.