Questions tagged as 'wpf'

1
answer

WPF C # datagrid create header multiple columns

I am creating dynamically columns for a datagrid, however I need to create headers like below, any tips on how to do using C #? --------------------------------------------- | Person 1 | Person 2 | | Column 1 | Column 2 |...
asked by 10.08.2017 / 20:26
1
answer

What is the function of this MainWindow file?

According to the project below: link I know that the purpose of the Main function is to be the main function, but in the example above the MainWindow file is also doing the function of presenting the layout function should it not belong...
asked by 25.08.2017 / 13:49
1
answer

Different layout in last row of datagrid

I have datagrid where I show values referring to the beginning and end of a period. For this, I created columntemplate down with 2 textblocks , but in the last line, I show a value that is the difference between these 2 first...
asked by 21.08.2017 / 16:53
0
answers

Creating properties in all WPF windows

Does anyone have any idea if it is possible to inherit from the Window class of WPF, create some properties and when to create my screens instead of making them inherit from Window make them inherit from that created class? An example: I ha...
asked by 27.06.2017 / 15:10
1
answer

Update a Window's Label through the Contents of a ComboBox of a UserControl

I have: A Window: Window1 (MainWindow) Three UserControls: -UserControl1 -UserControl2 -UserControl3 In window 1 I have a label (label1) and in each of the UserControls I have a ComboBox. Each ComboBox has 3 options: BLU...
asked by 30.05.2017 / 19:01
1
answer

Help with window array display (WPF template)

Be the code snippet: Janela[] jnl = new Janela[3]; for(int i = 0; i < jnl.Length; i++)//inicializa os objetos janelas { jnl[i] = new Janela(); } //Código que produz o layout de que cada janela vem aqui. for(int i = 0; i <...
asked by 07.04.2017 / 01:03
1
answer

Apply Transition effect when changing the source of an Image control

I have a button to which an image loaded from a ResourceDictionary is associated. In XAML I load them like this: <Button x:Name="selecao" Grid.Row="1" Grid.Column="2" Margin="10" Click="selecao_Click"> <Image x:Name="img" Source =...
asked by 31.03.2017 / 10:07
2
answers

How to disable double click on the header of a DataGrid?

Double-click grid method: private void grid_MouseDoubleClick(object sender, MouseButtonEventArgs e) { if (e.LeftButton == MouseButtonState.Pressed && //Verifica clique com o esquerdo uldPo00100.SelectedItems.Cou...
asked by 26.03.2017 / 22:58
1
answer

MainWindow resizes by itself when I run the application

Greetings! I created a small window in XAML in a WPF project where Design view is perfect, but when I run the application in Debug mode the window changes size alone. What do I do to make the window size not change? Below are the screen...
asked by 07.04.2017 / 23:23
1
answer

Switching between pages [Page Class] in an application

I'm searching for examples of browsing between pages in a desktop application. Let's assume that navigation is done from a ListBox always visible in the Ui. Most examples do something like this to switch to a particular page: private void myLi...
asked by 05.03.2017 / 13:13