.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

class contains non-dependency-property data members that are DependencyObject objects, you must also

Posted By:      Posted Date: September 24, 2010    Points: 0   Category :WPF

I was reading the article Freezable Objects Overviewand came acrosee the statement

"If  your class contains non-dependency-property data members that are DependencyObject objects, you must also call the OnFreezablePropertyChanged method each time you change on of their values, even if you're setting the member to null. "

I quite do not understand the part about non-dependency-property data members that are DependencyObject objects. Can some one explain exactly what this means? If a data member is derived from the DependencyObject  class how then can the data member be a non dependency property?

I am also trying to locate some source code / project that overrides the OnFreezablePropertyChanged method, and have yet to find any on the interenet.

If anyone know whe

View Complete Post

More Related Resource Links

Can I use class members for data or do I need to use Variable?

I have a class derived from CodeActivity that creates some objects in its constructor which will be used by Execute. These objects are exposed as properties so I can fake them for unit tests. In a code review a colleague suggested that I might need to make all of those objects Variable<T> "for them to play nicely in WF (with all the threading etc. going on)", but wasn't sure on that. Do I need to make these Variable<T>? If not, when would I want to use Variable<T> in a CodeActivity?

abstract away the source of the connection string using a class with a static property.

ASP.NET provides a configuration system we can use to keep our applications flexible at runtime. In this article we will examine some tips and best practices for using the configuration system for the best results.

The element of a web.config file is a place to store connection strings, server names, file paths, and other miscellaneous settings needed by an application to perform work. The items inside appSettings are items that need to be configurable depending upon the environment, for instance, any database connection strings will change as you move your application from a testing and staging server into production.

Let's abstract away the source of the connection string using a class with a static property.

Class which contains an array of objects of type "Class2"



1  Partial Class _Default
2  Inherits System.Web.UI.Page

3 Public Function Ohjoy(ByVal X As Integer) As Integer
4 Dim theClass As New Class1 '= New Class1()
5    theClass.ReSize(0)
6    theClass.myBaby(0).GetName(0) = "Hello" 'Property Chars is read only'
7    Return 1
8 End Function
I have a first class named "Class1". I have a second class named "Class2" Class2, is a member of class 1,
and is implemented as an array of objects of type Class 2.

If I try and call the Accessor GetName() my hard coded value "Hello" in my accessor is not returned? Only
an alpha character like "T"

Also if I try and assigne a value using the setter GetName() it does not work, and the compiler gives me
an error message "property Chars is ReadOnly? Does anyone know what is wrong in my code? Line 6 above


Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
End Sub
End Class

Public Class Class1
    Dim bs As Integer
    Public myBaby() As Class2
    Public myB As Class2
    Public Function ReSize(By

Cutting Edge: Pros and Cons of Data Transfer Objects


After a brief refresher on procedural and object based patterns for organizing the business logic layer, the author focuses on data transfer objects and the impact they have on the development of the software project.

Dino Esposito

MSDN Magazine August 2009

Data Points: SQL Server Management Objects


SQL Server Management Objects offer developers a robust toolset for backing up and restoring databases, and issuing DDL commands, as John Papa explains.

John Papa

MSDN Magazine June 2007

Data Points: Data Bound Applications with ADO.NET and Custom Objects


In this column see how to bind a custom list of business entities using the binding tools in the .NET Framework 2.0.

John Papa

MSDN Magazine February 2007

Data Points: Creating Audit Tables, Invoking COM Objects, and More


Dealing with error handling between T-SQL and a calling application, evaluating when a field's value has changed, and creating auditing tables in SQL ServerT are all common issues that developers must tackle.

John Papa

MSDN Magazine April 2004

Zip Your Data: Using the Zip Classes in the J# Class Libraries to Compress Files and Data with C#


Zip compression lets you save space and network bandwidth when storing files or sending them over the wire. In addition, you don't lose the directory structure of folders you Zip, which makes it a pretty useful compression scheme. The C# language doesn't have any classes that let you manipulate Zip files, but since .NET-targeted languages can share class implementations, and J# exposes classes in the java.util.zip namespace, you can get to those classes in your C# code. This article explains how to use the Microsoft J# class libraries to create an application in C# that compresses and decompresses Zip files. It also shows other unique parts of the J# runtime you can use from any .NET-compliant language to save some coding.

Ianier Munoz

MSDN Magazine June 2003

Building a Custom Data Grid: Performing Ad Hoc Web Reporting with a VBScript 5.0 Class Object


A flexible, customizable grid for displaying data is a useful tool for ASP developers. It allows Web visitors to customize their view of your data. This article takes the data grid presented in "Ad Hoc Web Reporting with ADO 2.0" by John Papa and Charles Caison (MIND, December 1998) and adds handy features such as a finds feature that supports multiple finds and a mode for adding and editing records. This version also improves response time by allowing asynchronous record download and it componentizes the code so it can be used as a standalone VBScript class object that can be reused in other pages.

Randall Kindig

MSDN Magazine July 2000

Collaboration Data Objects: Send Microsoft Exchange Appointment Reminders to Your Pager Using CDO


Besides your typical e-mail services, Microsoft Exchange also provides the service infrastructure you need to build extensible knowledge and workflow management systems. Understanding Collaboration Data Objects (CDO) is the key to accessing these Exchange services for your own programs. With CDO you can automate tedious tasks and integrate information such as e-mail, calendars, and contacts with almost any application. This article explains how CDO enables you to access Exchange services, then walks you through a sample application that reads calendar events from an Exchange server and sends pager reminders to your users.

Sean McCormick

MSDN Magazine June 2000

Automatically set a property value for a new record in a Dynamic Data application.


I have a SalesOrderItem table, and it has a UnitPrice column in case the salesperson wishes to override the unit price of the Product for that order item.

In an ASP.NET Dynamic Data application, what would be the best way to set that UnitPrice property on a new SalesOrderItem based on the standard UnitPrice for the product? In other words, when the user clicks New on the 'Items' screen for a sales order, the UnitPrice field should already be filled in with the normal unit price for the product.

This was originally asked by myself on StackOverflow at: http://stackoverflow.com/questions/3538234/automatically-set-a-property-value-for-a-new-record-in-a-dynamic-data-application

send data in class object from one page to another using session


hello everybody

now i hav stored all data like user name, data fatched from database of that user

and i stored that data and user name such as:

string strUserName="user name"

dataset ds =new dataset();// data of that user

now i wan yo send d whole data from my login page to user profile page

can anybody help me for that...................

and plz tell me that how much is this way is benifitial to send data from one page to another page

plz........kindly waiting for positive rply

Video: Consuming SharePoint 2010 Objects and Data in Silverlight Applications

This video provides an overview of how to build Silverlight applications that access SharePoint data. (Length: 3:50)
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend