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
-
1
votes1
answer81
viewsHow to assign a style to all objects at once in WPF
It is possible to create a style in WPF where will be using for all components of the same type, so it is not necessary to call the Style for the component? My idea is to create a style as for…
-
1
votes0
answers44
viewsChanging color of datagrid Row with WPF C#mahapps
How to change the font color of a Datagrid line in WPF using the mahapps framework?
wpfasked 7 years, 3 months ago Bruno Aparecido da Silva 363 -
1
votes1
answer196
viewsAdd the same with the click event
I have in my wpf code a listbox with the name "lstBox" (I left it invisible), and inside it a listBoxItem with a label and a textbox . Outside the listbox , in the same window I have a button " add…
-
1
votes2
answers368
viewsChange the Foreground of certain items in a Listbox, via Style, using a Converter?
I have a ListBox where the data source is a ObservableCollection<string>. I would like the items that start with "ATTENTION" to have the red source. I could do it using one DataTemplate, one…
-
1
votes1
answer74
viewsProblems starting IIS Express via c#
I need to start IIS Express via C# with WPF. I can even upload the site and navigate, but only for a few seconds. Logo the site stops responding to requests, and only return reply when I close the…
-
1
votes1
answer32
viewsClass Library (Portable) UWP + WPF
I created a simple project Portable Class Library that is being used in two projects WPF e UWP. The two projects work normally, however, the project UWP when compiling displays the following error…
-
1
votes1
answer223
viewsHow to clean another Window textbox? - WPF
Follows code: MainWindow mainwindow = new MainWindow(); mainwindow.listbox1.Items.Clear(); // tentativa //mainwindow.listbox1.ItemsSource = null; I try to clean up listbox from another form...…
-
1
votes1
answer395
viewsWhat is the difference between Table and Matrix and List in Report View?
So far in my reports I have been using tables and I link my datasets to those. But today I needed to use a List to create a card (I’m still trying to understand how it works). When to use Table,…
-
1
votes1
answer43
viewsEmpty line at the end when I do Data Binding - (WPF Datagrid Control + Mysql)
I have been implementing the example of this link. Basically I have: XAML <Window x:Class="DataGridBind.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"…
-
1
votes2
answers472
viewsHow to make a Textbox accept only the letters S and N?
I’m studying about TextBox in C# and I have no idea how to do this function.
-
1
votes1
answer89
viewsChange Color of Datagrid
People, I need some help, I’ve done some research, but I can’t find it, I would like to know how to change the color of the selected item in Datagrid. Example: When I have a line in the datagrid and…
-
1
votes0
answers60
viewsUpdate Page( windows) during Button Click, Spinner stops working on WPF C#
I’m making a WPF application in c#, that when I click the query button on the bank. It starts spinning a "Spinner" that is inside the Usercontrol; private void BtnBusca_Click(object sender,…
-
1
votes0
answers269
viewsHow to link image on canvas with an object
I have the following class: class Sapo { private Image imgSapo; public int IdSapo { get; } public Sapo(int id) { imgSapo = new Image(); IdSapo = id; } public Image show { get { imgSapo.Source = new…
-
1
votes1
answer401
views -
1
votes1
answer512
viewsMenu Icon change color by hovering over WPF c#
Hello, I’m trying to get that when pass the mouse change color. Menu icon should be white as the letter (header) as shown in the image down below: My menu code and that <Menu…
-
1
votes1
answer101
viewsHow to open new window only if it is not already open?
The correct question would be: how to Open only one instance of this window. the programme is a WPF and language is VB.NET Currently the following code does not suit me, because if the user clicks…
-
1
votes1
answer219
viewsProblem in wpf datagrid control display
I am facing two problems with wpf datagrid control. The first: I have the main form, where some data is displayed, and the other where the data is inserted. When I click to enter the data and the…
-
1
votes2
answers778
viewsHow do I change the content of a Usercontrol using a button in another Usercontrol?
A window with a grid, and with two content areas, "Contentarea" and "Contentmenu". "Contentarea" starts blank, "Contentmenu" starts with the Navigation buttons, which make "Contentarea" change its…
-
1
votes1
answer35
viewsConversion c# wpf Icollection and Observablecollection
I have a list Icollection Generica and need to convert to Observablecollection, so I do not know which class is to convert to ObservableCollection<MyClass>. I’ve been searching for that answer…
-
1
votes1
answer247
viewsHow does the Dependency Property (Dependencyproperty) "work"?
I’m trying to understand the feature of dependency properties. I’ve read some tutorials on msdn but the feature is still unclear to me. Example: using System; using System.Collections.Generic; using…
-
1
votes0
answers29
viewsCreating a Splash Screen in dll
Well I need to show my user what is being verified, for this I need to make use of a splash screen, I was wondering if there is any way I use WPF to write the code inside my dll? I need to do in dll…
-
1
votes1
answer175
views -
1
votes0
answers41
viewsView 3D object in Windows Form C#
Good morning, I’m trying to insert a 3D object into my Winforms C#. I researched and apparently the easiest way would be to use a WPF control. How can I integrate the WPF control into my Winforms…
-
1
votes0
answers50
viewsImage disappears when running the project
Good time people, I’m having problems using an image using WPF, I’m trying to use Uri to instantiate the image and run the project, but an Isfrozen error is false and does not run the project, using…
-
1
votes1
answer104
viewsWpf Modern UI Metro Chart Update Chart
I have the chart below where the first load works normally, but when I do a search and change the list it continues with the previous series. Ex: in the first load I have 8 items in the list and it…
-
1
votes0
answers568
viewsUI and desktop development . NET
I am at the beginning of the development of a commercial application in C#, however, I have my doubts about how I will do the visual part of the application (UI). I’ve worked with Windows Forms and…
-
1
votes0
answers97
views -
1
votes0
answers79
viewsWhat is the best way to do database replication?
I have an application in WPF + MS ACCESS where users register, query, etc. The main server is located in SP, but we have branches in RJ, BA, MG, PR, RS, GO, etc, which also access the tool. Due to…
-
1
votes1
answer32
viewsHow to add multiple Runs in a paragraph with a part of the Bold string in WPF
Good afternoon, I’m completely new to WPF, so forgive me if the question is stupid. I need to format two strings that are contained in the same paragraph, one in bold, and the other in normal text.…
-
1
votes1
answer69
viewsMahapps - Change icons to a desired PNG format
I found a really cool web WPF project. It uses a framework called Mahapps. In the Hamburger menu there are some icons that use images from a package of Mahapps itself. I wonder if there is a…
-
1
votes1
answer398
viewsHow to cancel the execution of a function in C#
I am developing a C# WPF desktop application in which there is a function responsible for sending email EnviarEmail(), when this function is executed it takes a certain period of time for it to be…
-
1
votes1
answer261
viewsMahapps and WPF - How to apply "enhance" effect when I pass the Mouse over a Tile
I’m wearing a Framework called Mahapps in my project WPF and would like to apply a highlighting effect on Tile, when I passed the mouse over it. Someone knows how to do? <Page…
-
1
votes1
answer52
viewsHow do I fill in a combo I fill in her Value with wpf and c#
I made this code to fill out a combobox. It works perfectly, but I need besides the text to be presented in the combo, also need to load a kind of Value, as we do on the web where we have Name and…
-
1
votes1
answer85
viewsMahapps - Changing the Style of a Tile with Binding in a class property - MVVM
I’m creating a dynamic menu using Tiles (Mahapps). I have two types of Tiles that I can use: Largetilestyle and Smalltilestyle. For this, I have a function that allows me to pass the name of Style…
-
1
votes1
answer129
viewsHow to handle a rendering Exception in WPF (Windows Presentation Framework)
Randomly my system causes this Exception (which I only see because of the logs left in Windows events). It’s an app that runs around 24 hours a day every day. When error occurs, the screen freezes…
-
1
votes0
answers40
viewsModern UI Metro Chart - Mile Separator
I’m generating some graphics using Modern UI Metro Chart, but in one of the graphs the number would need to be shown with mile separator. Researching I found this discussion: Add Thousand separator…
-
1
votes1
answer83
viewsDisappearing image
I have 3 buttons with images that I position in the upper right corner of the screen. If I maximize the screen for only one monitor the images appear correctly, but when I maximize for two monitors…
-
1
votes1
answer72
viewsHow to Binding an element that was inherited from a User Control?
I set up a User Control that will be a screen model for me to implement other screens and avoid repetition of layout components. It contains a txbPsearch Textbox. <UserControl…
-
1
votes0
answers32
viewsCreate a button inside a Textbox - WPF/Mahapps
I need to create a button style that creates a button inside a Textbox. I am using WPF and a framework called Mahapps. But the problem is it’s getting that way: <Style TargetType="{x:Type…
-
1
votes1
answer365
viewsFill Linechart(Line chart) wpf with data from a sql server query
Hello, I’m having trouble finding a solution to fill my linechart with data from a query, my connection class is complete and working, but I don’t know how to apply on Chart, I don’t know how to…
-
1
votes1
answer44
viewsSend more than one string to serial
I’m creating a string through two values, one read through a slider and the other through a check box. Put the two together in a string called a and send at the same time in the serial. Follows the…
-
1
votes1
answer74
viewsHow to change the color of the icon inside a Rectangle - WPF
I need to change the color of my button icon to "White Color", but I don’t know how to do it. I’m using a Mahapss icon pack... I’ve seen it on the net using GRID’s Contentcontrol, but being inside a…
-
1
votes1
answer156
viewsDuplicate data on datagrid
I am developing an application in WPF and when I fill the datagrid via code it returns the duplicate value. I am using Entity Framework. XAML <DataGrid x:Name="dataLocal" Margin="10,111,11,10"…
-
1
votes1
answer1690
viewsMysql net Connector and Entity Framework problem
When I install the mysql connector in version 6.9.11, I can see the driver for ADO.Net, so far so good. But when I try to create the template I get the following error: Now when I install the 6.10.6…
-
1
votes0
answers60
viewswpf application with Entity framework does not work on another machine
I have a wpf application with Entity framework and sql server express...works perfectly on my pc, but when I try to install it on another computer it does not work...the application does not create…
-
1
votes0
answers120
viewsHow to declare a ternary condition in XAML as a parameter for a Custommarkupextension
Hello I’m starting to work with WPF and created a Custom Markup Extension leaving of this tutorial. The intention of this Markup Extension is to simulate the declarative conditions that are found in…
-
1
votes1
answer127
viewsHow do you expect a bool to stay true?
I have this method async currently waiting for a time declared by me. The program first restarts the boolean result and then send commands to a serial that after a certain time returns in my program…
-
1
votes0
answers32
viewsGhost object in WPF C#
I’m developing an application that displays an informative track in WPF C#, I’ve already developed it with Windows Form C#, and I’m wanting to apply an event I believe, that makes this track a kind…
-
1
votes2
answers184
viewsHow to call a parent window method when another daughter window is closed with WPF
Hello, I’m starting to work with WPF and my situation is as follows: I have a Mainwindow screen, which persists the application. The Mainwindow calls a new screen Regradetailsdialog in a certain…
-
1
votes1
answer109
viewsHow to equally divide Stackpanel’s space between children
I have a Stack Panel with a few buttons inside, I want the available Stack space to be divided equally between the buttons. <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">…