Questions tagged as 'wpf'

1
answer

Output from a method or event - C # / WPF

I am using a return to be able to exit the textEstado_Validate event. The problem is that when it exits this event, it enters textEstado_KeyDown . How can I prevent it from going into any other methods and events? private v...
asked by 03.02.2016 / 19:43
1
answer

Hide Menu Tray Icon

I created a menu for my TrayIcon : Butiftheuserdoesnotselectanoptionitisstillvisible.WouldanyoneknowhowIcanhideincasetheuserclicksoutsidethemenuarea?Here'sthecodeI'musingtoparsethemenu:System.Windows.Forms.NotifyIconiconeTaskBar=null;pr...
asked by 17.04.2015 / 20:48
1
answer

Add selected GridControl rows to the ObservableCollection

I'm trying to add my grid items to my ObservableCollection but I'm unsuccessful. I have a column that has the CheckBox that I put through the ShowCheckBoxSelectorColumn property. I have the following Xaml: <dxg:GridControl x:Name=...
asked by 10.08.2015 / 21:00
1
answer

I would like a brief explanation of how to fill a combobox in MVVM pattern

I would like a brief explanation of how to populate a combobox in MVVM pattern. The three parts, Model, View and ViewModel populated with the Database table. Model: class Racas : INotifyPropertyChanged { private int _cd_Raca; privat...
asked by 19.05.2015 / 05:17
2
answers

Select does not return anything

I have the following method: public DataTable Select(bool all = true, string campos = null) { if (all && campos == null) _sql.Append("SELECT * FROM "); else _sql.Append("SELECT " + campos + " FROM "); _sql.A...
asked by 02.01.2015 / 14:03
1
answer

How to add a Label inside a TextBlock by code behind

How do I add these Labels within TextBlock , code behind ? <TextBlock> <Label x:Name="NumeroPergunta" FontWeight="Bold" /> <Label x:Name="Pergunta" /> </TextBlock> What I have so far: var...
asked by 24.12.2014 / 12:17
1
answer

How to leave my Button disabled but the image appearing?

Does anyone know if there is any way I can leave my Button disabled but the Button image appear? What if I disable Button. ButtonXAMLcode.<Buttonx:Name="BtnCalc" Content="" HorizontalAlignment="Left" Margin="773,206,-172,0" Vert...
asked by 17.04.2014 / 22:28
1
answer

Structure of assemblies in a project using the MVVM pattern

I'm having difficulty organizing a project solution using the MVVM pattern. I do not use any MVVM framework. I currently have the following structure: Solution | --- AppView (Projeto principal onde estão as views e que é iniciado pe...
asked by 22.02.2014 / 15:49
1
answer

How to change the display of alternate buttons based on a binding in the DataGrid in WPF

Hello, I'm new to XAML / WPF and I have the following problem. I have a DataGrid that receives as ItemsSource a ObservableCollection<DataEstoque>() so public class DataEstoque { public string Id { get; set; } public...
asked by 30.07.2018 / 13:54
1
answer

Portable Database for WPF + C #

I'm creating a form in WPF + C # in VS Express 2013 for Desktop. Is there a SQLite-like database that I can use with C # + WPF? Since I came from Delphi development I got used to always having to install a server for the database.     
asked by 14.03.2014 / 18:51