Category "wpf"

ShowBalloonTip Not Working

On Windows 10, the ShowBalloonTip method of NotifyIcon NEVER shows the balloon tip. This would appear to have something to do with Windows itself. If I go to S

ListView SelectedItem not highlighted when set in ViewModel

I have a ListView with a ItemSource data binding and a SelectedItem data binding. The ListView is populated with a new ItemSource every time I press the Next o

Moq verifies in debug and fails sometimes in run

I've developed a wpf-mvvm application that uses wmi to document what is built into a given Computer into a json file. I've used the mvvm model to develop the ap

Binding to a structure

I am trying to bind a listview item to a member of a structure, but I am unable to get it to work. The structure is quite simple: public struct DeviceTypeInfo

Image not displaying at runtime C# WPF

I have been trying to learn C# but I'm coming across a lot of problems. I am trying to display an image in WPF but for some reason, the image won't show! It app

Add a breakline in tooltip

¿How can I add a breakline to a text inside a tooltip in XAML? I try with this: <Label Name="label4" UseLayoutRounding="False" Focusable="Fa

Add a breakline in tooltip

¿How can I add a breakline to a text inside a tooltip in XAML? I try with this: <Label Name="label4" UseLayoutRounding="False" Focusable="Fa

dataGrid doesn't update when item property has changed

So I have almost identical thing set up with TextBoxes/ListBoxes and so on but it just doesn't seem to work with dataGrid.. So I have a view Index which contai

Converter of System.Drawing.Point' to 'System.Windows.Point

I am trying to draw few entities in WPF. My collection contains System.Drawing.Rectangle objects, When I try to access the location of those objects in WPF XAML

Custom ContextMenu Command in Datagrid's Textbox from ViewModel

I have a UserControl which includes Datagrid. Inside Datagrid I've set EditingElementStyle with Textboxes that have ContextMenu for Copy/Paste commands. I need

Custom ContextMenu Command in Datagrid's Textbox from ViewModel

I have a UserControl which includes Datagrid. Inside Datagrid I've set EditingElementStyle with Textboxes that have ContextMenu for Copy/Paste commands. I need

Monitor.TryEnter doesn't work

Part of my code-behind: object _sync = new object(); private async void OnKeyDown(object sender, KeyEventArgs e) { if (!Monitor.TryEnter(_sync)) return;

WPF Tab Control Prevent Tab Change

I'm trying to develop a system maintenance screen for my application in which I have several tabs each representing a different maintenance option i.e. maintain

Is there any way to remove bindings from all bound elements on a form close event?

According to this document, the following code causes a memory leak in WPF: myDataBinding = new Binding("Children.Count"); myDataBinding.Source = myGrid; myDat

Using FolderBrowserDialog in WPF application [duplicate]

I have a WPF application that I need to have users access directories in. I have searched to the end of the world on how to integrate windows

Getting current page of a FlowDocumentPageViewer

I have a FlowDocumentPageViewer control that I am populating from the code behind. I am adding text from 3-4 items. I need to know on what page item 1,2,3...

How to prevent TextBox auto scrolls when append text?

I have a multi-line TextBox with a vertical scrollbar that logs data from real-time processing. Currently, whenever a new line is added by textBox.AppendText(),

String.Format, Currency, Polish Złoty

I am developing an e-commerce administration panel in WPF. I would like to display currency values in PLN (Polish Złoty). Format {0:C} gives output in USD

How I Can Refresh ListView in WPF

Hi I am using WPF and adding records one by one to the listview.ItemsSource. My data will appear when all the data is included, but I want to show the data as

How to draw a function plot in WPF?

I am a simple housewife and I like to plot a polynomial function for my unmotivated daughter. I have made a grid in WPF, in one cell I want to draw the graph of