Tag Archives: C#
Incorrect C++ compiler behavior in Visual Studio
[Note: Special credit for this post goes to my colleague Yuliy Gerchikov, who first discovered this issue] As most C++ programmers know, an object that has been constructed via the new expression must be destroyed by calling delete. The delete-expression … Continue reading
Filed under Programming, Tools
Code Snippets in Visual Studio 2010
Visual Studio allows developers to save snippets of code which can be inserted at a later time. This saves on retyping blocks of code that are used often. I also find it very useful when I have to show code … Continue reading
Filed under Visual Studio
XAML Resources
Every element in Silverlight contains a Resource property that maintains a dictionary of resources. This collection can hold any type, and a key is used to refer to each individual resource. Each element has access to its own resources as … Continue reading
Filed under .NET, Programming
Custom Attached Properties in Silverlight
An attached property is a type of global property that is settable on any nested object. In Silverlight (and WPF), attached properties are usually defined as a specialized case of Dependency Properties, and like all dependency properties they are managed … Continue reading
Filed under .NET, Programming
Resolution of Dependency Properties
As I mentioned in my previous blog post, dependency properties depend on any number of services (called property providers) for their values. The Silverlight runtime needs to follow strict rules of precedence to determine the value of a dependency property. … Continue reading
Filed under .NET, Programming
Dependency Properties in Silverlight
Very simply, a property of an element that depends on a number of property-providers outside the element is called a "dependency property". Each of these providers has its own level of precedence. These properties can be either set directly by … Continue reading
Filed under .NET, Programming
Creating a Custom XAML TypeConverter
TypeConverters provide a means of converting a String to the appropriate .NET type or a new instance when XAML is processed. I’ve already looked at how the XAML parser searches for TypeConverters (XAML and TypeConverters ) Now let’s take a … Continue reading
Filed under Programming
Adding a Custom Silverlight Control
Silverlight has a ton of controls that we can use in our Silverlight apps. Most of the times, this collection of controls is sufficient, but every once in a while, we need to create a custom control. Adding a new … Continue reading
Filed under .NET, Programming
XAML and TypeConverters
In a XAML document, every element maps to an instance of a Silverlight (.NET) class. The properties of this instance can be set through attributes in the XAML file. There is a bit of a catch though. These attribute values … Continue reading
Filed under .NET, Programming
Silverlight – Getting started with XAML
XAML stands for eXtensible Application Markup Language (pronounced zamm-uhl). It is an XML based markup language used to instantiate .NET objects. XAML was initially designed as part of Windows Presentation Foundation (WPF), and allows developers to define rich user interfaces. … Continue reading
Filed under .NET, Programming