Hi
I have a largish application that uses MVVM. The Model is mostly in a C++ DLL. The ViewModel is in C#, and I've tied my WPF controls to the ViewModel in the usual way.
The app is ready for integration testing. I can drive tests from within the application, but I'd like to move testing out into another process so I can minimize pollu...
I have 18 Buttons within a Uniform grid on my main WPF window. I need to modify many of the Button's Properties and Command both when the program loads and during operation. In other words, when the program first starts, a configuration is selected that affects the layout. Later that could change further depending on how the program o...
I'm using C# and Caliburn.
Is there a global way to catch all exceptions in all view models?
What about when there is some kind of exception during import from a DI/IoC container?
I basically want to display a message box when this occurs.
The RescueAttribute looks to me like it would have to be put on every single view model class...
Hi
I am using MVVM light to bind events on UIElements in my View to ICommands in my view model, and this is working very well.
However - I have a situation where I have to create some controls on the fly, and I'm doing this in the code behind on the view as this seems the best place to do it, and it is after all UI code. As I am genera...
In WindowViewModel
There is a property called statusBar
In StatusBarViewModel , There is a property called
public BatteryIndicatorViewModel batIndicatorViewModel
In BatteryIndicatorViewModel , There is a property called
public bool IsLowBattery
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding statusBar.batIndicatorViewModel....
Do you think it is alright from architectural stand-point to have ViewModel - View without model for temporary things?
E.g.: I want users to input some paths so I can open some files later on. It doesn't make sense for me to store the paths anywhere just ViewModel and when the users clicks "Show all files" I then construct models of the...
I am doing a silverlight using the MVVM model, and i am finding it hard to do the events handling via MVVM especially that the events handlers are doing lots of changes in the view like enabling and disabling buttons, update media element functions and position. I am still new to the MVVM and i can't Imagen how can i do this. does anyo...
I really wonder what I can put in the ViewModel.
If its needed to be tested might some say...
But when the properties like CaretPosition (to get the selected Text) are no dependency
properties, then better forget about the ViewModel.
At the moment I have this in the codebehind:
private void rtbContent_SelectionChanged(object sende...
I am using a dependency property to show a window, on double click of an item.
not sure whether it is a specific bug with WPF or I am doing something wrong.
If I double click even on the scroll bar or on the column headers.It triggers the double click command.
have tried a solution at ths link
http://stackoverflow.com/questions/2485...
I'm building a small timing application using the MVVM pattern, using entity framework for persistence. At this stage, my logic is pretty thin, as I only need to perform a few calculations and aggregations on related data. At the moment, I have implemented these by writing them in a partial class of the entity class.
For example:
// en...
Hi guys,
I am using MVVM light toolkit in my wpf application. I would like to know what is the best approach for opening a new window from an existing window. I have got this MainViewModel, which is respnsible for MainWindow of my application. Now in the MainView, on a button click, I would like to open a second window on top of it. I h...
Well im trying to create a custom container class that contains in my case ViewMappingEntry's, so i created a class that inherits Freezable and implements ICollection.. but when creating an instance in Blend and browsing it i get this error: Cannot add content to an object of type 'ViewModelMapping'..
Note: It compiles fine and i get no...
I have an application that has a top level navigation menu which consists of series of buttons within a stackpanel. When a user clicks on a button the view model processes the command and updates the value of CurrentView (type UserControl). The CurrentView is bound to the element ContentControl as below.
<ContentControl Content="{Bindin...
Hi,
I'm sure this is a pretty common scenario, and I would like to know how MVVM developers tackle this.
I have a ViewModel that is instantiated on demand, and persists until it is explicitly removed by the user. It's corresponding View is loaded onto the UI on demand. The View is able to unload and it's ViewModel may still exists in t...
Let's say I have an app and a web site using the same database. I wan't to create a Data layer and some model objects. In many cases the model objects uses alot of info from some of the database tables.
My idea was to wrap the LINQ to SQL entity class for the table inside the view so I won't have treate the properties again. I was wonde...
Hi,
I want to write a Detail(Info) screen with MVVM pattern on my framework. There will be a base detail view model and view which has a toolbar and buttons on this toolbar(save, delete, new buttons, etc.). And users of this framework are going tor write his/her detail(info) screens without using manually added toolbar. Their detail(inf...
I'm trying to change the background of certain items in a combobox that meet a condition
<ComboBox ItemsSource="{Binding Path=Model.Names, Mode=OneWay}" SelectedValue="{Binding Path=SelectedCompanyName}" DisplayMemberPath="Alias" />
The thing is that "Alias" is saved in two different places (in company and in order) and if they dont m...
Hi,
I'm using MVVM and the model has password field. From what I've found on web, when handling this password you must implement custom class for binding and use PasswordBox. I think this is overhead. Could you point me to a better way to using the add/edit usercontrols connected to a viewmodel with password?
Thank you
...
Hi!
I have searched the net for a way to access an object/property within a UserControl. I have a Page object in my view in wich i load a usercontrol:
<UserControl:RichTextEditorControl Height="350" />
How do i access an object/property which resides in the viewmodel of my view from my usercontrol? To put my problem in practice: i h...
I have been building an application, which uses the LoadOperation's Entities to return an IEnumerable which becomes the source of a CollectionViewSource in my View Model. I am now discovering the potential pitfall to this approach, when adding Entities in my Silverlight client, I cannot see these entities, unless I either submit the New...