datacontext

Make a Dialog ViewModel binding ready, call Dialog and return data from it in MVVM

Hello, Do you see a better way how I can call/contstruct a Dialog from a Controller/ViewModel return data from it and set the DocumentViewModel as DataContext of the Dialog? The problem is I can not use View first approach in the DocumentDetailWindow and its belonging UserControl because I can not set the Model to the DocumentViewModel...

Update data with RIA Services over SOAP

Hi There, I have an SL Application which uses RIA and Domain services for data access. I have modified this to work on SOAP so any other applications can use the service. On a Windows client I can query data without a problem. But I need to make some update and inserts. As you may know all insert, update, delete methods are not visibl...

Silverlight User Control in MainPage.xaml

I'm currently investigating building a User Control in a Silverlight Project in Expression Blend 4. The control has an associated set of sample data for the User Control, and the data is appearing correctly in the User Control. When I place the User Control on the main page, the sample data does not appear in the User Control. Is this c...

LinqDataSource DataContext Object Not Showing In Configure Data Source

Hi, I added a LinqToSQL Class to my project and put it in my App_code folder. I then added a LinqDataSource to a new web page and tried to configure it to use this class, but it does not show up as an option in the DataContext drop down. I moved the class to the root directory of my project and it is now available in the DataContex...

combobox with different datacontext for ItemsSource and SelectedItem

So i have a combobox as the CellEditingTemplate of a datagrid and selected item is bound to the datacontext of that row as expected, but i need the combobox to be populated from a ObservableCollection outside of the context of the datagrid from the ViewModel. How could i acheive this? Thanks ...

linq to sql datacontext, inserting objects and retrieving the id and appending it to another table??

Wierd question title... What i am trying to accomplish is pretty simple i think. I got 3 tables in the database, BlogPost - BlogPostTagsConnection - Tags The blogpost contains text, title, slug, author, id etc. The BlogPostTagsConnection contains the BlogPost id and the Tags id and finally the Tags contains tagid and tag. So i tried...

Binding Resources in XAML

I have a boolean flag in my DataContext which I would like a child control to use. Problem: I have a child control which uses it's own datasource. Hence, the datacontext of the entire page is not visibile to it. The child control needs to access this one property of the windows datacontext. I have managed to use a static boolean value...

Subsonic3 and ASP.NET MVC: Is there something like DataContext.GetTable<T>?

Right now I'm working my way thru the SportsStore exercise of Sanderson's "Pro ASP.Net MVC 2 Framework" book (page 107) and the exercise has me implementing a Repository pattern backed by a DB store using LINQ-to-SQL. I'm trying to figure out how to implement this same repository with the Subsonic ORM. The basic repository code is as fo...

Linq to SQL intellisense has no knowledge of tables within the datacontext object.

I can successfully connect to the database with my datacontext object. I am able to read and write to the database successfully, however I can't use the same syntax that others appear to be using. For example, when I want data from a table, I have to do something like this: db = new UserDataDataContext(WebConfigurationManager.Connecti...