.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

MVVM: Launching workspaces from within a workspace

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

How would one launch a new workspace based on a different ViewModel from within a workspace?  I made a workspace menu within a workspace and I passed in the collection of workspaces to the constructor.  This seems pretty cumbersome and I need to do it again with another workspace.  Any ideas?  I was told that making the workspace collecction a singleton is a bad idea.  Is that true?  Seems logical to do it.

View Complete Post

More Related Resource Links

WPF: If Heineken did MVVM Frameworks Part 4

MVVM is to have an instance of a particular Model (say currentPerson) inside my ViewModel (say PeopleViewModel) which is exposed to the View (say PeopleView). The View binds and edits the Model directly.

This definitely flies in the face of what most people consider to be the holy grail of MVVM pattern, but it's a fairly new pattern, so people are still finding their way with it every day, and this works for me very well. The reason I do what I do, is for the following reasons:

1.I have always had the luxury of being able to write my own UI specific Model classes. I would even do this if I was using some other Model classes first, such as LINQ to SQL or LINQ to Entity Framework. As these classes don't have everything a proper WPF Model class needs in my humble opinion. Though, they are pretty good, as they are Partial classes and use INotifyPropertyChanged/DataContract etc etc
2.I am a pragmatist and I do not like writing code for the sake of writing code. I have seen some MVVM apps where the author has had a Model with 50 properties on it, that are simply repeated in the ViewModel abstraction, where the ViewModel added nothing. On that day I decided I would never do that unless I have to.
3.I honestly see no harm in writing directly to the Model from the View, JUST SO LONG AS if the Model is InValid its data NEVER makes its way to the database. I honestly see no pro

SharePoint Document Workspaces for Developers

Office 2003 is being released this month, and a cast of supporting applications is already available. One of these is Windows SharePoint Services 2.0, the free team add-on for Windows Server 2003. If you're not familiar with SharePoint Services basics, take a look at What Developers Need to Know About Windows SharePoint Services. In this article, I'm going to drill into one key place where SharePoint and Office 2003 overlap: document workspaces

Can I use MVVM for it?


I've read many articles about MVVM, but I can't get it into real code.

I have two lists which have common field user_id. First list contains all users with their names and second all files from all users. The asp.net page should show grid with newest file for every user. How can I get it into MVVM? Where should I bind username to his file? Need I ViewModel for every list or one common for both?


Regards, Gabriel

Modify meeting workspace menu



Is it possible to change the order of the date menu on a meeting workspace? At the moment the menu is sorted Ascending and we need it sorted Descending.

Any help would be appreciated!


Groove Web Services SDK for SharePoint Workspace 2010

Learn how to use the Groove Web Services APIs. This reference provides samples using both the underlying SOAP XML messages and application program source code.

SharePoint Workspace 2010 Product Guide

Get an overview of what's new in SharePoint Workspace 2010 and a deeper look at benefits across all Office 2010 programs, as well as Office Web Apps and Office Mobile 2010.

Groove Web Services SDK for Microsoft SharePoint Workspace 2010

Download documentation, WSDL, and sample code for applications that use Groove Web Services.

SharePoint Workspace 2010 Crash



I was redirected from Office forum to here, hope someone can help. The Problem is:


When trying to access certain account in Office SharePoint Workspace 2010, the user gets the following error:

Problem signature:

  Problem Event Name:                        APPCRASH

  Application Name:                             GROOVE.EXE

  Application Version:                    &nb

MVVM Demo App. Josh Smith

I've been studying this code for a while now, taking notes and digging in.  I am an experienced programmer and have been around a while.  Was wondering if anyone else feels that same way I do about this demo..  It's a pretty difficult thing to get your "head around".  Does it seem that the simple thing we're trying to accomplish with the MVVM pattern is really difficult?  Or am I just a newbie to the pattern and eventually it will sink into the thich skull? I don't criticize the work done because as far as I can tell it's a nice piece of work.  All of the Abstract classes are well defined, the concrete classes are well defined, the commanding patterns are very interesting.  It just seems to me that we are jumping through hoops to do this stuff. Comments?Javaman

MVVM with navigation pages

Hi how can i do for create a WPF navigation pages application using MVVM pattern? Thanks

Global Values in MVVM

When developing WinForms app, I created in the Program.cs module a singleton instance of a class that held values that I could reference anywhere in the application.  The values included connection string (the user could log onto anyone of a number of databases), various options from the database including information about the user, etc. Any recommendations about how to do this within the scope of the MVVM pattern for WPF?  

MVVM and Animation Control

I've been struggling with what should be a fairly straightforward issue...hoping someone's got a solution.I'm using MVVM in a scenario where I'm using a MediaElement in a View. The MediaElement has a Storyboard that I customize using DataBinding. The scenario works well when I'm using EventTriggers to control playback, but I have not discovered how to manipulate things using DataTriggers.My Storyboard consists of a ParallelTimeline, which contains the MediaTimeline (with Source, BeginTime and Duration databound to the ViewModel. I've got two buttons that are attached to the Storyboard in EventTriggers calling PauseStoryboard and ResumeStoryboard. This works well, but it's not the best paradigm for me.I am trying to accomplish a design where, if I have two such Views each containing a MediaElement with this type of Storyboard, when one Storyboard reaches its end point, the other View's MediaElement is triggered to play.I have tried to use a DataTrigger design, but I am having problems freezing the Storyboard because I'm using DataBinding to set some of the Storyboard parameters.Does anyone have any ideas as to how I can control a MediaElement via Storyboard/Timeline using DataTrigger instead of EventTrigger? Am I missing something obvious in MVVM?--- Jim ---

WPF MVVM pattern Projects

Hello,   I'm planning to develop WPF,C# using MVVM pattern.I'm looking for Sample projects using MVVM style i.e, like we have on Asp.net Web MVC NerdDinner,MVC MusicStore,Microsoft TownHall project.Can i find similar or any other help ful links for MVVM projects?    

MVVM. Access TabControl->TabItems from ViewModel

Hi Folks,   Well, I just start to use MVVM, and I want to migrate functionality from my old non mvvm project to my new mvvm project.   The problem is the following one: In my old app (wizard application), I use tab control. And I have such things as States there. For this purpose I use StateMachine approach: My tab control looks like:   private void sm_StateChanged(State current, State previous, State next) { switch (current.Name) { case StatesNames.WELCOME_SCREEN_STATE_NAME: MainTabControl.SelectedIndex = 0; break; case StatesNames.SERVER_SUMMARY_SCREEN_STATE_NAME: MainTabControl.SelectedIndex = 1; preCertificationTabControl.SelectedIndex = 0; break; case StatesNames.SERVER_DEFINITION_SCREEN_STATE_NAME: MainTabControl.SelectedIndex = 1; preCertificationTabControl.SelectedIndex = 1; break; case StatesNames.UPGRADE_PRECERTIFICATION_SCREEN_STATE_NAME: MainTabControl.SelectedIndex = 1; preCertificationTabControl.SelectedIndex = 2; break; case StatesNames.PRECERTIFICATION_SCREEN_STATE_NAME: NavigationStateMachine.GetInstance().SwitchToNextState(); break; } } Well, as you can see, I need to access my tabControl to indicate states :( but it is not correct from

WPF MVVM RoutedEvent

Hi, I want to make a custom search control. I have followed this example about the RoutedEvent and everythings works fine. The only problem is i have now a code behind file and i whant this in my ViewModel. How can i do this? Control class public class SearchTextBox: TextBox { public static readonly RoutedEvent searchEvent = EventManager.RegisterRoutedEvent( "Search", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(SearchTextBox)); public event RoutedEventHandler Search { add { AddHandler(searchEvent, value); } remove { RemoveHandler(searchEvent, value); } } void RaiseSearchEvent() { RoutedEventArgs newEventArgs = new RoutedEventArgs(SearchTextBox.searchEvent); RaiseEvent(newEventArgs); } protected override void OnTextChanged(System.Windows.Controls.TextChangedEventArgs e) { RaiseSearchEvent(); } } Application View <lib:SearchTextBox Search="....."/> Application Model ..... I've searched the internet and the related topics from MSDN but could not find the answer. Kind regards, Flaminio

Unable to collaborate on document in SharePoint Workspace which has Content Type with more than look

1/ Add a new document into Shared Document library. 2/ In Shared Document of this workspace, add new content type having 12 lookup columns. 3/ Create a new workspace 4/ Add a user into the workspace with the editable permission (Contribute or Full Control). 5/ Open the document in Word 2007, in the Document Management Pane Using system account: the document is shown in the Document tab. Using normal account: the document is not shown in the Document tab. 6/ If we use Dws.GetDwsMetaData method to get information of the workspace site and lists it contains then:    + Using system account credential, this method returns the document's information in Shared Document library. The result contains the below xml data: <List Name="Documents"> <ID>{CFEDFC3C-2AD3-4A0E-88B6-821BF57CACDB}</ID> <z:row ows_FileRef="Shared Documents/Test Content Type.docx" ows_FSObjType="0" ows_Created="2010-09-01T02:38:31Z" ows_Author="1073741823;#System Account" ows_Modified="2010-09-01T02:38:31Z" ows_Editor="1073741823;#System Account" ows_ID="1" ows_ProgID="" xmlns:z="#RowsetSchema" /> </List>     + Using the normal user credential, this method does not return the document information in Shared Document library. I notice
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