ToolStripDropDownButton equivalency in WPF?

I'm very newbie to the WPF technology. I've been developing in WinForms for around 6 years. Now I would like to advance one big step in my skills by learning WPF. I'm reading the introduction guides in MSDN, while as a personal exercise I'm trying t...
more »

2017-09-16 06:09 (1) Answers

How to dynamically export a chart in WPF?

I am working on generating dynamically a chart and then save it to an image file (it does not have to be shown in UI.) Here is my code for chart in WPF code. <chart:PieChart Name="chart1" Style="{StaticResource Min...
more »

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

using path in other computer

How can I use my database with another computer without changing the path? I'm using this path SQLiteConnection conn = new SQLiteConnection( "data source=C:\\Users\\users\\Documents\\Visual Studio 2012\\Projects\\SKM Computerized Payroll System\\d...
more »

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

Get timespan of every row in datagridview in C#

So I doing a small agenda and I will insert the to-do list into a database and populate it in the DataGridView along with the DateTime.Now when I saved it. If I forget to do something of that list it will display a notification and tell me that I for...
more »

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

Dynamic XSLT generation based on changes in XSD

Initially I had various XSD definition for each XSD I had set of XML files stored. After some time duration there are some changes in XSD definition so my stored XML is no more validation again new XSD. For support I need to write XSLT and do chang...
more »

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

Create Save And Load Functionality For A Winform

I have a winform with 5 text boxes and 2 data grids. I need a way of being able to press a button (or adding a menu at the top with a file button and select save from there) and save all of the values to a file that the user selects location/name fo...
more »

2017-07-28 02:07 (1) Answers

VB.NET - Can't get Integer to work

I'm working with Windows Forms Application in Visual Studio 2015, using .NET Framework 4.5.2. So I'm making a simple program which includes a label to display a value. The label (called lblMoney) displays the currency (in this case, $) and then the v...
more »

2017-07-15 23:07 (3) Answers

C# ArgumentOutOfRangeException when closing forms

I am writing a WinForms C# Program. I am trying to close all forms except my main form, FrmMain. I must hide my main form. I produced this by having two forms open. One with my main form, and one with another form shown with the ShowDialog() metho...
more »

2017-07-09 06:07 (1) Answers

How to get wpf window instance from winforms

After login I'm opening this Mainwindow MainWindow window = new MainWindow(); and closing the Login window. In the main window there is a windows form I'm initializing globally Scanner form = new Scanner(); I'm hiding and showing this Scanner ...
more »

2017-07-01 10:07 (3) Answers

Properly detect keyboard layout

I have a winforms application where I need to obtain the current keyboard layout of the user. To do that I'm using System.Windows.Forms.InputLanguage.CurrentInputLanguage.LayoutName. This works fine as long as the user has the form as his active win...
more »

2017-07-01 01:07 (2) Answers

Cross thread invoke exception

In order to change a control by another thread, I need to invoke a delegate to change the control However, it is throwing a TargetParameterCountException: private void MethodParamIsObjectArray(object[] o) {} private void MethodParamIsIntArray(int[] ...
more »

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

Downloading an .ico file from DuckDuckGo

I'm currently using the DuckDuckGo icon utility to fetch the favicon's for certain webpages, although in order to fetch an icon it requires you to add ".ico" at the very end of the request, for example: https://icons.duckduckgo.com/ip2/www.google.com...
more »

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

Windows Forms resized after loading WPF

I'm experiencing a strange behavior, one for which I currently do not have an explanation or a solution and I'm hoping someone knows something about this. So I have a simple Windows Forms application with a single button, which on button click will ...
more »

2017-06-11 12:06 (1) Answers

How to fill ContextMenuStrip in XAML?

I've created WPF application with NotifyIcon to work in tray. public partial class MainWindow : Window { public NotifyIcon NotifyIcon { get; } = new NotifyIcon { Icon = Properties.Resources.status_on_ico, Visible = true }...
more »

2017-06-06 14:06 (1) Answers