The .NET RIA Services are described as an n-tier framework for Silverlight. I have been wondering what the relation is between this framework and the Model-View-ViewModel pattern. Are they in conflict or can you see the potential for synergic combination?
...
I'm developing an XBAP and i have a simple requirement.
The DataContext of the whole main page is set to an instance of my UserViewModel. The UserViewModel has a DependencyProperty called AuthenticationState which is an enum with values like 'Authenticated','NotAutheticated' and 'AuthenticationFailed'.
Now, i need to respond to an...
Is there a difference between the standard "Model View Controller" pattern and Microsoft's Model/View/ViewModel pattern?
...
I'm working on a WPF app with a ViewModel in C++/CLI, so it can use legacy C code. I'm having trouble exposing the namespace System.Windows.Input to the C++/CLI code and wondering if this is because WPF doesn't really support C++/CLI? Do I really have to insert a C# layer in order to implement something like Josh Smith's CommandSinkBindi...
I'd like to implement the ViewModel part of WPF's MVVM pattern without referencing WPF assemblies. The problematic part is command routing, which requires that ViewModels implement properties of type ICommand so that command bindings can work.
Now, I can avoid the ICommand and simply declare the properties as object. Everything still wo...
I have a "DataRegion" that is an ItemsControl.
I add ViewModels to it and through DataTemplating the views are rendered.
My question is that this ItemsControl now needs logic to do with setting up Commands in menus for the Items (they can't do it themselves as it the logic is dependendant on the number of items, i.e. there must be one i...
I have the following XAML:
<ListView x:Name="debitOrderItems" ItemsSource="{Binding DebitOrderItems}">
<ListView.ItemTemplate>
<DataTemplate>
<CheckBox x:Name="checkbox" Content="{Binding}" IsChecked="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListViewItem}}, Path=IsSelected}" />
</DataTem...
I'm using the article Model View View-Model (MVVM) in Silverlight as a basis to create my own MVVM example in Silverlight.
I've got all the pieces below:
main page (loads everything)
View (XAML file with bindings)
Model (a Customer class generating a fake List collection)
ModelView (inherits INotifyPropertyChanged and has the Property...
Hello,
I'm using MVVM pattern and I have string type property in my ModelView.
The string may contain following HTML tags:
<b>, </b>, <i>, </i>
I need to make certain parts of text in TextBlock to be in normal, bold or italic.
At moment I have created workaround, a helper method that works like this:
Breaks HTML string into parts...
Hi there,
Can anyone tell me if its possible (if some utility exists??) to create scaffolding taking into consideration MVVM with WPF.
My idea here is i seem to have a lot fo data access forms, and of course i would like to Customize them but initially i would like a quick way of providing the form i.e. ALL controls placed on them and ...
Hello,
I like MVVM pattern, once you start using it, you get addicted to it.
I know that in perfect world your View code-behind is almost empty (maybe some code in constructor) and every aspect of View is being manipulated from ViewModel.
But there are times when creating new fields, properties,commands in ViewModel creates more code ...
Assuming that you have two windows where one window has a listbox and the other window should have the detail information for an item currently selected in the listbox. In one window this is easy enough to do but how would one do this with two windows? Unfortunately, two windows is the only option here.
...
I had a question about the VM responsibilities when it comes to pop-ups.
When an app is popping a message box or some kind of dialog (with MVVM), the two options that we have are:
putting UI (ShowDialog()) code in VM which seems bad
have VM send some kind of event that UI can subscribe to and display a dialog in the code behind (but...
These two 1-hour videos show step-by-step how to use the MVVM pattern to build simple quiz applications in both Silverlight and WPF:
Implementing Model-View-ViewModel in Silverlight
Implementing Model-View-ViewModel in WPF
What amazes me about these is how different they are structurally, for instance, how they use DataBinding:
In th...
I have written a small helper for doing client-side change tracking objects/dtos to use in my ViewModels (see http://viss.be/2009/04/02/modelviewcontext-client-side-change-tracking/)
I didn't find a lot of resources about the subject. So I wonder; how do you typically handle it?
Thanks,
Marc
...
Hello,
I'm building simple dictionary application using WPF.
I'm using MVVM pattern, databinding and FlowDocument to display words to user.
UI consists of 2 controls: ListBox and FlowDocumentScrollViewer.
Dictionary data comes from XML file, format of this string may look like this
<b>Word</b> - Some description. Another <i>descrip...
In an MMVM application, how should exceptions be handled and bubbled?
If I get an exception in my model, during an Async callback, and throw an exception, this does not get bubbled to the ViewModel. I suspect that this is because the callback is not running on the UI thread.
What's the best practice for this?
Mark
...
I've got a small test WPF MVVM application working in which a view allows the user to change the first or last names of customers and the full name automatically changes, so communication is going from M-to-MV-to-V and back, everything is fully decoupled, so far so good.
But now as I look to how I will begin extending this to build larg...
I've tried to use IsolatedStorageSettings in my ViewModel, but these are not getting retained across browser refreshes (F5).
for example;
//look in the IsoStore for remembered details
IsRememberMe = IsolatedStorageSettings.ApplicationSettings.Contains(Constants.LOGIN_REMEMBERED_USERNAME);
if (IsRememberMe)
{
...
I'm looking for code of full applications that (1) use the MVVM pattern and (2) are approachable for WPF/Silverlight/MVVM beginners. So far I have only found:
Crack.NET - A runtime debugging and scripting tool (useful but quite complicated)
CipherText - WPF Password Manager (perfect but written in VB.NET)
What are some others?
prefe...