Questions tagged as 'wpf'

1
answer

The calling thread can not access this object because it belongs to a different thread

Follow the code: private async void button_1_Click(object sender, RoutedEventArgs e) { var listenPort = 11000; var listener = new TcpSocketListener(); listener.ConnectionReceived += async (senders, args) => { var...
asked by 17.03.2018 / 00:32
1
answer

MemberwiseClone of aggregates

I have in memory (not yet stored in database) an object of type List<NotaFiscal> . I need to pass an item from this list as a parameter to a screen, so that changes are made to that object. However, it may be necessary for the user t...
asked by 20.02.2017 / 19:28
1
answer

How to simulate the click of a button via code?

Buttons in WPF applications do not have Button.PerformClick . So, how could I simulate the click of a button via code?     
asked by 20.12.2016 / 22:26
1
answer

ProgressBar with WPF and Ionic.zip

I use the Ionic.zip dll and in it unzipo and rezipo some files and folders. My manager asked me to put ProgressBar and I'm not sure how to do it using WPF. It's very fast and I do not know if it's worth it, I tried to explain it to hi...
asked by 17.03.2016 / 18:50
1
answer

How to create professional designs in WPF

Well, I'm not a Designer this is fact, and those who do not have designer skills suffers a lot with the new interface technologies, among them WPF. Those who do not have a designer knowledge will suffer to create beautiful interfaces with Blend....
asked by 13.07.2016 / 15:05
2
answers

ObservableCollection does not bind

I have the following situation: I make the instance of an observable property in the constructor: public ObservableCollection<Model.OSModel> _os { get; private set; } public EditorServicosViewModel() { OS = new...
asked by 16.02.2016 / 19:21
1
answer

How do I go through all the controls in a window in WPF?

Is there any way I can go through all the controls in a window and disable them? For example, make a foreach that disables one by one of the controls. Something like below, only for WPF, not WinForms. private void HabilitarControles(boo...
asked by 31.08.2015 / 14:40
1
answer

WPF window does not exceed screen

I have the following code: System.Windows.Point ponto = PointToScreen(Mouse.GetPosition(this)); JanelaAbrir.Left = ponto.X; JanelaAbrir.Top = ponto.Y; JanelaAbrir.ShowDialog(); It opens the window in the mouse position,...
asked by 01.12.2014 / 13:35
1
answer

Communication between ViewModel's: return data to previous screen

I have a A screen that has a text field and a button, this button on the A screen, opens a second screen B . This B screen has another text field to populate and save, when the person clicking save saves the screen closes, and the one...
asked by 02.03.2018 / 15:13
1
answer

TextBox mascara value from 2 to 4 decimal places in WPF C #

I would like my TextBox to have the following "mask" When I put two houses after the comma:    0.00 or when I put three:    0.000 or when I put 4:    0.0000 My code in WPF C # is the following: <TextBox x:Name="ValorP...
asked by 15.08.2018 / 21:22