Hi Experts,
We are designing one form in WPF which will have 5 modes.
Now the question is that should handle these 5 modes in the same form by defining one form enum and manipulating the visibility of the controls. One thing to be noted is that as the mode goes on changing..complexity is going to increase for handling these modes.
No...
I have a datagrid with multiple columns. I want to use Interaction.Triggers as a means to fire off a particular method on the view model when only one particular column on the grid changes. How do I find the list of available events for that particular column.
I tried using Exp. Blend 4 but I could only see events for the entire datagrid...
In a WPF / EF4.0 / MVVM app I have a View that edits a Customer entity. What is the best way to set a property "bool IsCustomerInEditMode" in my CustomerViewModel short of acting upon OnChanging/OnChanged partial methods for every single individual property of the Entity? As far as I know there's no OnEntityChanging method...
Thanks!
E...
I am designing the architecture for a module where a search takes place.
the search takes some time, and I would like to have the UI to be responsive, so I get to delegate the retrieval of the data to a class that will do the search on a separate thread.
Then, I can think of two options :
either
1° : the search method returns a view...
I am using MVVM light with silverlight 4. I am using EventToCommand to get selected rows from the datagrid. However i am not able to do it in reverse way i.e. from some defined value say 2 in view model how can I ask to place selection to row no 2 in the datagrid on view?'
My scenario I am using it for inserting new data in database. Fr...
I am currently designing simple editor as part of learning process. Its basicaly hierarchical tree structure of polygons-lines-points, that is implemented in data model. I need to display these data in two views
First view: hierarchical data in tree view item
Second view: rendered geometry on screen
Following the MVVM pattern i have ...
Just a quick pre-emptive question before we start to seriously investigate using Lucene.
Currently building a C# WPF application, using MVVM and Microsoft Entity framework. My lead has brought up the point that this might represent a problem with us not being able to let Lucene directly access the database, and therefore there might be ...
I am learning wpf mvvm and have been struggling with what I feel is probably simple but have not been able to resolve on my own.
What I want is to be able to select an item in a populated combobox and then populate another combobox based on that selection. I can't seem to get the second combobox loaded in response to a selection.
I'...
I'm currently having some trouble with an MVVM WPF application. In the application, the ViewModel is associated as the DataContext for a View using a DataTemplate in a ResourceDictionary - this way neither object has an in-code reference to the other. My ViewModel has an unmanaged resource which needs to be released when my ViewModel is ...
Hi,
I want to bind an enum which has flags attribute to a listbox with a check list box item template in mvvm pattern? How can I do this?
[Flags]
public enum SportTypes
{
None = 0,
Baseball = 1,
Basketball = 2,
Football = 4,
Handball = 8,
Soccer = 16,
Volleyball = 32
}
<ListBox Name="checkboxList2"
...
Project Overview
Basically I was creating WPF application using MVVM pattern. However I had a thread which was updating my Data Model, so ViewModel, had to be notified about these changed and I needed a Notification mechanism in my Model. That would make my app make propagating notifications from one class to another, so I decided to Ha...
In my viewmodel, I have a list (ObservableCollection) containing items. In the view, this list is displayed in an ItemsControl. In each row, there is a "Delete" button. I want the command behind the button to remove the item from the list.
<ItemsControl ItemsSource="{Binding myList}">
<ItemsControl.ItemTemplate>
...
...
First of all, I am new to the Silverlight + MVVM world. So I will try my best to explain the scenario to you guys.
I have the following AutoCompleteBox in my Silverlight 4 application which works perfect.
<myControls:AutoCompleteBox Name="acbVendorID" MinimumPrefixLength="2"
ItemsSource="{Binding VendorCodes, Mode=TwoWay}"
...
I'm using Fluent ribbon in a MVVM application. For each tab item I associate a view and a view model (set a new DataContext). How can I change the view and the view model (DataContext) each time when the selected tab item is changed ? It would have been nice to have an event that fires each time a tab item is selected, like Microsoft Rib...
I'm using a DataTemplate to apply a View to a ViewModel. I have a case where when a certain thing happens in one instance of the View (DataTemplate), I need to take an action in all other instances.
I'm already accomplishing this by implementing the Initialized event on one of the controls in the DataTemplate, and using that event to a...
MVVM pattern is implemented in my Silverlight4 application.
Originally, I worked with ObservableCollection of objects in my ViewModel:
public class SquadViewModel : ViewModelBase<ISquadModel>
{
public SquadViewModel(...) : base(...)
{
SquadPlayers = new ObservableCollection<SquadPlayerViewModel>();
...
...
Im working with the MVVM pattern + a simple ServiceLocator implementation, now to my problem how am i supposed to setup the services when the views are running in design time?
Iv tryed this but it does not seem to work in VS 2010 or some thing, i know it worked on my old computer but on my new it does not. so does any one know a good al...
I'm using the ICommand interface to perform binding on a couple of buttons in my application, the Run and Close button. I'm using a helper method that was mentioned in this question to hook up the ICommand to a delegate as follows:
_someCommand = new DelegateCommand(this.DoSomething, this.CanDoSomething);
private ICommand _someCommand;...
Recently, I realized that MVVM pattern is so useful for Silverlight application and studying how to adopt it into my project.
BTW, how to hook up the textbox's textChanged event with Command? There is Command property for Button, however Textbox has no commapd property.
If Controls don't have command property, how to combine ICommand an...
Hi,
I have an entity class. This entity has lots of properties and entity's data is shown to the user in several tabpages of a tab control. I also implement mvvm approach.
When the screen is shown to the user first, I want to bind only the active tab page controls and when the user navigates through tab pages seperate bindings will b...