Top "Datacontext" questions

A DataContext is used in WPF, Silverlight and various other .NET technologies.

How to define DataContext in XAML using StaticResource

I want to declare a DataContext through a static resource in XAML as a binding for the Customers in the …

c# wpf xaml datacontext
DataContext Accessed After Dispose

I'm using ASP.NET 4.0. I've got the following code that returns with an error of "Cannot access a disposed object. …

c# linq linq-to-sql datacontext
DataContext and binding self as RelativeSource

Can someone explain me the following XAML line? DataContext="{Binding RelativeSource={RelativeSource Self}}" Here the simple example of use. How …

c# xaml data-binding datacontext
How to get the TSQL Query from LINQ DataContext.SubmitChanges()

I'm using Linq to SQL. I have a DataContext against which I am .SubmitChanges()'ing. There is an error inserting …

c# linq linq-to-sql datacontext submitchanges
In LINQ-SQL, wrap the DataContext is an using statement - pros cons

Can someone pitch in their opinion about pros/cons between wrapping the DataContext in an using statement or not in …

linq linq-to-sql datacontext using
Multiple dataContext for one control - MVVM

I am not sure if my question header represent exactly my problem, I will do the best to explain: I …

wpf mvvm datacontext
How to hide a control if the underlying DataContext is null?

I have an object in my view model that has a bunch of properties, some of them will occasionally be …

c# wpf silverlight binding datacontext
Why are DataContext and ItemsSource not redundant?

In WPF Databinding, I understand that you have DataContext which tells an element what data it is going to bind …

wpf data-binding datacontext itemssource
Event for "DataContextChanging"?

I am very new to WPF so forgive me if the question doesn't make sense. Is there an event that …

wpf datacontext
Module 'System.Data.Linq' Version=4.0.0.0, Culture=neutral, Publickeytoken=b77a5c561934e089' should be referenced

I have a Visual Studio 2012 web application (fw. 4.5) where I try to linq to my sql database. I've added a …

c# asp.net web datacontext