Can't explain leading whitespace in FlowDocument

I'm using a conventional FlowDocument setup with a Floater and a Run to wrap text around an image. I get a leading whitespace that I don't understand. Can anybody help? (Before anybody suggests removing the Run: I want to use an actual Run element he...
more »

2017-08-11 21:08 (1) Answers

F# persist some user values for WPF app

In my small WPF app (F# only) I would like to remember the window size and location after closing. This C# solution suggest to use the projects settings IDictinary for User.config. This looks like the simple approach that I am after but I did not fin...
more »

2017-08-11 14:08 (2) Answers

PasswordVault security when used from Desktop app

I'd like to use Windows.Security.Credentials.PasswordVault in my desktop app (WPF-based) to securely store a user's password. I managed to access this Windows 10 API using this MSDN article. I did some experiments and it appears that any data writt...
more »

2017-08-11 10:08 (3) Answers

wpf custom textbox with a depedency property crash

Here's my first attempt at using extending a textbox with a dependency property, based on an example I found online. My solution consists of 2 projects: A wpf application, and a class library. Here's my class library: namespace CustomTextBox { pub...
more »

2017-08-10 16:08 (1) Answers

Delegate WPF Event

I have a WPF Project with following XAML Code: <GroupBox Name="GroupBox1"> <GroupBox.Header> <WrapPanel> <CheckBox Name="CheckBox1"/> <Label Name="label1" Content="Extend" MouseLeft...
more »

2017-08-10 12:08 (2) Answers

WPF UserControl Triggers from parent window

I have a UserControl within a frame on it's parent window. In the usercontrol, I have a textbox that needs to be edited when a button on the parent window is toggled. I'm trying to do it using triggers UserControl.xaml <UserControl.Resources>...
more »

2017-08-10 12:08 (1) Answers

DataGrid detect ONLY changes made by user

I have a financial application where the user can enter invoice amounts into a DataGrid. The DataGrid is bound to an ObservableCollection of amounts, each amount is composed of Gross, VAT rate, VAT and Net. The requirement is that whenever the user e...
more »

2017-08-10 10:08 (1) Answers

How to stop TabItems moving around

I have a TabControl with lots of TabItems creating 2 rows of tab items. When I click on a tab in the first row, the whole row moves to the second row position and the second row moves to the top. How do I stop these tabs from moving around? Before...
more »

2017-08-09 20:08 (1) Answers

How can I hide a spinner after a while?

I wanna put a spinner loading and after a while (about 3, 4 seconds) to hide it. How can I do it? <StackPanel Grid.ColumnSpan="5" Grid.RowSpan="10" Background="White"Name="spinner"> <fa:ImageAwesome Width="80" Icon="Spinner" Spin="Tru...
more »

2017-08-09 19:08 (2) Answers

Browser not supported by Google Maps

i wrote a small progam (C#, WPF, .Net 4.6) with a Frame. After loading a HTML file with a google map I got this error: The browser you are using is not supported by the Google Maps JavaScript API. Use a different browser. I already have add the...
more »

2017-08-09 09:08 (2) Answers

Async method call on ComboBox selection with MVVM

I'm facing a problem with displaying graphs filtered by ComboBox selection without having the UI lock up. The statistic filtering is quite heavy and needs to run async. This works fine all up until I try to call FilterStatisticsAsync and MonthSelecti...
more »

2017-08-08 17:08 (1) Answers

How to use a dynamic value for StringFormat

I have a combo box that is bound to an a list of objects of type MyObject: public class MyObject { public string Template { get; set; } public string Parameter { get; set; } } The string "Template" is a string that should be used with Stri...
more »

2017-08-08 16:08 (3) Answers

Disable scrolling for mouse-over in ComboBox (WPF)

Is it possible to disable the autoscrolling effect in a ComboBox Dropdown? The Problem is when the mouse is hovered over the last element of the open ComboBox it automatically scrolls to the next element. And in my case the ComboBox is at the bottom...
more »

2017-08-08 13:08 (1) Answers

A command from a context menu that does not work

Well, I have a WPF project and I'm using Visual Studio 2010. I'm using C# and XAML, and I'm using the MVVM pattern. The problem I have must be simple but I just can't see why it's not working. Alright, so I have a project with a ListBox. In that Li...
more »

2017-08-07 16:08 (1) Answers

View Controls show/hide WPF MVVM

I have a View (in MVVM) which have some controls including a treeview. A ViewModel which is the datacontext and a Model, everything is working fine till now. **I have two cases: ** I want my View to show a ContextMenu against Treeview items. The ot...
more »

2017-08-07 12:08 (1) Answers

Importing Image names

I am working on a wpf project where I have to display a lot of images. I stored the images in a folder in my solution and set the "build action" property to resource. At the moment I have stored each image path in a list e.g /Engine;component/Image/...
more »

2017-08-06 23:08 (0) Answers

How to add DataGridView control using VS2015?

I am totally new to programming in c# and have no previous experience with Object Oriented programming. I am teaching myself, so please I have many questions. I created a simple array that takes information from (STEP Text file) and displays it in a ...
more »

2017-08-06 22:08 (1) Answers

WPF Application - Xamarin Visual Studio

I am trying to create a desktop application for windows using Xamarin Visual Studio but i cannot find WPF application. I saw in other S.O questions that Visual Studio does support. Do i have to install any plugin? ...
more »

2017-08-06 17:08 (2) Answers