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

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

Need Guidance of MVVM Setup

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

I am looking for some guidance for structuring a MVVM Application. I choose an app i found out today as an example - PhiTodo - its an Adobe App, but that doesn't matter. The main screen for the app looks like

There are different "views". eg. The sidebar above shows the "Default View". I can also look at the "Projects" view

The "Details View" (Main Area) can be filtered by project or deadline. There are dialogs

So my question is how will the structure of the MVVM Application look like? Like what Views/ViewModels will there be?

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

How to setup a Mobile Browser Emulator in Windows Mobile 6:

In the following tutorial, I cover the process of Setting up Windows Mobile 6 for Mobile Browser Emulation using the Microsoft Device Emulator. This enables a user to experience Windows Mobile 6 on a PC via Emulation without even owning a Windows Mobile 6 product. It can be a great way to test drive Windows Mobile 6 before purchasing a product with it installed. In our case, it allowed us to Emulate Windows Mobile Browsing so that we could optimize our sites for the Mobile viewing audience. Installation and Emulation is simple and fairly straight forward.

Looking for guidance: wanting to work with AJAX architecture



I'm starting a small website that will be backed by a database, and will allow a small number of users to authenticate and select an entry in the database, and then view (and optionally update) a corresponding entry (think master-detail).

I have some flexibility in how I'll do this, but I'd really like to incorperate some newer AJAX style coding, eliminating some page postbacks. I think this is a great opportunity to learn the concepts well.

I'll probably go with an ASP.NET 4.0 site. From what I've seen there are MANY ways to go about this:

-WCF Data Services to expose the data, and consume in ASP.NET

-Page methods to expose the data, separate method to update the data

-I'd rather avoid the UpdatePanel because I'm really looking for a full hands-on approach, with learning client side scripting being an objective as well.

Beyond that, it seems that one can use jQuery to build clientside templates, but also one can use the ASP.NET AJAX template engine (in ASP.NET 4.0 I believe).

A concern I have: users should only be able to work with the data exposed via these endpoints if they are logged into the website. Hopefully I can somehow reuse the ASP.NET forms authentication cookie for this purpose. 

Well, I hope I've posted enough to a

Can this code be setup to run against the whole database instead of just 1 record at a time?


We have made some changes to this code to start capturing 1 new field of data and updating it as new records are added. But there is currently about 120,000 records more or less.. those records of course dont have the new field populated with anything..

We would like to run this logic that already in place and run it against the tables to update the fields 1 time. I think to make it easier, if it can be setup to expect the "valueTwo" variable, so that we can run it againt the individual codes instead of doing all the records at one time.. there are codes that only have a few records, so it would be best to test initially against the small code group.


            strSqual = "insert into trans (trans_type_name, trans_date,sys_id,mod_user_id,show_ind, remoteCode, techName) values('" & valueTwo & "','" & TransDate & "',"&strSystemID&", 1,'T', '" & dbQuote(strUser) & "', '" & strTechName & "')"        
            'get the new transaction_id out for just inserted alarm   
            strSqual = "select max(transaction_id) as transaction_id from trans"  
            set rst = getStaticRecordSet(strSqual)

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

Best Way to Upgrade Using Web Setup Project


Hi there,

I am using VS2005.

I don't have much experience with web setup projects, but I now need to create a decent windows installer in order to allow customers to install one of our web applications. I have created a simple web setup project and it works fine, but not when it comes to upgrades of the application.

If for instance I install version 1.0 on a machine, and then later I try to install version 2.0, I don't seem to have the control that I would like... I can specify in the web setup project that the installer must enforce an uninstall of previous version, but then all application files and logs are uninstalled as well. If I let the application just install itself over the older version, it seems to leave some old DLL's there - it then causes issues in the application because DLL version conflicts.

My basic requirement is that I would like th installer to upgrade the old version with all the files required, but leave any application and log files in tact - this way the customer won't have to reconfigure the application after install.

What is the best way to handle this?

Web Deployment - Setup failing - aspnetca.exe


I have created websetup in windows 7 environment, asp.net 3.5, IIS 7.

Client System is windows 7 and IIS 7

Our client configuration is Windows 7, IIS7 dotNet Framework 3.5.
Following error raising below...
Faulting application name: aspnetca.exe, version: 7.5.7600.16385, time stamp: 0x4a5bcd3c
Faulting module name: aspnetca.exe, version: 7.5.7600.16385, time stamp: 0x4a5bcd3c
Exception code: 0xc0000005
Fault offset: 0x0001d912
Faulting process id: 0xe80
Faulting application start time: 0x01cb3604624975cd
Faulting application path: C:\Windows\system32\inetsrv\aspnetca.exe
Faulting module path: C:\Windows\system32\inetsrv\aspnetca.exe
Report Id: a05d368d-a1f7-11df-8336-4487fc612414
PFA Here I"m attaching custom action script. 

Creating a Web Setup Project


Hi all,

I have a sample Web Application Project and using Web Deployment Project i'm generating the precompiled version of that.

Now i want to create a WebSetup project in my solution using the Output generated by the WebDeployment project.

Please let me know how to achieve this.



Smart Clients: New Guidance And Tools For Building Integrated Desktop Applications


Integrated Desktop is a loosely coupled hosting architecture and composite UI that runs on the desktop and is supported by a loosely coupled architecture on the back end. It collapses the number of applications a user must deal with when making decisions.

Christian Thilmany and Jim Keane

MSDN Magazine September 2006

Data Deployment: Streamline Your Database Setup Process with a Custom Installer


Database setup can be a tough and time-consuming process and sometimes fall victim to human error. Microsoft Installer or InstallShield can help, as can your own custom installer. In this article, the author tackles one approach to writing database installers and demonstrates the process with a working code sample.

Alek Davis

MSDN Magazine September 2004

Proper setup using Infopath and Custom Workflow using VS 2008



I have been struggling for a couple of days, trying to set up a decent
structure for an Infopath project using a custom workflow using Visual Studio 2008.

I had a solution with two projects:

1) Sharepoint 2007 Workflow

2) Infopath 2007 form w/code-behind.

I included the xsn, in the VS solution, but after a day or two,
something went wrong, and I lost some work. I still do not know what
happened, but I could not get my changes to persist afterthat  Doing research I have read that this
stucture, using Infopath xsn, within VS does not work correctly with Source
Control. I am using VSS.

So I since made a change to the set-up so that the .xsn (form template) is separate from
Visual Studio. However, I need to leave the code-behind in VS, since I need to debug

This is my latest problem. I have been unable to attach to the correct
process, as VS generates cachse files, and who knows what else.

My question is simple. What is the supported method for debugging InfoPath
code/behind, which uses a Sharepiont Workflow?

I just also want to say that one should not have
to spend a few days just trying to setup a working development environment.

This should be trouble-free, but it is far from being so. I

WSS 3.0 Search Setup Help


To Anyone that is willing to help me out, I would appreciate any guidance that is given to me.  We are currently running WSS 3.0 and have the search server started in the central administration area for our web application.

maxserver = The web application

sqlserver = sql database

content db = WSS_Content_3dbbdcc81761405cb6e9d983a88d59bd


When I go to Central Administration > Application Management > Content Databases > Manage Content Database Settings and choose the content DB above to setup the search the following settings are set:

Database server 
SQL Server database name 

Search Server 
You can choose to associate a content database with a specific server that is running the Windows SharePoint Services search service.  
Select Windows SharePoint Services search server 
Select one... maxserver

My question is, should the SharePoint Service search server be the Maxserver or the sqlserver.


The reason i ask this is it is set to maxserver currently and no results show up. I know for a fact that the timer jobs are running!  Shouldn't the server be the database server, sqlserver?  or does it spider maxserver?



I cannot get any se

Specify [TARGETDIR] in Setup project (msi) runtime


I am not sure if here is a proper place to ask this question. I look for other forums, and don't feel this question can fit in any. If this is not a correct place to post, I appologize. Please let me know where I can get answer for this question. Thanks.

Here is my question.

I wrote a website, and not I am trying package it with a setup program (msi), so I created a "Web Setup Project" and specify outputs as the standard tutorial on this. And then I'd add custom action to msi which modify Web.config file during msi installation. Output looks ok, but msi install the website under "C:\Inetpub\wwwroot" folder, and I don't have control on it. I followed an example (http://www.codeproject.com/KB/install/ChangeVDirWebSetupProject.aspx) use orca.exe to remove WEBCA_EvaluateURLsMB, WEBCA_EvaluateURLs and WEBCA_EvaluateURLsNoFail from corresponding tables in msi and provides TARGETDIR value while calling the msi file. And then I fall in a problem, either the custom action is not called any more or I get a error "Configuration file cannot be created".

setup/deployment issues


I have built an installation (MSI) for a project I'm designing. I'm using Visual Studio 2008.  Mostly it works fine; however, I have two issues:

1) for some reason, it insists on installing .NET 3.5, even though all the projects within the install use .NET 2.0. Is this because the installer requires 3.5? If so, I guess I can live with it.

2) I want one of the programs to run on startup, and actually, it does. I assigned the Primary Output of the program to the User's startup folder. HOwever, the install also copies the .config file to startup; so it launches it notepad, leaving the user looking at a config file they obviously shouldn't be seeing.


Any thoughts? Thanks in advance... 

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

How to setup db diagram to automatically insert username into table?

 I have a table setup in the database for users who are basically going to create a classified listing.  How can I setup a diagram that would easily create a table relationship with the Users table, so that it automatically inserts the users username when they submit a new ad?  If so, how?  I've tried adding a UserName row to my table and creating a relationship with the Users table "UserName" row, but it wasn't accepting the relationship when I tried to save the diagram...apparently because the UserName row in the Users table isn't a primary key?Also, one this is setup, what's the best way to provide the user a way to see a list of their ads and have the ability to edit them?
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