... more properties for controlling fonts, inline formatting, and
text wrapping. You’ll consider these properties in the following sections.
Font Properties
The TextBlock class defines font properties ... creating an ordinary .NET property.
The first step is to define an object that represents your property. This is an instance of
the DependencyProperty class (which is found in the Syst...
... Value property. In a LinearPointKeyFrame it’s a Point, in a DoubleKeyFrame it’s a double, and so on.
You can create a more interesting example using a series of key frames. The following
animation ... defined here. >
</Canvas>
</UserControl>
With this code in place, you could insert a bomb into your window using a
<bomb:Bomb> element, much as the main win...
... pop-up windows as separate tabs in
the current window.
• When calling PopupWindow(), you must supply an absolute URI.
Inspecting the HTML Document
Retrieving browser information and performing ... hard-coding details that
the control consumer may want to customize. Instead, you need to use template binding
expressions. In this example, you set several properties using template-bindi...
... syntax that was introduced in .NET 3. 5.
LINQ works with any data source that has a LINQ provider. Using the support that’s
included with Silverlight, you can use similarly structured LINQ queries ... = new List<Product>();
foreach (Product product in products)
{
if (product.UnitCost >= 100)
{
matches.Add(product);
}
}
Using LINQ, you can use the following exp...
... 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 ...
MainPage.xaml.cs. Here’s what you’ll see in the MainPage.xaml.cs file:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using...
...
warnings.
The installation process places the application in a randomly generated folder in the
current user’s profile. When the installation process finishes, it launches the newly installed ... Description
NotInstalled The application is running inside the browser and hasn’t been installed as an
out-of-browser application.
Installing The application is in the process of being i...
... Lines
It’s easy to create simple lines using the LineSegment and PathGeometry classes. You set the
StartPoint and add one LineSegment for each section of the line. The LineSegment.Point
property ... interesting than straight lines. You identify the end point of the line using
the ArcSegment.Point property, just as you would with a line segment. However, the PathFigure
draws a curved line...
... users zoom into massive images in real time.
■ What’s New Silverlight continues to refine its audio and video support. Although the programming
interface remains the same in Silverlight 3 (for ...
LogicalToElementPoint() Converts a logical point in the virtual image to a physical location
in the MultiScaleImage where that point is currently being
displayed.
ZoomAboutLogical...
... moving to “unsafe” code (discussed
in Chapter 10), bounds checking can be turned off.
174 Thinking in C# www.ThinkingIn.NET
public static void Main(){
try{
UsingCleanup uc = new UsingCleanup(); ... Console.WriteLine(s);
}
186 Thinking in C# www.ThinkingIn.NET
int[] a1 = { 1, 2, 3, 4, 5 };
So why would you ever define an array reference without an array?
int[] a2;...
...
work, ensuring blistering performance (Chapter 13) .
www.it-ebooks.info
CHAPTER 1 INTRODUCING SILVERLIGHT
5
Figure 1-1. Choosing not to include an ASP.NET website
Every Silverlight project ... CODE ONLINE
BOOKS FOR PROFESSIONALS BY PROFESSIONALS
®
Pro Silverlight 5 in C#
Silverlight is a revolutionary browser plug -in. Using it, you can create rich client appli-
cations...