Skip to Content
Introducing .NET 4.0: with Visual Studio 2010
book

Introducing .NET 4.0: with Visual Studio 2010

by Alex Mackey
February 2010
Beginner content levelBeginner
400 pages
11h 13m
English
Apress
Content preview from Introducing .NET 4.0: with Visual Studio 2010

14.10. Attached and Dependency Properties

When you set a property of an object in ASP.NET such as Width on a TextBox, you would usually write something like this:

<asp:TextBox Width="300" Runat="server" />

Behind the scenes, the Width value is retained in a private field. If you were to retrieve the Width property, it would be the same as when it was first set. However, when working with dependency properties, this is not necessarily true.

Consider how a browser works out where to display an item on the screen. It is not as straightforward as it first sounds. There are actually a number of things that need to be taken into account when calculating where an item will be positioned on a page:

  • Other elements on the page

  • Runtime settings (e.g., screen ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

ASP.NET 3.5 For Dummies®

ASP.NET 3.5 For Dummies®

Ken Cox
ASP.NET 4 Unleashed

ASP.NET 4 Unleashed

Stephen Walther, Kevin Hoffman, Nate Dudek

Publisher Resources

ISBN: 9781430224556Purchase book