mvvm

  1. E

    pass binding info to another window

    Good afternoon i have a login system that does not use sql it uses a php database on my webserver, what i am trying to sort out is logging in managed to do that fine, but i am trying to retrieve the login information ( aka username ) from the txtbox in wpf and when user logs in it displays...
  2. F

    ICommand interface CanExecute method question

    My program is based on the MVVM structure. In essence the click of a button kicks of a series of calcs with the answers displayed in textboxes. Button is bound to a property of ICommand type in the ViewModel. I currently have: public bool CanExecute(object parameter) {...
  3. TB007

    Question How to iterate through WPF datagrid columns following mvvm pattern?

    I want to iterate through a datagrid header column and get its values to a variable, something like foreach (DataGridColumn column in gridView.Columns) { var cell = column.Header.ToString() } How can I do this following mvvm?
  4. TB007

    Resolved How to get the sum value from the selected rows of a datagrid(specific column) following mvvm ?

    I have a Employees model with properties private int _id; public int Id { get { return _id; } set { SetValue(ref _id, value); } } private string...
  5. S

    Resolved Help make this converter work, please.

    I have never used a converter until I tried today and I didn't get it right. public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { StopBits sb = (StopBits)value; string stops = string.Empty...
  6. S

    Responding to context menu.

    I have a context menu in a view that calls the correct handler, but the command parameter is not being passed. <TextBlock DockPanel.Dock="Left" Margin="0,3,1,0" VerticalAlignment="Center"> <TextBlock.ContextMenu> <ContextMenu>...
  7. TB007

    Question Why is my view not updating after Add/Delete operations on database?

    I have a fairly simple WPF app which primarily has 2 datagrid's in two different tabitem's. The datagrid in 1st tabitem has the itemssource PendingBills which is an ICollectionView and it shows some filtered data as per some basic logic The datagrid in 2nd tabitem has the itemssource AllBills...
  8. D

    Best way to add items from a database to both a combobox and datagrid in WPF...

    Hi, I'm totally new to MVVM pattern in WPF and even after going through a lot of posts and tutorials on the internet still struggling to fully grasp it. Anyways, here is what I'm trying to do, I have a SQLite database table with multiple columns. When I run the WPF app I want to fill a datagrid...
  9. S

    Resolved Process of Building Web Apps

    Hi everyone, I would like to build a menu display system for tablets(no ordering feature). I have defined some endpoints for my API and it works (I'm using .NET Core and PostgreSQL) There are three main projects in a solution I guess: - Frontend for customer (Angular v13) - Backend for...
  10. J

    Filtering data grid causes UI freeze

    Hi, I have a small WPF application which gets some data (~300 rows) from an API and gets displayed in a DataGrid. Up to this point everything works well. Some Header-columns of the DataGrid have nested textboxes, which should serve as search-boxes. I bound their text to a property in my...
  11. S

    I cann't find the error. The first two usercontrol view with combobox is ok, but not the last two.

    Hi, I'm doing my project and I have now in several hours looked at it but cann't finde the error. I have 2 views 1 view is normal mode, where there is a combobox where it should be updated when choosing the tabItem is chosen. 2. View is new (creating a new item). Here is also a combobox with...
  12. destro

    Resolved How can I notify source property about the changes made in Wpf DataGrid?

    I have a Datagrid bound to Datatable through Dependency property. I am unable to retrieve changes I make in datagrid even when I have set binding mode as two way. What are the best possible ways to update changes back to Source DataTable when dataGrid is edited? I know I can use...
  13. D

    MVVM approach advice needed

    Hello, I'm a beginner in MVVM, and WPF. My boss asked me to port a winform application in WPF; Basically it have an interface with docked windows (like VS), where each window display some data( loaded from a file) in different way: simple chart, tables, 3d chart, raw data ecc(should be 6...
  14. J

    Where to keep authentication session state?

    The Solution of my application contains multiple projects. Project for the View and ViewModel layer (the UI layer). Contains (custom/user)controls, commands, converters. And it also contains "stores" that keep state of the application. Like classes for navigation state, session token when the...
  15. K

    DataGrid not updating property when using "single click" CheckBox column

    I am using a Datagrid in MVVM, and I want to remove the "double click" behavior of the Standard DataGrid, which contains one Checkbox-Column (inside a DataTemplateColumn) and another two regular columns, as follows: Unfortunately, the CheckBox column works fine (single click), but clicking...
  16. B

    Removing treeviewitem using MVVM pattern in WPF application

    I'm making a file explorer app using MVVM pattern in C# WPF. Right now I want to implement watcher events that are responsible for adding, removing and renaming items from treeview. I already have adding, and partially renaming (I think that in this case I have to combine deleting and adding)...
  17. S

    What is best Practice in a wpf mvvm with multiple datacontext

    Hi, I'm designing a wpf program with mvvm and now I'm confused which way I should do the "problem" with multiple datacontext to a usercontrol. I have googled a lot and find out, that I can do it in two ways; Make the vm extended with the foreign key and these properties in the view model Or...
  18. destro

    Resolved change the selected Value of a bound combo box from a window button?

    How do I change the selected Value of a combo box from a window button when combo box is binded with enumList in its own viewmodel? I have two Windows and several user controls in my project, one of the user control Ribbon is placed on MainWindow. The Ribbon is groupBox user control containing...
  19. J

    Hierarchical ViewModels

    I've created a UserControl which is a Calendar. It's almost identical to the Outlook calendar. Multiple calendars can be placed adjacent to each other to compare them, als shown in the image. For viewing the calendar, the user can choose between a month view and a week view. The month view...
  20. A

    Connection to the database in WPF with MVVM design pattern

    I am a beginner at MVVM design patter and WPF I am trying to make a small example of connection to the MS Access database using the WPF and MVVM Light Toolkit patter design. here is the code I insert for the connection: Model / DataConnection.cs public class DataConnection {...
Back
Top Bottom