2,706 questions with Windows Presentation Foundation tags

Sort by: Updated
1 answer

I want to be able to select a folder and search/print to a list the key phrase I've specified. Currently I can only do individual files. I'm a beginner.

This is a MSDN question asked by spum0n1, the source is I want to be able to select a folder and search/print to a list the key phrase I've specified. Currently I can only do individual files. I'm a beginner.. using System; using…

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,706 questions
asked 2020-03-27T08:50:46.397+00:00
Charles He-MSFT 96 Reputation points Microsoft Employee
commented 2020-03-27T11:34:26.113+00:00
spum0n1 1 Reputation point
1 answer

WPF Media Element - Weird Colors

This is a MSDN question asked by TheKapster, the source is WPF Media Element - Weird Colors. Hi, I've used different videos in different formats but for some reason the built-in media element is displaying weird colors. What's supposed to be…

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,706 questions
asked 2020-03-27T08:44:15.207+00:00
Charles He-MSFT 96 Reputation points Microsoft Employee
answered 2020-03-27T09:13:14.433+00:00
Alex Li-MSFT 1,096 Reputation points
1 answer

TextBox. GetLineIndexFromCharacterIndex returns -1 when passing in large text

This is a MSDN question asked by moondaddy, the source is TextBox. GetLineIndexFromCharacterIndex returns -1 when passing in large text. The sample code below calls the GetLineIndexFromCharacterIndex method on the TextBox and it returns -1 when passing…

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,706 questions
asked 2020-03-27T08:34:24.123+00:00
Charles He-MSFT 96 Reputation points Microsoft Employee
answered 2020-03-27T09:02:41.893+00:00
Alex Li-MSFT 1,096 Reputation points
2 answers One of the answers was accepted by the question author.

WPF How to load Dictionaries as Application does?

I am converting application in to DLL (CLassLibrary) and therefore I cannot use App.Xaml (Application). Inside my Dictionaries I use StaticResources for Storyboards and animations. Unfortunately it is not possible to use DynamicResources for Storyboards…

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,706 questions
asked 2020-03-25T11:12:34.373+00:00
Code Wanderer 396 Reputation points
accepted 2020-03-27T08:58:47.297+00:00
Code Wanderer 396 Reputation points
1 answer

WPF tree view how do I add to the selected item

This is a MSDN question asked by WPF tree view how do I add to the selected item, the source is WPF tree view how do I add to the selected item. public List<TreeViewList> treelist = new List<TreeViewList>(); private void…

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,706 questions
asked 2020-03-27T08:29:26.57+00:00
Charles He-MSFT 96 Reputation points Microsoft Employee
answered 2020-03-27T08:56:58.087+00:00
Alex Li-MSFT 1,096 Reputation points
1 answer

Starting a Program

This is a MSDN question asked by Warp_Speed, the source is Starting a Program. Hi People I am a beginner to programming and self taught, but I was wondering if people could give me there opinion: Best way to build a WPF C# Program 1) Build the Code and…

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,706 questions
asked 2020-03-27T08:20:37.59+00:00
Charles He-MSFT 96 Reputation points Microsoft Employee
answered 2020-03-27T08:44:17.357+00:00
Alex Li-MSFT 1,096 Reputation points
1 answer

populate cascading combobox with Entity Framework

This is a MSDN question asked by zleug, the source is populate cascading combobox with Entity Framework. Hi All. I created simple WPF form with two ComboBoxes. I populated one ComboBox public List<Customer> GetApplication() { …

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,706 questions
asked 2020-03-27T08:16:46.233+00:00
Charles He-MSFT 96 Reputation points Microsoft Employee
answered 2020-03-27T08:40:05.227+00:00
Alex Li-MSFT 1,096 Reputation points
5 answers

Why is the DataBinding on my Windows.Media.brush not working?

I ran into a strange error This is the control <UserControl x:Class="PHOWjection_Software_3._0.CustomControls.LyricsDisplay" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" …

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,706 questions
asked 2020-03-26T04:10:07.433+00:00
Notch_Over_Heaven 1 Reputation point
answered 2020-03-27T04:08:31.73+00:00
Peter Fleischer (former MVP) 19,306 Reputation points
0 answers

Identify IPaddress/Hostname is of a printer and not a computer C# WPF

I have developed a application where user can add new printer and perform task with it, when adding new printer user needs to give IP Address or Hostname. If valid IP Address or Hostname is entered and is online then device is added to application. I…

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,706 questions
asked 2020-03-25T09:11:34.257+00:00
Priyank Ghorecha 1 Reputation point
commented 2020-03-26T06:18:48.1+00:00
Priyank Ghorecha 1 Reputation point
1 answer

UWP : Need Close Button in CustomEditControl and Mouse Events to be Active..

I have attached the project below.. Need Close Button in the textbox Need Mouse Events or cursor postion to be active in the textbox. https://1drv.ms/u/s!Ag8QU6ar3yRugYg7U-qDJ1o4VraieQ?e=8OnEqi s!Ag8QU6ar3yRugYg7U-qDJ1o4VraieQ …

Universal Windows Platform (UWP)
Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,706 questions
asked 2020-03-18T08:04:33.157+00:00
Indudhar Gowda 426 Reputation points
commented 2020-03-26T01:37:59.07+00:00
Richard Zhang-MSFT 6,936 Reputation points
2 answers One of the answers was accepted by the question author.

What is the best approach for launching a modal window, in WPF?

Where I work we're having a discussion trying to determine which is the best approach for launching a modal window in WPF, using the regular .NET Framework. (We're using .NET 4.5.2 for this project.) It is a new project that we're developing. We…

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,706 questions
asked 2020-03-02T20:47:26.617+00:00
Rod At Work 866 Reputation points
accepted 2020-03-25T21:30:04.807+00:00
Rod At Work 866 Reputation points
2 answers One of the answers was accepted by the question author.

Print with a printer that is not the one configured by default

Hi. I'm migrating from winForm to WPF and I have the following code which works very well: printDialog = new PrintDialog(); if (DialogResult.OK == printDialog.ShowDialog()) { try { PrintDocument pd = new…

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,706 questions
asked 2020-03-24T15:44:10.53+00:00
FABIAN RODRIGO ROMO 106 Reputation points
accepted 2020-03-25T10:39:01.24+00:00
FABIAN RODRIGO ROMO 106 Reputation points
1 answer

Using an image for the top of a ProgressBar's Value

Basically, I want to have a vertical ProgressBar that represents water and I'd like for the top of the ProgressBar line to be a wave instead of the default line. Is there a way to use an image like that in the ProgressBar? I really just need to have an…

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,706 questions
asked 2020-03-24T17:36:14.687+00:00
n0kx 1 Reputation point
answered 2020-03-25T03:59:02.513+00:00
Alex Li-MSFT 1,096 Reputation points
0 answers

Canvas.Setleft sometimes not working in the same condition

I want to achieve the effect of moving the rectangle edge (one rectangle moves along one side of another rectangle) using Canvas.SetLeft to set the left border of the moving rectangle. **Under the same conditions**, it can be achieved, but…

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,706 questions
asked 2020-03-21T15:51:26.847+00:00
Rancho 11 Reputation points
commented 2020-03-24T03:10:07.48+00:00
Alex Li-MSFT 1,096 Reputation points
4 answers One of the answers was accepted by the question author.

WPF Treeview Binding Problem

Evening, My Continents are displayed in the treeview in this case, and in the second piece of code my country's are displayed but i cant put both together, can somebody help. Thanks Madaxe <TreeView…

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,706 questions
asked 2020-03-21T22:42:31.933+00:00
Marc Jeeves 386 Reputation points
commented 2020-03-23T08:02:44.917+00:00
Peter Fleischer (former MVP) 19,306 Reputation points
0 answers

Additional question about a user control loading more than once

Earlier I asked why a datagrid was causing the window to load more than once. I got the answer, and thank you for your responses! However, in a strange coincidence, the release version of the app still exhibits the same behavior. Although it does…

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,706 questions
asked 2020-03-20T17:43:42.057+00:00
Rod At Work 866 Reputation points
commented 2020-03-22T14:09:05.547+00:00
Peter Fleischer (former MVP) 19,306 Reputation points
2 answers

Combobox with dynamically created items for enum type with text coming from Attributes won't support binding of SelectedItem

I have a custom WPF combobox that generates its contents based on an enum type it's told about via a XAML attribute. When that attribute sets the corresponding property, the control calls the function below. private void OnEnumTypePropChanged(string…

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,706 questions
asked 2020-03-18T17:42:52.56+00:00
Will Pittenger 281 Reputation points
answered 2020-03-21T10:03:41.937+00:00
Will Pittenger 281 Reputation points
1 answer

INSERT INTO (OLEDB) RAISED NO ERROR BUT NO NEW RECORD INSERTED

Hello. I'm new to WPF migrating from Windows Form. I'm creating a non-profit system for my village management to store data related to the residents. I need to add new user for login before adding new residents data and accessing the sensitive data. …

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,706 questions
asked 2020-03-19T17:12:06.037+00:00
Fiq 26 Reputation points
commented 2020-03-21T01:28:29.067+00:00
Fiq 26 Reputation points
1 answer One of the answers was accepted by the question author.

How do I get the XAML Designer to show side-by-side?

I must have fat fingered something which turned off the XAML view. Now all I see is the Designer. I want to see them both, side-by-side in the window. How do I get that back? I'm using VS 2019 Enterprise Edition, version 16.5

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,706 questions
asked 2020-03-18T21:56:47.693+00:00
Rod At Work 866 Reputation points
accepted 2020-03-20T21:31:13.08+00:00
Rod At Work 866 Reputation points
3 answers One of the answers was accepted by the question author.

Why does clicking on a datagrid cause the window to flash?

I'm working on a WPF app with a colleague at work. This app has a launch panel with 7 buttons. Clicking on any of the 7 buttons causes a new window to popup. These new windows all start with a datagrid, listing the contents of 1 of 7 tables,…

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,706 questions
asked 2020-03-17T20:54:18.047+00:00
Rod At Work 866 Reputation points
accepted 2020-03-20T14:03:43.45+00:00
Rod At Work 866 Reputation points