24,711 questions with .NET-related tags

Sort by: Updated
1 answer

WPF ComboBox binding

How can I make a ComboBox to display the selected item? I have following ComboBox declared in XAML: <ComboBox Margin="4 0 2 0"; ItemsSource="{Binding YAxes}" SelectedItem="{Binding SelectedYAxis,…

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,703 questions
asked 2020-03-18T11:34:37.233+00:00
Arli Chokoev 1 Reputation point
commented 2020-03-30T12:28:51.407+00:00
Peter Fleischer (former MVP) 19,306 Reputation points
1 answer

Binding to a DependencyProperty from a ControlTemplate

I have a UserControl with a DependencyProperty called "MyObject." In UserControl.Resources I have a ControlTemplate with a Rectangle and I'm wanting to change the Fill based on a Property in MyObject using DataTriggers. I'm just not sure how…

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,703 questions
asked 2020-03-30T00:52:22+00:00
n0kx 1 Reputation point
answered 2020-03-30T04:59:16.79+00:00
Alex Li-MSFT 1,096 Reputation points
0 answers

static resources color name

<sys:Double x:Key="Window.Main.Background" >1200</sys:Double> ///////////////////////////////////////////////////////////////////////////////////// <Window x:Class="DCAD.MainWindow" …

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,703 questions
asked 2020-03-28T16:12:40.513+00:00
essamce 621 Reputation points
commented 2020-03-30T03:13:03.113+00:00
Alex Li-MSFT 1,096 Reputation points
2 answers

App won't come to the foreground when started

This is a MSDN question asked by Will Pittenger, the source is App won't come to the foreground when started. I have a WPF application that when I start it from Visual Studio, its main Window goes to the background rather than becoming the foremost…

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,703 questions
asked 2020-03-27T07:41:31.56+00:00
Charles He-MSFT 96 Reputation points Microsoft Employee
commented 2020-03-28T18:27:38.407+00:00
Viorel 114K Reputation points
2 answers

Removing line chart datapoints where dependency property is null

This is a MSDN question asked by Mike Whalley, the source is Removing line chart datapoints where dependency property is null. I have a line and bar chart showing the monthly movement in a bank account and the account balance (cashflow) as illustrated: …

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,703 questions
asked 2020-03-27T08:01:54.197+00:00
Charles He-MSFT 96 Reputation points Microsoft Employee
answered 2020-03-27T16:49:34.557+00:00
Mike Whalley 71 Reputation points
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,703 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,703 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,703 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,703 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,703 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,703 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,703 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,703 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,703 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,703 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,703 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,703 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,703 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,703 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,703 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