10,579 questions with C#-related tags

Sort by: Updated
0 answers

Selecting text across the elements

I am working on a UWP app where i will get the text content and their respective X and Y coordinates. I need to render this text in UI in the respective coordinates, I have achieved this through canvas panel and text block but here i face another…

Universal Windows Platform (UWP)
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,579 questions
asked 2024-07-08T05:50:54.8466667+00:00
shriram 90 Reputation points
1 answer

How to scroll in the tabs area in TabView in WinUI3 by using code

There are many tabs in a TabView Control in WinUI3 App. I made a function: pin a selected tab to top. After set it to the top (meaning the first tab ), I make it be selected. Everything is ok, but the first selected tab may be hidden if I had previously…

Windows App SDK
Windows App SDK
A set of Microsoft open-source libraries, frameworks, components, and tools to be used in apps to access Windows platform functionality on many versions of Windows. Previously known as Project Reunion.
747 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,579 questions
asked 2024-07-05T08:19:01.0566667+00:00
C CB 105 Reputation points
edited the question 2024-07-08T05:35:47.6966667+00:00
Roy Li - MSFT 32,726 Reputation points Microsoft Vendor
0 answers

webservice service System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)

I am currently encountering an issue with a web service. The server-side field MinimumOrderAmount is of type double, and in my receiving program, I have defined it as decimal. When the server sends a value of 9999999999 for MinimumOrderAmount, my program…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,573 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,396 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,579 questions
asked 2024-07-04T03:09:31.28+00:00
Xu Li 0 Reputation points
commented 2024-07-08T03:23:24.13+00:00
Xu Li 0 Reputation points
0 answers

Help Needed: Errors in Initial .NET MAUI Project

I have created my first .NET MAUI project several times, but to my surprise, errors appear without changing any line of code. Although the application runs fine, the lines remain underlined. I have captured a screenshot so you can see the issue and guide…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,147 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,579 questions
asked 2024-07-08T01:24:07.06+00:00
Roberto C 120 Reputation points
commented 2024-07-08T03:15:52.1233333+00:00
Leon Lu (Shanghai Wicresoft Co,.Ltd.) 71,596 Reputation points Microsoft Vendor
3 answers

EF Core - High Memory Usage For Query that Runs for 20 seconds

I'm wondering if there is a better way to optimize the below query. Granted, it's pulling in 80,000 - 160,000 records, but the RAM usage on my web server, shoots up to ~3gig while it's running for a total of 20 seconds, when testing it in my API, but,…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
719 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,579 questions
asked 2024-06-29T05:22:38.7933333+00:00
muttBunch 100 Reputation points
commented 2024-07-08T03:08:53.3433333+00:00
Hongrui Yu-MSFT 785 Reputation points Microsoft Vendor
2 answers

On remote desktop machine (Windows 11), the DataGrid (WPF C# application .Net Framework 4.7.2) event is throwing System.Reflection.TargetInvocationException.

The DataGrid event is giving the exception"System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: Added item does not appear at given index '4'. " while…

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,706 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,579 questions
asked 2024-07-01T14:03:37.68+00:00
Sharayu Mahadeorao P 0 Reputation points
commented 2024-07-08T02:30:46.19+00:00
Hongrui Yu-MSFT 785 Reputation points Microsoft Vendor
0 answers

Issues with Access Permissions in PhoneLineTransportDevice API on Windows 11

I am currently working on a hands-free application on Windows and using the PhoneLineTransportDevice API. To utilize the features of this API, I initially request access permissions using the PhoneLineTransportDevice.RequestAccessAsync() method. This…

Universal Windows Platform (UWP)
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,579 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
8,805 questions
asked 2024-07-07T03:07:39.5133333+00:00
Taylor Yi 0 Reputation points
commented 2024-07-08T02:11:59.5533333+00:00
Taylor Yi 0 Reputation points
2 answers

How Can I track the Last DPI which is sent by WM_DPICHANGED in WPF?

I want to scale my WPF application according to available screen DPI. I know there Per Monitor DPI aware available but that are completely different what I want to achieve. I want to disable scaling for my WPF application even if windows has some scale…

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,706 questions
Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,501 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,579 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,616 questions
asked 2024-06-23T21:10:17.6933333+00:00
MERUN KUMAR MAITY 531 Reputation points
commented 2024-07-08T02:00:19.47+00:00
Hongrui Yu-MSFT 785 Reputation points Microsoft Vendor
4 answers One of the answers was accepted by the question author.

Save an image using Maui.net graphics

How do I save Maui.net graphics to png file ?

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,147 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,579 questions
asked 2022-06-23T18:14:21.013+00:00
Yusuf 731 Reputation points
commented 2024-07-08T00:45:10.55+00:00
Leon Lu (Shanghai Wicresoft Co,.Ltd.) 71,596 Reputation points Microsoft Vendor
0 answers

Visual studio compiler error

have this problem: I can't run the code, it says: The "ResolveAppHosts" task was not given a value for the required parameter "RuntimeGraphPath". I don't know what I can do, please help me .NET version 6.0, C#

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,828 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,579 questions
Visual Studio Debugging
Visual Studio Debugging
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Debugging: The act or process of detecting, locating, and correcting logical or syntactical errors in a program or malfunctions in hardware. In hardware contexts, the term troubleshoot is the term more frequently used, especially if the problem is major.
963 questions
asked 2024-07-07T20:45:55.3733333+00:00
Yura Yarotskyi 0 Reputation points
1 answer

AppShell- Failed to Navigate Back, Ambiguous routes matched for.... but i've only registered routes once

I am building an Xamarin Forms app for iOS and Android. I registered my routes in AppShell.xaml.cs globally like this: **-AppShell.xaml.cs-** Routes.Add(nameof(HousingFolderPage), typeof(HousingFolderPage)); Routes.Add(nameof(HousingFolderDetailsPage),…

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,321 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,396 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,579 questions
asked 2023-03-26T23:28:07.2466667+00:00
Nabil 6 Reputation points
commented 2024-07-07T18:26:48.8433333+00:00
Danilo Barcellos 0 Reputation points
1 answer One of the answers was accepted by the question author.

Referencing controls within a class

I would like to know how I would reference a control within a class. This is a code snippet example: Would need to create a class fille first, or would I create a class within the main project file? This is to use and instantiate the class again in…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,828 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,579 questions
asked 2024-07-06T19:17:34.46+00:00
John 446 Reputation points
accepted 2024-07-07T17:28:11.9833333+00:00
John 446 Reputation points
2 answers

XmlSerializer problem with prefix and namespace

Hello, Is there a way to generate this output via serialization? <COM_1 xmlns="urn:biztalk-org:biztalk:biztalk_1"> <body> <doc:Z_COATING_ORDER xmlns:doc="urn:sap-com:document:sap:rfc:functions"…

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,579 questions
asked 2024-07-04T17:19:54.7+00:00
Noah Aas 360 Reputation points
edited a comment 2024-07-07T16:32:45.58+00:00
Noah Aas 360 Reputation points
2 answers

REST interface possibilities

Hello, I have seen a code snippet like this, can I return more than two objects in this task? Then I can ask it like this. bool responseState = false; string responseData = ""; (responseState, responseData) = await…

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,579 questions
asked 2024-07-04T17:26:43.7733333+00:00
Noah Aas 360 Reputation points
edited a comment 2024-07-07T16:27:44.9433333+00:00
Noah Aas 360 Reputation points
1 answer

.Net Maui writing to Xaml file.

I would like the user to be able to modify the XAML to fit their visual needs for example make text larger. And then be able to save that setting and reload the XAML file for that particular user. I get a compiler Error saying the name 'XamlWriter' does…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,147 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,579 questions
asked 2024-07-03T16:12:26.7433333+00:00
Tom Meier 180 Reputation points
commented 2024-07-06T16:34:19.55+00:00
Bruce (SqlWork.com) 60,386 Reputation points
1 answer

Out of Memory exception when using Windows MediaElement Class C#

Hello, We are trying to run multiple h264 videos in a loop using MediaElement class in C# WPF windows application. We ran into out of memory exception after running it for a while. We observed unmanaged memory shooting up more than a GB. Please find the…

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
11,078 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,579 questions
asked 2024-07-05T12:41:48.65+00:00
Rengarajan, Narayanan 0 Reputation points
answered 2024-07-06T00:11:25.84+00:00
Wesley Li 6,190 Reputation points
1 answer

Unable to get access token for microsoft store service

Hi, I am building an app for the Microsoft Store. I require the app's server to connect to the microsoft store to validate purchases. I'm using the Microsoft.StoreServices API provided at: https://github.com/microsoft/Microsoft-Store-Services Basically…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,346 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,147 questions
Microsoft Partner Center
Microsoft Partner Center
A Microsoft website for partners that provides access to product support, a partner community, and other partner services.
917 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,579 questions
asked 2024-06-09T22:08:13.59+00:00
Jacques O 0 Reputation points
edited an answer 2024-07-05T23:37:21.75+00:00
Jacques O 0 Reputation points
3 answers

How to setup Excel Interop for Exccel 365

I've been attempting to setup a project that allows me to use Excel Interop in C# on the Office 365 version (I need to create and edit some sheets to automate some tasks from work involving CSV files). However almost every attempt has resulted in the…

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,579 questions
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,686 questions
asked 2022-07-24T23:40:22.707+00:00
Zach Sim 26 Reputation points
commented 2024-07-05T19:43:39.39+00:00
Emmanuel Idun 0 Reputation points
0 answers

Intermittent Connection Timeout issue

We have built a .Net Core 8.0 based project in which we are calling an external api every 5 mnts. Everytime this code is invoked , it will fetch around 50 records and create the payload in json object and do a PostAsync call to th external url. I am…

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,579 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,281 questions
asked 2024-07-05T19:00:16.17+00:00
Dey, Subir 0 Reputation points
1 answer One of the answers was accepted by the question author.

Setting PropertyBag Property without allowing custom scripts

We are setting Propery Bag values of a Sharepoint Online Web from an Azure Function using the Microsoft.SharePoint.Client (Microsoft.SharePointOnline.CSOM) Library with the SetPropertyBagValue. For setting a Property Bag value the "Allow Custom…

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,159 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,579 questions
asked 2024-07-04T12:35:08.1166667+00:00
Martin Ewald 20 Reputation points
accepted 2024-07-05T09:42:23.22+00:00
Martin Ewald 20 Reputation points