24,725 questions with .NET-related tags

Sort by: Updated
2 answers One of the answers was accepted by the question author.

Advice on design to handle server connection

Hello I am trying to work out how to include in the design of my WPF, C#, EF6, MVVM App code to handle a case if its SQL database is moved to a new server for example. Can one code for this situation so App can trap exception then allow a new server…

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,705 questions
asked 2020-11-02T09:32:12.743+00:00
Scott Thomson 56 Reputation points
commented 2020-11-03T10:10:23.523+00:00
Scott Thomson 56 Reputation points
1 answer One of the answers was accepted by the question author.

WPF DependencyProperty Not Working with .Net Core

For years, I have had the benefit of using code from an excellent Code Project article submitted by David Veeneman. You can view the article and download the code at https://www.codeproject.com/Articles/49802/Create-a-WPF-Custom-Control-Part-2. …

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,705 questions
asked 2020-11-02T21:36:42.423+00:00
R Evans 211 Reputation points
accepted 2020-11-03T04:22:42.97+00:00
R Evans 211 Reputation points
4 answers One of the answers was accepted by the question author.

Generic ICommand error

I've these ICommand: public ICommand Add { get; set; } public ICommand Remove { get; set; } initialized this way: Add = new Command<Item>(add, (o) => true); Remove = new Command<IEnumerable<Item>>(remove, (o) => true); when…

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,705 questions
asked 2020-10-29T13:07:03.41+00:00
Emon Haque 3,176 Reputation points
commented 2020-11-02T12:32:10.033+00:00
Emon Haque 3,176 Reputation points
2 answers One of the answers was accepted by the question author.

Font Dialog not returning exact font size

i am working with font dialog from my winform project. if (fontDlg.ShowDialog() == DialogResult.OK) { FontName = fontDlg.Font.Name; FontStyle = fontDlg.Font.Style.ToString(); …

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,868 questions
asked 2020-10-29T17:05:18.433+00:00
Sudip Bhatt 2,271 Reputation points
commented 2020-11-02T09:18:32.617+00:00
Viorel 114K Reputation points
2 answers

How to avoid crash multi projects application

Hi All. I have multi projects WPF application. I understand how to prevent the crash if error become in UI layer. But how to create message and inform a user if error happens in data layer? How to send a message on a screen if try-catch block catch 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,705 questions
asked 2020-10-30T19:49:22.7+00:00
zleug 61 Reputation points
answered 2020-11-02T09:02:06.717+00:00
Duane Arnold 3,216 Reputation points
1 answer

How to set default font settings when opening font dialog

This is my code and this way i am opening font dialog. how could i open font dialog with default font settings? i want to set Font Name, Font Style, Font Size and underline etc when opening font dialog. if (fontDlg.ShowDialog() == DialogResult.OK) …

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,868 questions
asked 2020-10-31T10:25:58.157+00:00
Sudip Bhatt 2,271 Reputation points
commented 2020-11-02T08:20:37.9+00:00
Sudip Bhatt 2,271 Reputation points
2 answers

I need some help diagnosing an SEHException: External component has thrown an exception

This is a Windows Forms application using VB.Net and VS2012. It connects to an Access database with an oledbconnection and the 2013 Access Runtime. (It also connects with the corresponding SQLconnection to SQL Server without the problem below). The app…

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,868 questions
asked 2020-10-18T20:59:21.26+00:00
Greydog1 1 Reputation point
answered 2020-11-02T06:45:24.84+00:00
Greydog1 1 Reputation point
0 answers

ioexeption

hi i want the reason of this exeption, i spent hours but i didn't find the reason, visual studio 2019Version 16.6.4, wpf .net core3.1 application. thanks in advance.

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,705 questions
asked 2020-11-01T05:23:13.897+00:00
essamce 621 Reputation points
commented 2020-11-02T03:56:46.167+00:00
essamce 621 Reputation points
1 answer One of the answers was accepted by the question author.

How to make IcollectionView's Filter generic?

I've an ICollectionView wrapped in a Class<T>: public class CollectionView<T> : ICollectionView { ... ICollectionView view; public CollectionView(Collection<T> source) { ... view =…

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,705 questions
asked 2020-10-30T09:33:07.743+00:00
Emon Haque 3,176 Reputation points
commented 2020-11-01T10:07:26.167+00:00
Emon Haque 3,176 Reputation points
1 answer One of the answers was accepted by the question author.

How to apply animation on ListBoxItem before removal?

I've a Custom Control EditListBox: public class EditListBox : ListBox { static EditListBox() { DefaultStyleKeyProperty.OverrideMetadata(typeof(EditListBox), new FrameworkPropertyMetadata(typeof(EditListBox))); } protected…

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,705 questions
asked 2020-10-25T11:52:49.217+00:00
Emon Haque 3,176 Reputation points
commented 2020-11-01T02:08:52.74+00:00
Emon Haque 3,176 Reputation points
3 answers

Windows Forms, C# and/or VB - using .NET

Hi! I would like to use the .NET framework either with C# or VB creating a Windows Forms application. The underlying database is a Microsoft SQL server. New to Microsoft, but I would like to use the capabilites of the .NET framework - like OO etc. …

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,868 questions
asked 2020-09-02T09:08:04.26+00:00
Inkimar 1 Reputation point
answered 2020-10-31T14:00:58.233+00:00
Karen Payne MVP 35,291 Reputation points
2 answers

log4net in WPF application

Hi All. I'm trying to log exceptions in wpf application. For that I installed log4net package and modified app.config file <configSections> <section name="log4net"…

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,705 questions
asked 2020-10-29T00:50:19.233+00:00
zleug 61 Reputation points
commented 2020-10-31T00:39:38.273+00:00
Duane Arnold 3,216 Reputation points
2 answers One of the answers was accepted by the question author.

WPF: how to enable DataGrid ID cells in first column editable when highlight it from code?

Our application is WPF application. In a page, there are two controls. One control is WPF DataGrid which include 5 columns. Only first and last columns are editable. First column represent ID. Fifth column represents comment. DataGrid includes 96…

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,705 questions
asked 2020-10-29T23:44:52.23+00:00
Jane Jie Chen 346 Reputation points
accepted 2020-10-30T07:17:19.22+00:00
Jane Jie Chen 346 Reputation points
1 answer

This operation returned because the timeout period expired. (Exception from HRESULT: 0x800705B4)

While executing following code exception occurred at production environment. CompilerResults cr = provider.CompileAssemblyFromSource(cp, code.ToString()); Exception Details:- Message: This operation returned because the timeout period…

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,868 questions
asked 2020-10-28T07:55:51.09+00:00
Khakindra Devkota 1 Reputation point
commented 2020-10-30T05:14:41.357+00:00
Daniel Zhang-MSFT 9,621 Reputation points
2 answers One of the answers was accepted by the question author.

Dynamic Web Service Invocation using Aync Method

Hello, I am trying to implement a class library that I can use to dynamically invoke Web Services. I have built the following code from samples that I have found on the web: using System; using System.Collections.Generic; using System.Linq;…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,562 questions
asked 2020-10-27T17:26:39+00:00
Matt Paisley 116 Reputation points
answered 2020-10-30T01:25:25.383+00:00
Peng Ding-MSFT 96 Reputation points
0 answers

winform + dotnet core 3.1 + xamarin(skiasharp) is it ok?

env: winform + dotnet core 3.1 I want to implement touch events, etc. using xamarin.forms (skiasharp). Drawing a simple shape in skcontrol succeeded. I'm curious if it's okay to implement the touch event listed in the demo project. I am curious…

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,868 questions
asked 2020-10-28T08:32:10.307+00:00
은서 정 1 Reputation point
commented 2020-10-29T06:37:02.703+00:00
Daniel Zhang-MSFT 9,621 Reputation points
1 answer

Can't find XML files in published C# project

So I have created a Windows Forms app in C# using Visual Studio. The app saves data to .xml files in C:\Users\Me\source\repos\MyApp\MyApp\bin\Debug (default location), and works perfectly when building inside VS. My program uses simple LINQ…

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,868 questions
asked 2020-10-28T15:03:19.983+00:00
Carl 1 Reputation point
answered 2020-10-29T02:58:38.597+00:00
Daniel Zhang-MSFT 9,621 Reputation points
1 answer

WPF - Refreshing UI Problems with Serial.Datareceived

Hello, I am working on an HMI with WPF and arduino through Serial Port. Objectives (by now) are: Receive data of the sensors continuously. Send data to enable and disable pumps. Send data with the PH limits. UI must update…

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,705 questions
asked 2020-10-22T12:46:57.95+00:00
Enrique Flores Fontau 1 Reputation point
answered 2020-10-29T01:50:47.197+00:00
DaisyTian-1203 11,621 Reputation points
2 answers

How to construct NotifyCollectionChangedEventArgs for Multiple Replace and Remove

I've 3 ICommand Add, Remove and Replace. Add adds 3 items to the Collection: void add(object o) { var index = Items.Count; for (int i = 0; i < 3; i++) { Items.Add(new Item() { Id = ++count, …

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,705 questions
asked 2020-10-22T12:28:43.26+00:00
Emon Haque 3,176 Reputation points
commented 2020-10-29T00:33:29.343+00:00
Emon Haque 3,176 Reputation points
1 answer One of the answers was accepted by the question author.

How to make a GroupBox size to its content

Very simple request. How do I make (or can I make) a GroupBox size to its content. I have a groupbox which contains a number of items in a stackpanel. If I add a value then the GroupBox will not show the value. I have tried with height and width set…

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,705 questions
asked 2020-10-27T14:05:25.08+00:00
Lloyd Sheen 1,476 Reputation points
accepted 2020-10-28T21:28:08.43+00:00
Lloyd Sheen 1,476 Reputation points