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,…
![](https://techprofile.blob.core.windows.net/images/319aafad7757470c87140361047582b7.png)
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…
![](https://techprofile.blob.core.windows.net/images/e132fda0c00c4bb98c608a076c87a4cb.png)
static resources color name
<sys:Double x:Key="Window.Main.Background" >1200</sys:Double> ///////////////////////////////////////////////////////////////////////////////////// <Window x:Class="DCAD.MainWindow" …
![](https://techprofile.blob.core.windows.net/images/e132fda0c00c4bb98c608a076c87a4cb.png)
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…
![](https://techprofile.blob.core.windows.net/images/JiX-lf2_BgAAAAAAAAAAAA.png?8D8532)
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: …
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…
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…
![](https://techprofile.blob.core.windows.net/images/e132fda0c00c4bb98c608a076c87a4cb.png)
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…
![](https://techprofile.blob.core.windows.net/images/e132fda0c00c4bb98c608a076c87a4cb.png)
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…
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…
![](https://techprofile.blob.core.windows.net/images/e132fda0c00c4bb98c608a076c87a4cb.png)
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…
![](https://techprofile.blob.core.windows.net/images/e132fda0c00c4bb98c608a076c87a4cb.png)
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() { …
![](https://techprofile.blob.core.windows.net/images/e132fda0c00c4bb98c608a076c87a4cb.png)
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" …
![](https://techprofile.blob.core.windows.net/images/319aafad7757470c87140361047582b7.png)
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…
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 …
![](https://techprofile.blob.core.windows.net/images/5da524cc22d64bf480edd8d86c64a8f5.png)
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…
![](https://techprofile.blob.core.windows.net/images/fefadda8866e4e3f859dcdf8cef56e0e.png)
![](https://techprofile.blob.core.windows.net/images/fefadda8866e4e3f859dcdf8cef56e0e.png)
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…
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…
![](https://techprofile.blob.core.windows.net/images/e132fda0c00c4bb98c608a076c87a4cb.png)
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…
![](https://techprofile.blob.core.windows.net/images/503f346dfbc348e1ad87db99765cd344.png)
![](https://techprofile.blob.core.windows.net/images/e132fda0c00c4bb98c608a076c87a4cb.png)
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…
![](https://techprofile.blob.core.windows.net/images/319aafad7757470c87140361047582b7.png)