Questions tagged as 'wpf'

1
answer

Alter the cell color of the DataGrid

I have a DataGrid in C # WPF, and I need to change the color of some cells according to a condition. For example I have the Inventory column and if the Inventory is less than a specific value I put the color of it in red. how can I do this, retr...
asked by 29.05.2017 / 01:25
1
answer

Create controls dynamically in WPF

I need to create checklists that depend on previous entries and processing. How do I create these checklists dynamically in WPF? (a code snippet, please).     
asked by 13.03.2017 / 13:47
2
answers

Change the Foreground of certain items in a ListBox, via Style, using a Converter?

I have ListBox where the data source is ObservableCollection<string> . I would like the items that started with "WARNING" to have the red font. I would be able to do this using a DataTemplate , a Converter a...
asked by 01.09.2016 / 19:47
1
answer

Error in WPF application, but only on some machines

I made a small application to extract a .zip file. It works, but when I run on three other machines, it does not work there. The error is this:    An error occurred while creating ZIP file       Object reference not set to an instance of an...
asked by 07.06.2016 / 15:15
1
answer

"button" with invisible content [closed]

Is there a way to set a content for a button in WPF, but that it is invisible to the user?     
asked by 14.10.2015 / 18:42
3
answers

How to make text disappear from WPF field C #

I'm using wpf for the first time, as is the declaration of a textbox field in which I have a text (Ex: "Login") and when I click on it it adds up and is just the pointer for me to start typing ? If you did not understand how this text is hot...
asked by 20.05.2015 / 15:15
1
answer

How to paint a cell in a DataGrid?

See the code in How to change the color of a DataGrid row in C #? He is painting the entire line, as far as that is concerned, what happens and that when I give a scroll the painted line deregulates. Example: I painted line # 1 when sc...
asked by 03.11.2014 / 15:56
1
answer

How to make a query within an XML file?

I need the value of <version> to be returned to a variable in a WPF application. The XML file is on the server and contains: <?xml version="1.0" encoding="ISO-8859-1" ?> <Application> <Version>1.2.3.5</Versio...
asked by 26.03.2014 / 18:07
2
answers

Combobox update linked to Binding

I'm working with the MVVM pattern, so far so good, I have a PessoaViewlModel class. In it I have a property IEnumerable<Municipio> Municipios , which shows me all the municipalities, according to UF(Unidade federa...
asked by 27.05.2014 / 19:50
1
answer

Close only one window

I created a window JanelaUm , every time I click on button this window is displayed. no code-behind of JanelaUm I have event window_KeyDown with the following code: if (e.Key == Key.Escape) this.Close()...
asked by 15.12.2014 / 16:37