Questions tagged as 'wpf'

1
answer

Declare textbox event in XAML

How do I declare the KeyPressEventArgs event of a textbox to work with this event in Code Behind? The code to run the event I have, I just can not declare the event, as I do with the Click, for example. This one I can. I found that for keypress,...
asked by 09.08.2017 / 21:39
1
answer

Is there any class in C # (WPF) equivalent to Qt's QSignalMapper?

When I was learning C ++ / Qt I used a very interesting class that allowed me to associate several interface buttons to a single event that, by means of a value by which each button was mapped, allowed me to select the action to perform. Somethi...
asked by 18.01.2017 / 16:55
2
answers

ListView with an empty and editable column

PersonnelwantedtohaveemptyandeditablecellsinacolumnofaListViewthatpullsinformationfromtheSQLServerdatabasetomyproject.TopulltheinformationIuseLINQandIcanlistallthedataIwant.Theideais:whenthislistisloadedtheusercaneditthecellsofanewcolumn(Quanti...
asked by 15.05.2016 / 01:52
3
answers

Interact / Search Button for your Tag using WPF

I have a screen with 25 buttons and would like to interact with the buttons through the code. For example, a number is generated using the Random function: Random rdn = new Random(); numero = rdn.Next(0,25); Let's say the result w...
asked by 15.10.2015 / 23:25
1
answer

WPF - How to create a mechanism to make the application available for testing for x days?

Good morning I am creating an application in WCF and would like help or guidance at the following point: I need to make the app available for anyone to download and test it, type a test for 30 days and then restrict access. How can I creat...
asked by 04.03.2015 / 16:00
1
answer

How to end my WPF application and initialize it again?

I have in my application a database configuration screen, in which once configured I have to close the system and then open again to take effect the changes made. How can I do this in an automatic way?     
asked by 02.10.2014 / 21:36
1
answer

WPF select all CheckBox DataGrid

Hello, I'm trying to select all CheckBoxes from a datagrid but I'm not succeeding. Below is my code to select: private void CheckUnCheckAll(object sender, RoutedEventArgs e) { CheckBox chkSelectAll = ((CheckBox)sender); if (chkSelect...
asked by 23.02.2018 / 21:02
1
answer

How to design window2 on the secondary wpf screen?

Follow the code (MainWindow): using System.Windows.Forms; using System.Drawing; var win2 = new SegundaTela(); Screen s2 = Screen.AllScreens[1]; Rectangle r2 = s2.WorkingArea; win2.Top = r2.Top; win2.Left = r2.Left; win2.Show(); It is showi...
asked by 11.12.2017 / 19:22
1
answer

Convert "date and time" to "date" in C #

I need to convert "date and time" to "date" in C #, keeping DateTime format (without converting to string). In the code, I'm converting an object to datetime, but I need to remove the time for it as well to display it in a DataGridTextColu...
asked by 07.11.2017 / 18:04
1
answer

Vertically center a label on the StackPanel

I'm trying to center vertically a label within a StackPanel . I have already defined the VerticalAlignment="Center" attribute but noticed no difference in vertical positioning, as can be seen in the image below. That is, the label...
asked by 18.12.2016 / 18:16