.net - MVVM Design Consideration

Feb 3, 2011

I am currently developing a new WPF application and have the majority of my business logic layer developed (ie my Models). I am about implement ViewModel classes to represent one feature of my application. I am quite new to the Model-View-ViewModel pattern and I have a question about which approach would be best to use when implementing my ViewModel classes.

[Code]...

View 3 Replies


ADVERTISEMENT

.net - VisualStudio Projects: Modifications Are Not Taken Into Consideration?

Jan 24, 2012

I have (between others) 2 projects in my solution: one WinForm project, that defines a Form (say, MyFormProject), and other a UserControl (MyControlProject).When I modify MyControlProject's code and launch the debug, I see that any modification is not taken into consideration. I need to clear the solution, rebuild, for make it work...

Additional info: I use in the UserControl the Dbi-Tech Components. Also, in the WinForm I use Infragistics components. Are both license files compatible, cause seems that both should user licenses.licx file?When I wrote a new method in the Control, I got a MissingMethod exception in runtime, however, the code compiled without any error.Then I removed the references, re-added them, and the exception in runtime didn't appear.

View 3 Replies

Looking For Tutorial On MVVM Using WCF And WPF?

Mar 14, 2011

I'm wondering if someone can point me towards a good article/tutorial explaining how to use the MVVM pattern in an WPF Application that uses WCF web services. My WPF client calls a service reference to get data objects that contain data from the database but from everything I've seen and read so far about MVVM I am still not clear on how to use MVVM to work with the data objects I am retrieving from the WCF services.

View 1 Replies

WPF & MVVM: Any Examples Using VB?

Sep 26, 2009

Almost every example of MVVM I found is coded in C#, are there any examples/tutorials coded in VB.Net? I'm having a hard time translating C# to VB.Net since I haven't really used C# in any meaningful way...Also, does a MVVM Template/Toolkit for VB.Net exist yet?

View 4 Replies

C# - Reusing A Menu With Mvvm And Wpf?

Jun 7, 2011

I was wondering what the best approach is for sharing a menu across all wpf windows/views. My Application doesnt really fit the navigation model, so will probably use a Ribbon control. I am leaning towards creating a user control for the menu and dropping it on each view, but have also seen Josh Smith's msdn article, where he loads user controls.

View 2 Replies

Implementing MVVM In Silverlight?

Nov 11, 2009

IM Looking at Implementing MVVM in Silverlight.Kind of new to Silverlight and I'm Definately new to MVVM Pattern.I get it all But I want A set of small Prism VB.Net MVVM exmaples if that makes sense.

View 1 Replies

C# - MVVM ViewModel Default Constructor?

May 25, 2011

I have been getting up to speed with the MVVM pattern in Silverlight and was wondering how to implement binding from the View to the ViewModel when the ViewModel constructor has a parameter if an interface type.If I bind the viewmodel to the view in XAML then you can not use a parameterised constructor. Given that I was creating a default constructor passing an instance to the parameterised constructor but this breaks the abstraction.

View
<navigation:Page x:Class="QSmart.DataViewer.Report.RecentFailures.Report"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

[code]....

Is it recommended to use the code behind of the view to pass into the parameterised constructor and then bind to the viewmodel?

View 1 Replies

Implement A Constructor In MVVM Unity?

Feb 28, 2012

I have just started using MVVM design pattern with unity and I'm strugling to work out how you add a constructor.my code currently works if I comment out my constructor that requires input the view gets added to the shell.

Protected Overrides Sub ConfigureModuleCatalog()
MyBase.ConfigureModuleCatalog()
Dim moduleCatalog As ModuleCatalog = CType(Me.ModuleCatalog, ModuleCatalog)
moduleCatalog.AddModule(GetType(GridModule))
End Sub

how do I pass in variables into my GridModule ?

View 5 Replies

Way To Requery CanExecute In Silverlight MVVM?

Mar 22, 2011

I have a simple LoginForm.Here is how the code-behind looks like:

Private Sub btnLogin_Click(sender As Object, e As RoutedEventArgs) _
Handles btnLogin.Click
If Me.loginForm.ValidateItem() Then

[code].....

View 1 Replies

WP7 MVVM - Call Me.setfocus() From The ViewModel?

Apr 15, 2012

I'm attempting to improve my MVVM abilities in my next WP7 App (which is written in Vb.NET). I have a textbox that has been given focus and has a WP7 keyboard displayed. I am using command binding and a xyzzer's bindable Application bar (which is excellent).[URL] I want to be able to cancel the focus of the TextBox from the ViewModel, by setting focus on the form. Normally (Non MVVM) I would do this from within the form by calling:

[Code]...

View 3 Replies

Wpf - Bind A DataGridComboBoxColumn To EntityFramework Using MVVM?

Feb 16, 2012

I'm trying to get a DataGridComboBoxColumn working with my ViewModel. Everything appears to work correctly but when I change the value of the combo box, the entity isn't changed. The datacontext of the window has these properties:

[Code]...

View 4 Replies

Css - Design A Webpage In Asp.net Design View Which Support Multi Resolution?

Nov 26, 2010

I have created my webpage in asp.net in 1024*768 resolution, my problem was that when i change my monitor resolution then the controls in my webpage will be displayed in unmanaged manner .

How to arrange items in my webpage which support multiple resolution ...

Whatever the resolution of my monitor the controls in my webpage will display as it is as managed in 1024*768 reolution !

View 1 Replies

Form Design - Cannot Expand Vertically In Design View

Jun 27, 2011

I seem to have reached a limit on the size of the form. I cannot make the form longer and I need to add more fields. Is there a limit on how many fields can be included in a form?

View 1 Replies

.net - Pieces Required For A Usable MVVM Framework?

Sep 17, 2010

As my company migrates towards the .NET framework from VB6, it looks like we are going in the direction of WPF (my boss is in love with the Office-style Ribbon control). I've been working to mock one of our VB6 applications in WPF and decided to experiment with MVVM at the same time. I'm being discouraged from using an existing MVVM framework, so I guess I need to write my own. The biggest concern right now seems to be a method for registering and managing all my views from a central spot - a manager class - but I'm not exactly sure how to implement this.

View 4 Replies

Implement Extensive Data-Validation In MVVM?

Jul 14, 2011

Possible Duplicate:How can I handle a Validation.Error in my ViewModel instead of my View's code behind?The usual examples of how to use Data-Validation in WPF usually only involves defining an error template for the control and displaying the error message in the control tooltip. What I want to do is to create a collection of all ValidationErrors, display it in an ItemsControl to the user and focus the invalid control when the user clicks on the associated (error) item in the ItemsControl.

View 2 Replies

Wpf - Bind To SelectedItems From DataGrid Or ListBox In MVVM

Mar 26, 2012

SEE MY ANSWER AT THE BOTTOM Just doing some light reading on WPF where I need to bind the selectedItems from a DataGrid but I am unable to come up with anything tangible. I just need the selected objects.

[Code]...

View 3 Replies

.net - Call Winforms-style Invoke/Delegate From MVVM?

Oct 12, 2010

I'm hacking away at some code which seems to have been started, at least in theory, as an MVVM project in Expression Blend, by my predecessor at this company.

I've got a thread running in the background, which is running some operations on items as they happen. In order to prevent any clashes, I've also got that thread running any operations my users call for.

Once those operations are completed, I'd like to bring up a MessageBox to give a summary of the user-initiated operations, but now that they're running off in their own thread, the finishedProcessing event handler is now running on the background thread instead of the interface thread and it's causing my MessageBoxes to appear non-modally.

Back in the WinForms days, I'd have handled that using InvokeRequired, Invoke and a Delegate. I've read that this has been replaced by something called "Dispatcher", but the ViewModel class I'm using doesn't seem to have a Dispatcher object.

The "thisViewModel" class I'm using inherits a class called "WorkspaceViewModel", which inherits "ViewModelBase", both of which look generated to me...

where I can link up to this "Dispatcher" from here?

View 1 Replies

.net - Loading And Saving Data In WPF Using The MVVM Pattern And DataGrids

Jan 4, 2011

How do i fill my ObservableCollection(of Monitors) with data so that I can save it in an MVVM friendly manner. I normally use a FileNumber to load a DataSet using a DataAdapter and pass the monitors table via monitorDT - should I be loading it differently? How do I save the changes? Right now I have the following for loading data:

[Code]...

View 1 Replies

.net - Loading And Saving Data In WPF Using The MVVM Pattern And DataGrids?

Jan 13, 2011

How do i fill my ObservableCollection(of Monitors) with data so that I can save it in an MVVM friendly manner. I normally use a FileNumber to load a DataSet using a DataAdapter and pass the monitors table via monitorDT - should I be loading it differently? How do I save the changes?Right now I have the following for loading data:

Public Class Monitors
Inherits ObservableCollection(Of Monitor)
Public Shared Function LoadMonitors(ByVal monitorDT As DataTable) As Monitors

[code]....

View 3 Replies

.net - WPF MVVM Implementing The Viewmodel To Reflect The Base Model?

Jul 4, 2011

Something that has been confusing me for a while now with WPF MVVM is for example, when I have a base model containing nothing but a few properties and some validation code and I then build a view model around this base model, how should the view model be structured.

For Example:

Base Model ->
Imports ModellingHelper
Imports FTNHelper

[Code]....

What I am wondering is, if there is a better way to structure the view model to improve data binding, so I don't have to bind to Source.Name etc. How should I handle the base model in the view model?

View 2 Replies

C# - Tab Data Lost On Selected Item Changed MVVM?

Mar 23, 2012

I have been trying to do this for ages and having no joy whatsoever.

I have a ribbon window of the following hierarchy:

MainWindow
MainContent (Tab Control)
TabContainerViewModel
ViewModelBase

View model base has an ObservableCollection of tabs type ViewModelBase. The Tab Control itself is binding fine to these, displaying appropriate view models. I have 2 problems however, I want a "NotepadView" (Of type viewmodelbase) to be replicated numerous times (one view many view models).

At the minute, I have 4 views (NotePadViewModelx where x is 1-4) with corresponding viewmodels, this is because each view had the same text per tab. Now I have individual views per tab.

When I type into tab 1 and switch to tab 2, I lose what I typed in tab one when I click back.

View 2 Replies

Update Records In MVVM Pattern For Maximum Efficiency?

Mar 14, 2012

This is more a conceptual question. Here is my current predicament; I am writing a vb.net WPF application and using the MVVM pattern (love it! maintainability is just amazingly awesome). Currently all the code is written by hand and there is no use of NHibernate or Entity Framework as the backend is an access database (due to policy I cannot use NH and EF doesn't support JET Databases, we may switch to MSSQL at some point but that may be a while from now).[code]...

View 1 Replies

Way To Execute A Command If KeyDown-event Is Fired In WPF MVVM?

Jun 9, 2011

i want to execute a command if the KeyDown-event occurs. This command should only be fired if the Enter-Key was pressed.

View 2 Replies

Wpf - Drag And Drop For Listbox From Scratch MVVM Using ICommand?

May 4, 2012

Without using MVVMLight, I need to implement drag and drop for photos onto a listbox using mvvm using Icommands preferably and interaction triggers, however if i use commands then I don't know what to pass in for a command parameter? Any ideas? Thanks.

Heres some ideas I tried:

Public Property ImageList As New ObservableCollection(Of ListBoxItem)
Public Property AddImageCommand As ICommand = New Adjuster.DelegateCommand(AddressOf addImage)
Public Property DropCommand As ICommand = New Adjuster.DelegateCommand(AddressOf dropImage)

[code]....

View 1 Replies

C# - Design Reference And Object Oriented Design Of A CRM

May 25, 2011

I searched codeplex and google. I have found so many such as tustena but unfortunately they are not domain driven based and in these solutions I could not find a good modelling documents or references. i am a newbie in CRM but I am sensetive to design it with solid object-oriented fundamentals. Any reference or open source solution especifically for CRM design and implementaion in .NET? Cheers

View 1 Replies

.net - Adding A Record And Updating UI - MVVM Pattern - DataGrid As Master, Other Controls As Detail?

Jan 4, 2011

I have a Master List in the DataGrid that displays all the "Monitors" - think of them as Audits (for context). Basically when a user clicks on a row in the DataGrid the TextBoxes, ComboBoxes, CheckBoxes and DatePickers all show the values and the user can edit them there and that all reflects in the DataGrid just fine.How do i go about using the same TextBoxes, ComboBoxes, CheckBoxes and DatePickers to add a new record?

<Monitor.VB>
Public Class Monitor
Public Property MID As Integer
Public Property FileNumber As String

[code]....

View 2 Replies

Wpf :: New To MVVM - Separating Data Processing Thread And UI Thread?

Mar 29, 2010

I have a program that tracks packages. Shipment and package entities are persisted in SQL database, and are displayed in a WPF view. Upon initial retrieval of the records, there is a noticeable pause before displaying the new shipments view, and I have not even implemented the code that counts shipments that are overdue/active yet (which will necessitate a tracking check via web service, and a lot of time).I have built this with the Ocean framework, and all appears to be doing well, except when I first started my foray into multi-threading. It broke, and it appeared to break something in Ocean... Here is what I did:

Private QueryThread As New System.Threading.Thread(AddressOf GetShipments)
Public Sub New()
' Insert code required on object creation below this point.

[code].....

View 1 Replies

Design An SMS SENDER Using VB .NET?

Jun 6, 2009

I'm new to VB .NET. I would like to design a sms sender application which could use internet connectivity to send messages to any mobile number. Should I use any messaging APIs? Where should I start?

View 1 Replies

Asp.net - Design A Game Web App?

Jun 21, 2009

i know vb.net, but have had no experience at all with web programming. i need to make a web app that can run in a browser where there is a board game and pieces that you can move around. can someone help me get started? are there any examples in asp.net?

i need something like this:

[code].....

i don't know what language this is built in, but i would much prefer vb.net. i would like the pieces to be pictures instead of text.

View 5 Replies

Cost Of VB Or Web Design?

Mar 14, 2010

I need to know basic compiter skills,abbreviations ,what is aC++ and so oncan I get that here or would I be better off at a Technical school?

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved