Questions tagged as 'wpf'

2
answers

C # convert Control to UIElement

How can I convert a Control to UIElement in Windows forms with c # ? I'm extracting Controls from FlowLayoutPanel with Controls but I want to convert them to UIElement     
asked by 24.12.2015 / 01:24
0
answers

How to change a cell background of a DataGrid in a style based on the current element of a collection

I have a collection of objects that have a collection of other objects in the following way: public class Elemento { public string Nombre {get; set;} public ObservableCollection<OtroObjeto> Lista {get; set;} } In WPF, I link...
asked by 30.12.2017 / 23:13
1
answer

How to clean the contents of a DataGrid?

I have a (WPF) window and a C # code that contains the following One button: <Button x:Name="btnBuscar" Content="Buscar por" HorizontalAlignment="Left" Margin="157,10,0,0" VerticalAlignment="Top" Width="85" Height="30" Click="btnBuscar_...
asked by 09.04.2018 / 07:38
1
answer

How to fix the movement of the positioning of buttons or other elements when starting the application?

I have made the following part of the interface But when you start the application, you change your position and the following is left the magnifying glass is an icon in Button that is placed over a TextBox the code of the th...
asked by 11.04.2018 / 02:08
1
answer

How to make a grid select the first record if it depends on another grid

I have a model, of the form: public class A { public ObservableCollection B col1; } Public Class B { public int BA; public int BB; public ObservableCollection C; } public Class C { public int CA; public int CB; } The fir...
asked by 11.10.2017 / 17:56
2
answers

How to get the value of a cell from a DataGrid?

I want to get the value of the UserID cell that has the following settings made with Visual Studio 2017 in a window (WPF) <DataGridTextColumn Binding="{Binding Path=idUsuario}" ClipboardContentBinding="{x:Null}" Header="idUsuario" He...
asked by 08.04.2018 / 09:13
2
answers

Change the color of a Row in a GridView

Good morning, I am developing a program in Framework 3.5 in WPF (xaml) and the problem that arises is that when you want to change the color of a line from the class code, when the grid already has the data that I want to show, I can not find...
asked by 04.07.2017 / 14:39
2
answers

Error creating a new element - WPF Async / Await

When I run my code I get the following error:    System.InvalidOperationException 'in PresentationCore.dll       The calling thread must be STA, because many UI components require this Could you help me correct my code? Simplified cod...
asked by 14.01.2017 / 19:05
2
answers

Capture the Checked of a CheckBox inside a Datagrid from the ViewModel

I have a requirement in WPF , I made a ViewModel called AsignaFacturasVM for my View, in which I have a Label that is linked to a property float called Accumulated Amount of my ViewModel and I also have a...
asked by 10.07.2018 / 23:31
1
answer

A canvas control is frozen

Working with Visual Studio 2015, WPF I have a Canvas control which serves as a canvas to draw a skeleton that I get by scanning through the Kinect device when I get in front of the device my skeleton that appears on the canvas freezes. I trie...
asked by 09.11.2017 / 22:23