I have datepicker on my window and want to achieve simple behaviour: when user clear datepicker's text set datepicker date to Today XAML: <DatePicker SelectedDate="{Binding DateFrom}" Width="150" Margin="0,20,0,0"></
I'm beginning with MVVM in order to well separate logic code from the view. But I have some concern about where to put the progressHUD related code when tapping a button that makes a request. Before, I used to do that: //Before @IBAction func startRe
The application I'm working on uses a DataGrid to present entries to the user and these entries are grouped. The grouping is not tied to a single property of each entry, a single entry can be in multiple groups. The user is able to create groups at w
I have a class(A) that has a struct variable (S). In one function of this class I call a mutating function on struct variable,this function takes a closure. Body of this closure checks the struct variable's name property. Struct's mutating function i
I am working on a WPF application and i have a textbox bound (bidirectionally) to a property in my view model. I am trying to prevent a user from typing more than 100 characters into this textbox (this is the max the database will store) so i have wr
I have a MVVM application and I am trying to make filtering through LinQ work on my ObservableCollection that is gotten from database based on Entity Framework. In View Model I have this: public class MenuListViewModel : BaseViewModelCollection<Menu>
I'm considering using VueJS for a multi page website. In the official example of routing, they show that you can dynamically change the template and component based on the URL, but they still have all the HTML templates and JS components in one file
im trying to bind the width of a button and a TextBox to the width of a column they are in. Additionally i want to change the visibility of the whole grid. I set visibility to "Collapsed" and in the code behind file i change the visibility to vi
I'm using "Simple MVVM Toolkit" (MVVM noob here) to develop a C# WPF app. I have a model class called A: public class A : ModelBase<A> { //properties, constructors, methods.. } ..and another model class called B which inherits from A but e
I have a DataModel and a ViewModel working successfully together with my xaml view. In the view I use databindings. In my DataModel I have some properties like Distance declared as int. When displaying the values in view, I want a formatting like add
I have a function I would like to run on after update of a lot of different text boxes, is it possible to listen for a generic after update event rather than the specific events? So rather than 100 individual calls to the function, just one listener?
I have 2 combo boxes, one that contains a list of 'Items' and another that contains a list of 'Subitems'. The list of Subitems depends on the currently selected Item. I've got most of this working (by binding the ItemSource of the Subitems to a Possi
I have a specific situation in my code where it would be very good to do something like this (pseudocode): aView = new View(); aView.Show(); doSomething(); and I want the "doSomething()" to run only after the "aView" window closes. Is
I want to be able to display and change the values of ObservableCollection<> in UI. Does it possible? I display it with ListView but I can't change them.You could use a DataGrid instead of a ListView. DataGrid allows cell edition.
Premise: I'm new with MVC, and my english is not perfect, I hope you'll understand my post, otherwise I'm here for explainations. I'm working on a project created by another developer in ASP.Net MVC and I have this problem: In a View I have two casca
Tried all the solutions for similar issues around here, still no go. I have a ComboBox that should work for selection of existing items and/or for adding new ones. Only the selected item part works. Category is just an object with a Name and Id. Than
Is there any standard method for showing dialog windows, opening and closing them and retrieving data from them, using the MVVM pattern? I have seen this:http://www.daedtech.com/mvvm-and-dialogs I want use for show a dialog for special (View/ViewMode
I would like to bind a checkbox list to a collection of enum values in WPF. The enum is not [Flags]. Context: It is for filtering a datagrid, in which each item has a instance of my enum. It doesn't necessarily need to bind to an List, a fixed size c
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
I reproduced this issue in a pretty simple .NET 4.0 test project. Using MVVM, I have a view with a user control on it. When the user clicks a button, I need to replace the user control's data context so it points to another instance of the same class
I'm trying to write a program that uses tabs to hold different usercontrols. What I currently want to happen is the user clicks a find button, a new tab is created, and a find screen appears inside it. Using the find screen the user can select client
I understand MVVM's usefulness in the context of a large team developing a shrink-wrapped application over a long period of time. But in the context of an internal LOB application, MVVM seems overkill and I'm having trouble swallowing the overhead of
I bind observable dictionary from view model to view. I use Caliburn Micro Framework. View: <ListBox Name="Friends" SelectedIndex="{Binding Path=SelectedFriendsIndex,Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" SelectedItem=&q
I have a XAML with about 100 controls. All of them are bound to class Student. I can validate such pool like Age, or Name, but how to validate controls,which user not even touch ? For example for field Address. Address couldn't be null, but user forg
I am new in the Wpf world, so I created a couple of views and all of them have at least one ComboBox, as I am using the MvvM pattern, I get my self re-typing all the time the same line of codes to fill the Combo and to get the SelectedItem (creating
Perhaps I have been doing Flex development with Frameworks like Cairngorm too long but I still don't get MVVM. I am aware that Cairngorm is a framework and MVVM is a design pattern, but what I am comparing here is Cairngorms implementations of design
Ok this may be really simple but everything I try just seems to hit a brick wall. I have a view model with two properties, which are bound to my WPF form: bool IsWorking {get;set;} ObservableCollection<OtherViewModel> PendingItems {get;set;} I have
What are the responsibilities of one vs the other? What kind of logic should go in one vs the other? Which one hits services and databases? How do I decide if my code should go in the viewmodel or the controller? for the record, I am using asp mvcIt'
I am building an wpf app using MVVM. I have viewModels the employ lazy loading like below: public class AssignmentsViewModel { List<AssignmentViewModel> _Assignments; public List<AssignmentViewModel> Assignments { get { if (_Assignments == nul
Why not use partial class to build the ViewModel? Since the definition of viewmodel classes have some definition of the data classes of datamodel, why not try to reduce some work, extending or making partial classes of the datamodel, completing them