Most voted "wpf" questions
Windows Presentation Foundation, or WPF, is a subsystem for presenting user interfaces in Windows-based applications. It features a diverse set of controls, layout options, 2D and 3D graphics, media and text manipulation and allows data binding and model-oriented style.
Learn more…413 questions
Sort by count of
-
0
votes1
answer57
viewsChange column width Modern UI Metrochart for WPF
Good morning, everyone. I’m using the Metrochart (https://modernuicharts.codeplex.com/) for graphics generation, everything is working fine, however I would like to change the style of the columns /…
-
0
votes2
answers379
viewsListview with an empty and editable column
People wanted to have empty and editable cells in a column of a Listview that pulls from the SQL Server Database information to my project. To pull the information I use LINQ and I can list all the…
-
0
votes1
answer24
viewsSave the image associated with an Image control to disk
Let’s assume an image is loaded for control Image of the following example ... <Button x:Name="button" Content="Button" /> <Image x:Name="image" /> What code is required to associate to…
-
0
votes2
answers750
viewsRead a BLOB corresponding to an image
The following code uses the Mysqldatareader to obtain a database-specific record: string cmd = string.Format("Select * from socios.socio WHERE idSocio={0}", chave); MySqlCommand comandoMySQL = new…
-
0
votes1
answer75
viewsAdding a Materialdesigninxamltoolkit controller with C# in XAML
I’m using Materialdesigninxamltoolkit to design my program in WPF, I’m new in WPF and wanted to know how I can add the Card controller by C#, as I do with Button or any other native WPF controller…
-
0
votes0
answers43
viewsAccessing object created by another thread
I am creating an application in C#. The graphical interface elements are created by main-thread, and put a second thread to perform a process that is too long. The problem is that I am trying to…
-
0
votes1
answer368
viewsFramework for Windows Forms or WPF
Guys, I wonder if there is any framework for Windows Forms or WPF, to facilitate development. framework that facilitated UI creation, and data access .
-
0
votes1
answer47
viewsHow to have a result mixing checkbox'es?
How can I combine results of checkbox? With 5 checkbox, for example, how I make the result be combined for when the user selects the 5 and the 3 appears a messenger box. Ps: If the question is…
-
0
votes1
answer162
viewsUpdate Label of a Window through the Contents of a Usercontrol Combobox
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…
-
0
votes2
answers132
viewsPermanent focus on a field - WPF
I have an application with several fields, but I would like to leave the focus only on one specific and not allow the withdrawal of the same in any situation. Force the focus always in this field,…
-
0
votes2
answers118
viewsSeparate front-end and back-and from executable
My idea is to separate the application into three distinct files, in the file MinhaAppBackend.dll, will be, as the name suggests, all classes and other elements that are part of the back end of the…
-
0
votes1
answer218
viewsConnection String not found WPF Entity Framework
I am in a WPF project using some MVVM practices, I am using Entity Framework database first and the Connection string is already in the app.config, I have already followed all the procedures I have…
-
0
votes1
answer31
viewsIn savechages it says which column is null and has value
When I call my method to record, the whole object comes filled in, but when savechanges() is called it says that Idbalanca is null and yet it has the value of 1. Method Insert: public virtual void…
-
0
votes1
answer701
viewsWhat is the function of this Mainwindow file?
According to the project below: http://www.macoratti.net/11/06/pp_mvvm1.htm I know that the purpose of the Main function is to be the main function but in the example presented above the Mainwindow…
-
0
votes1
answer478
viewsExport Listview to Excel (.xls) from a list populated by LINQ, WPF project (C#)?
Good... I need to export the Listview data populated by the LINQ method of an SQL database... I’m not getting the Column Headers in Excel... Anyone can help? Reference:…
-
0
votes0
answers148
viewsXAML C# Resources - How to add a list of dynamically based Resources Image in a folder
I’m making a FlipView using MahApps.Metro. I have a list of images that would be passed to this flipview. It works, but I’m making them add dynamically in a way that I think is incorrect: <Image…
-
0
votes1
answer112
viewsMultithreading - Opening new WPF window
I was wondering if any of vcs knows how to fix this damn error, (I want to open another window but it gives this error at start time) = can help?…
-
0
votes1
answer210
viewsConvert "date and time" to "date" in C#
I need to convert "date and time" to "date" in C#, keeping the Datetime format (without converting to string). In the code, I am converting an object to datetime, but I need to remove its time also…
-
0
votes1
answer25
viewsPossible values for Comboboxpopupanimationkey?
I recently had a bug with combobox in the WPF. Was a bug related to a "blurring" in the source when it had only one item in the combobox while it opened. I solved the problem by removing the…
-
0
votes1
answer63
viewsDatagrid - Last column enlarges too much
I have a datagrid displaying data from a Mysql database table. If all columns are Width="Auto", when I resize the window the grid does not follow. If I put in the last column Width="*", it works as…
-
0
votes1
answer119
viewsHow to project window2 on the secondary wpf screen?
Following is 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;…
-
0
votes1
answer161
viewsHow to create grid lists with C# in WPF?
I’m new in C#. I wonder how to create a grid list that contains images, something like what android has: Thanks in advance.…
-
0
votes2
answers422
viewsC# WPF - Accessing another XAML element by code
Hello, I have two screens a Window and a Page loaded inside the screen Class Window1{ //to do .. __mainFrame; // acessa normal } Class page1{ //to do __mainFrame; // sem acesso ao frame } Inside the…
-
0
votes1
answer421
viewsWhat is that vertical and horizontal line for when you click on the Form?
I wanted to know what that vertical and horizontal line is for when you click on the form and it is there, then dps when you click again, another line appears. And how can I get these lines?…
-
0
votes1
answer66
viewsHow to play the "overflow: Hidden" effect of CSS in WPF?
Hello, I’m new to Windows Presentation Forms (WPF) and need to know how to make the effect of "overflow: Hidden" that we have in CSS. I have the following code snippet: <Border…
wpfasked 6 years, 8 months ago LeandroLuk 4,989 -
0
votes1
answer68
viewsHow do I get information from the drives by c#?
Good afternoon, I was asked to carry out a project that can fetch information from drives (C:, D:, etc), such as how many drives there are, the name of each one, the total space and the used. But I…
-
0
votes1
answer24
viewsIs it possible to have a 'Partialview' in WPF?
I was wondering if it is possible to implement the concept of partialview in a WPF View. Something like a system of tabs, which changes the content of the grid but does not alter the layout of the…
-
0
votes1
answer52
viewsSelectionbrush property with only edge and no padding
It is possible to make the property SelectionBrush same as the image below: 'Cause she’s like this now: Follows code: <TextBox SelectionBrush="Red" FontSize="12pt"/> I want it only the border…
-
0
votes1
answer63
viewsHelp with a MVVM view
I’m reading the that MVVM tutorial. But I’m not understanding the following: <Window x:Class = "MVVMDemo.MainWindow" xmlns = "http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x =…
-
0
votes1
answer33
viewsWPF Stretch Width does it right but not Height
Good staff. I have a little problem and I can’t find where the "mistake" is. I’m trying to get the Window responsive, in which the Width keeps track of some window size, now the problem is even the…
-
0
votes1
answer60
viewsRun Event Textbox c# WPF
I have a Textbox and need that after pressing the right mouse button and clicking paste, it do a check, I tried to use various methods like TxtTexto.PreviewMouseLeftButtonDown+= new…
-
0
votes1
answer50
viewsHow to Make a Help Balloon in WPF?
I am developing a WPF application, and in it, I need each Label to have an Informative Balloon, as example, Name* (full name); Could anyone help me? I would like to do in pure WPF, but if not, there…
-
0
votes0
answers152
viewsChanging the DPI of a C#image
Personal I am developing an app in WPF and at a certain point I need to convert the DPI of an image, as I do? I’m using the class System.Windows.Media.Imaging.BitmapImage And to load the image I use…
-
0
votes1
answer133
viewsVertically center a label on Stackpanel
I’m trying to center vertically on one label within a StackPanel. I’ve already defined the attribute VerticalAlignment="Center" but I didn’t notice any difference in vertical positioning, as can be…
-
0
votes1
answer331
viewsWPF Checkbox Combobox direct click on button after selection
I have some comboxboxes I fill with checkboxes. After selecting the items click on search, but the first click is used to compress the combo and then click again to trigger the button. Is there any…
-
0
votes1
answer27
viewsReflection c# WPF Observablecollection
I have a problem, when creating an Observablecollection I do so: ObservableCollection<MinhaClasse> Lista = new ObservableCollection<MinhaClasse>(); So far so good. My problem is, through…
-
0
votes1
answer85
viewsC# Wpf Passwordbox want to spy the password
Good evening, I have some Passwordbox and would like to add buttons to spy this password when the user needs it, I tried to invoke the Passwordrevealmode inside the Passwordbox, however it does not…
-
0
votes1
answer88
viewsPass sequence of steps (methods) to window (wpf)
Greetings...I currently have a screen similar to the one presented below: This screen uses Backgroundworker to perform a sequence of steps and inform the user through the messages in the textblock a…
-
0
votes2
answers67
viewsSave an image by identifying it from Frameworkelement
I have this layout: <StackPanel> <Button x:Name="button" Content="Button" Click="button_Click" Height="50" /> <Image x:Name="image" Source="vermelho.jpg" /> </StackPanel> The…
-
0
votes1
answer70
viewsRemove Background Checkbox Wpf Material Design
Folks I’m trying to leave the Checkbox only with the square mark and dash that says it’s marked. My code is this: <CheckBox Content="Teste"> <CheckBox.Resources> <SolidColorBrush…
-
0
votes1
answer39
viewsIs there a 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, upon a value by which each button was mapped, allowed me to…
-
0
votes1
answer32
viewsCalling method by string command
I am a command bar in an application with several functions present in buttons in a Ribon. A large part of these functions must be able to be executed by means of commands, for example: Botão…
-
0
votes1
answer751
viewsBuilding Datagrid with C# WPF at runtime
I have a Datatable where I will store some data that the user informs and through it I want to pass the information to Datagrid. gvDados.ItemsSource = dt.DefaultView; //Essa é a ligação entre o…
-
0
votes0
answers125
viewsSetting the Row Header of a Datagrid through the rows of a Datatable column using C# WPF
I have a Datatable with the following information : Column1 | Column2 1 | A 2 | B 3 | C 4 | D With this Datatable I would like to load a Datagrid using the first column of Datatable to be the Row…
-
0
votes0
answers11
viewshow to organize an 8x4 rectangle table so that it is possible to add row by row of 4 columns
I’m having doubts about how to add a line of 4 colors, line by line: As shown: At each push of a button. using System.Collections.Generic; using System.Linq; using System.Text; using…
-
0
votes1
answer38
viewsSwitching between [Page Class] pages in an application
I’m looking up examples of browsing between pages in a desktop application. Let’s assume that the navigation is done from a Listbox always visible in Ui. Most examples do something like this to…
-
0
votes1
answer177
viewsHow to pass the name of a wpf window as parameter
I use a userControl customized to show a Data Grid and when I double-click some line, I call a registration window, which is waiting to send the ID of the line selected as parameter, wanted to…
-
0
votes2
answers441
viewsHow to disable double-click the header of a Datagrid?
Double-click method on the grid: private void grid_MouseDoubleClick(object sender, MouseButtonEventArgs e) { if (e.LeftButton == MouseButtonState.Pressed && //Verifica clique com o esquerdo…
-
0
votes1
answer203
viewsApply transition effect when changing the source of an Image control
I have a button to which is associated an image loaded from a Resourcedictionary. In XAML I carry them like this: <Button x:Name="selecao" Grid.Row="1" Grid.Column="2" Margin="10"…
-
0
votes1
answer76
viewsHelp 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…