I'm creating an WPF application using the MVVM framework, and I've adopted several features from Josh Smith's article on MVVM here...
Most importantly, I'm binding a TabControl to an ObservableCollection of ViewModels. This means that am using a tabbed MDI interface that displays a UserControl as the content of a TabItem. The issue I...
Keeping in mind what CannibalSmith once said - "All the answers are saying "WPF is different". That's a huge understatement. You not only have to learn lots of new stuff - you must forget everything you've learned from Forms. It's a completely new way of doing UI."
.. and having many years of experience with visual Windows desktop appli...
Hi all, I am new in the Wpf & Mvvm world , but I have found a couple of examples and just found that there is some different way to instantiate the model. I would like to know the best/correct way to do it. both ways are using Unity
What I've foud:
var navigatorView = new MainView();
navigatorView.DataContext = m_Container.Resolve<INav...
I am porting a GDI application over to WPF, where I displayed several dozen images onto Form, then drew polygons, circles, rectangles, etc over the top of these images using GDI Pens and Brushes.
I'm starting to get the hang of WPF binding and would like to store all of these images and markup graphics in my ViewModel.
My VM contains a...
Hi,
I'm writing an application in wpf that uses MVVM. I wondered if I could use ado.net entity data model as a model in MVVM? Is it the same? If not, why?
Thanks for any help.
Regards,
Ev.
...
Hi,
I have a main window and many user controls that I want to show/hide depending on the user choice. For example there is a user control called Customer that should get all the customers from a database or a user control that is a form to sign up for a service. And so on. Each of this controls have viewmodel that should get the data fr...
How do you build WPF MVVM applications and user controls test-first?
I find myself writing ungodly amounts of XAML with DataTemplates before I even get to unit-testing my viewmodels. Should I develop the whole viewmodel system first before even writing XAML for it?
Any help appreciated.
...
Like any MVVM WPF app I have a handful of view models. Each has a few commands. My view implements a Fluent UI (Office ribbon) so there are some items that light up based on the context of the application. The ribbon is a child to the main application.
The basic structure of my app is that it manages a COURSE. A COURSE has multiple MODU...
I am using Prism for a new application that I am creating. There are several lookup lists that will be used in several places in the application. Therefore it makes sense to define it once and use that everywhere I need that functionality. My current solution is to use typed data templates to render the controls inside a content control....
So how do you display complex aggregated ViewModels whose Models have relations to each other?
NO wpf disciple ever spoke about that, guess why its not possible...
Do you think thats true?
Don`t understand me?
Look: A CustomerViewModel has many OrderViewModel and those many ProductViewModel.
You have 3 Workspaces to enter the new d...
I am working on Silverlight 3.0 and currently using code-behind in my Views. I would like to implement the MV(VM) pattern into my project as the project is growing. I have seen some WPF projects where the code-behind has NO CODE except for the InitializeComponent method, which I believe is the right way to go and just looks clean. Is ...
When I'm designing multiple views under the MVVM pattern, does each view get its own ViewModel or do they all share the same one? I understand that this is ultimately a flexible decision, but what is the best practice?
My gut tells me to have a ViewModel for each view (i.e. each separate UI window). All of the blog examples of MVVM sh...
As I implement the MVVM pattern with WPF, I'm finding that Resharper is often warning me that certain properties are never used in my ViewModels. The problem is that they are being used, but only by the data binding system. Has anyone else encountered this annoyance and is there a way to help Resharper realize that these properties are...
I'm using trying to implement MVVM in my app. I have a MainWindow.xaml and a MainWindowViewModel. I'm in the process of removing all of the code-behind code from the MainWindow.xaml but I'm stuck on one final piece.
In my pre-MVVM setup I started an animation in the MainWindow.xaml.cs that would fade out the form before closing it. ...
Hello!
in my MVVM application (in wpf)
i have two view and I want to bind the context of my label on my textbox value (in the other view)
SelectorView.xaml contain this control:
<TextBox x:Name="tbArt" value="XX"/>
DescriptionView.xaml contain this control:
<label context="{binding on the tbArt value????}">
Is that possible directly ...
The Navigation framework in Windows Mobile 7 is a cut down version of what is in Silverlight. You can only navigate to a Uri and not pass in a view. Since the NavigationService is tied to the View, how do people get this to fit into MVVM. For example:
public class ViewModel : IViewModel
{
private IUnityContainer container;
priva...
Is orthodox MVVM implementation pointless? I am creating a new application and I considered Windows Forms and WPF. I chose WPF because it's future-proof and offer lots of flexibility. There is less code and easier to make significant changes to your UI using XAML.
Since the choice for WPF is obvious, I figured that I may as well go...
I'm using the MVVM pattern to create a WPF standalone application. My program compiles in Visual Studio 2008, but I frequently get warnings in the editor for my DataTemplates.
In my MainWindow.xaml, I've defined the following DataTemplate:
<DataTemplate DataType="{x:Type ViewModels:TagViewModel}">
<Views:TagView />
</Da...
I've got a button in a ribbon I've implemented and having trouble binding to a command. The ribbon is in a UserControl named AppRibbon. The AppRibon control has a public property called SelectedModule which has a property named RenameModuleCmd. When I create an event handler for the button, i call the command explicitly to make sure ever...
I'm using constructor dependency injection in my WPF application and I keep running into the following pattern, so would like to get other people's opinion on it and hear about alternative solutions.
The goal is to wire up a hierarchy of ViewModels to a similar hierarchy of Models, so that the responsibility for presenting the informati...