Questions tagged as 'wpf'

1
answer

Static variable that can not be assigned?

Good day, I have a code made by me in which I use a static variable to control certain actions in other forms, the detail is that the first time I use it it behaves as I expect, but from then on remains with the value 0 and (although I explicitl...
asked by 26.04.2016 / 21:20
1
answer

How to use a thread to fill a ListView in WPF and view the progress

I am filling ListView with a list of files, I show the file name in a TextBlock and I have a ProgressBar that should stop when the Thread ends, but I get the following exception:    Unhandled exception of type 'Sys...
asked by 30.11.2017 / 14:22
1
answer

How can I link to DisplayMemberPath inside an ItemTemplate?

I need to create a list type control that meets the following requirements: Show an icon delete right next to the text of each item. Must show the added elements horizontally. When clicking on the delete icon, the control must be able to...
asked by 25.02.2016 / 17:04
0
answers

How to update data from a DataSet?

My problem is that I can not update the data in my registry, when I modify a data and I give it to save, it generates the following error:    System.InvalidOperationException: 'Update requires UpdateCommand to be valid when the DataRow collec...
asked by 31.10.2018 / 00:10
1
answer

Change data in DataGrid

I'm working with C # in WPF, I'm using the data from an api, I have a datagrid that I filled with user data such as name, email, phone, status but in state it gives me 1 if it is active and 0 if it is deactivated , what I need in the table to sh...
asked by 01.11.2018 / 22:15
1
answer

Right way to interact between ViewModels MVVM

I am building a WPF application with the MVVM design pattern. I am using DataTemplates to load user controls within a ContentControl: <DataTemplate DataType="{x:Type menu:MenuViewModel}"> <menu:MenuView/> </DataTemplate>...
asked by 08.02.2016 / 20:59
2
answers

Show return value SQL Server in WPF window C #

I have the following code with which I recover the value that a stored procedure returns to me public bool EjecutarSQL(string consecutivo, string otratabla) { Clsconexion objConexion = new Clsconexion(); objConexion.SQL = "...
asked by 06.12.2018 / 16:26
2
answers

Pass variable from one form to another in WPF

I have the following problem I am trying to concatenate a variable that I get from one form to show it in another, I do it in the following way. 1.Formular ClsIntermedia objLibreria = new ClsIntermedia(); if (objLibrer...
asked by 19.12.2018 / 13:38
3
answers

Remove WPF buttons by default

Does anyone know what they are and how to remove the buttons that are added by default when creating a project WPF ? I attach an image with the buttons to which I refer: In windows forms, it does not appear only in WPF     
asked by 08.07.2016 / 14:09
2
answers

Operator overload! with class Visibility c #

I am trying to overload the unit operator ! in C # , so that it receives as a parameter a Visibility . My goal is to reverse the visibility of a controller. Example: Button_Click(object sender, RoutedEventArgs e) { ControlName.V...
asked by 22.08.2018 / 21:21