10,904 questions with C#-related tags

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

search code does not execute (xaml page,pagemodel or MVVM )

I'm trying to add a search bar to my app, but can not get the code to execute. I've placed breakpoints in the pagemodel but they are tripped. Xaml: <SearchBar x:Name="searchBar" HorizontalOptions="Fill" …

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,475 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,904 questions
XAML
XAML
A language based on Extensible Markup Language (XML) that enables developers to specify a hierarchy of objects with a set of properties and logic.
808 questions
asked 2024-10-01T13:18:57.4+00:00
tim 180 Reputation points
commented 2024-10-03T21:15:43.33+00:00
tim 180 Reputation points
2 answers One of the answers was accepted by the question author.

Error (active) CS1061 'RSA' does not contain a definition for 'ImportPkcs8PrivateKey' and no accessible extension method 'ImportPkcs8PrivateKey' accepting a first argument of type 'RSA' could be found (are you missing a using directive or an assembly refe

I am using Visual Studio 2022 and have set up a console application. It tells me that mportPkcs8PrivateKey is not implemented. This method is indeed implemented with dotnet core…

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,904 questions
asked 2024-09-28T13:12:38.52+00:00
try again 20 Reputation points
commented 2024-10-03T18:23:26.78+00:00
try again 20 Reputation points
2 answers

Get Results from Task.WhenAll for multiple tasks

Hi Folks, I am trying to get the results back from running multiple tasks. Each task point to a function and returns either true or false. Here is my code: var t1 = new Task(() => { CheckNC(); }) ; var t2 = new Task(() => { CheckNL(); }); var t3…

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,889 questions
Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
11,566 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,904 questions
asked 2024-10-03T10:19:58.7366667+00:00
john noble 141 Reputation points
answered 2024-10-03T16:19:57.2733333+00:00
Michael Taylor 54,311 Reputation points
1 answer

How to Write a DependencyProperty for a TextBlock when it is a child element of a parent Button class in WPF C#?

Hi there, I want to make a Dependency Property for a Text Block and the functionality of this property is to apply a Scale Transformation on the Text Block but I am unable to do that Because it's a child element inside of a Button class. I have a…

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
11,566 questions
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,768 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,904 questions
asked 2024-10-03T02:05:10.09+00:00
MERUN KUMAR MAITY 596 Reputation points
commented 2024-10-03T15:22:44.4266667+00:00
MERUN KUMAR MAITY 596 Reputation points
0 answers

How do I receive the download progress of a Microsoft Store package? | WinUI/UWP

Hi. I'm installing a package from the Microsoft Store from my WinUI application, but I'd like to see the download progress. I have the following code on Constructor: PackageCatalog packageCatalog => PackageCatalog.OpenForCurrentUser(); And when I…

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,904 questions
asked 2024-10-03T14:36:32.7566667+00:00
Anderson Rodrigues Cavalcante 316 Reputation points
edited the question 2024-10-03T15:19:43.3666667+00:00
Anderson Rodrigues Cavalcante 316 Reputation points
0 answers

How to retrieve variables from the Watch List in Visual Studio using DTE?

Hi everyone! I'm working with DTE in Visual Studio and trying to access variables from the Watch List window. I have code to activate the Watch window, but I'm unsure how to extract the variables and their values. Here's a snippet of my code: var…

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,904 questions
asked 2024-10-03T12:01:36.7133333+00:00
MypkaXD 0 Reputation points
edited the question 2024-10-03T12:02:35.6+00:00
MypkaXD 0 Reputation points
3 answers

Custom fonts not working when uploading Maui Android project to Play Store

I have added custom fonts in the font directory of my Maui project's Resources directory and updated the MauiProgram.cs file accordingly. The fonts work fine when I deploy the application using Visual Studio, but when I publish the app and upload it to…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,475 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,904 questions
asked 2024-05-21T16:58:13.6333333+00:00
Mujtaba Ali Panjwani 15 Reputation points
answered 2024-10-03T11:45:39.02+00:00
Stefan Cuypers 0 Reputation points
0 answers

Tab Bar Content Titles Trimmed After Navigating to Custom WebView in .NET MAUI iOS App

I'm encountering an issue in my .NET MAUI application on iOS where the titles in the TabBar's ShellContent are being trimmed or cropped. This issue occurs only after navigating to a page that contains a WebView (referred to as "AppWebView") and…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,475 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,904 questions
asked 2024-09-24T09:32:40.7366667+00:00
Nikhil Kurian 0 Reputation points
edited a comment 2024-10-03T11:11:36.0266667+00:00
Nikhil Kurian 0 Reputation points
4 answers

T4 text templating in .NET Core and above

After some testing, it looks like the TextTemplating library that is part of VisualStudio (Microsoft.VisualStudio.TextTemplating.15.0.dll) can't be used in the newer "dotnet" command line toolchain as it depends on the WPF assembly…

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,904 questions
asked 2021-10-01T13:06:23.25+00:00
David Reis 1 Reputation point
answered 2024-10-03T10:58:58.6833333+00:00
Karen Payne MVP 35,421 Reputation points
1 answer

Issue related to Debian/Linux OS

Hi, Is it right that we can run/execute VS C++/C# project within Debian/Linux OS?

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,904 questions
asked 2024-10-03T07:54:28.1866667+00:00
Peter_1985 2,666 Reputation points
commented 2024-10-03T10:12:29.2333333+00:00
Peter_1985 2,666 Reputation points
1 answer One of the answers was accepted by the question author.

Loading data and splash screen time

Hello, I am loading data to the app using such code now: private async void Page_Loaded(object sender, RoutedEventArgs e) { await CreateDataBaseIfNotExists(); //creates database if it doesn't already exists. await LoadData(); //loads data to…

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,904 questions
asked 2024-09-18T08:01:19.84+00:00
BitSmithy 2,061 Reputation points
edited the question 2024-10-03T09:38:12.7833333+00:00
Jack J Jun 24,491 Reputation points Microsoft Vendor
2 answers One of the answers was accepted by the question author.

How Use Constractor in SignalR ChatHub ...?

Hello Everyone, I have an application, part of which I use signalr for chat and I have implemented it. Messages are sent to groups correctly and there is no problem. At the end of the project, I decided to save each chat line in the database when sending…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,551 questions
Azure SignalR Service
Azure SignalR Service
An Azure service that is used for adding real-time communications to web applications.
142 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,904 questions
asked 2024-09-27T12:21:22.6233333+00:00
Ashkan 101 Reputation points
edited the question 2024-10-03T09:35:50.76+00:00
Jack J Jun 24,491 Reputation points Microsoft Vendor
2 answers

How Can I Register and Manage Services in a Large C# Project?

Hello I will start developing a new C# WPF project. I need your information on something while planning. I will use the MVVM pattern in the project. I will create a large number of services to perform some tasks and use them in the relevant classes. I am…

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,768 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,904 questions
asked 2024-10-02T12:49:07.14+00:00
fatih uyanık 100 Reputation points
answered 2024-10-03T09:18:49.25+00:00
Shubham Kahar 0 Reputation points
3 answers One of the answers was accepted by the question author.

Programatically turn on/off Japanese IME Kana/Romaji input mode

I am trying to programmatically turn on/off Japanese Kana/Romaji input mode. This is equivalent to the "Kana input" option in the IME input menu I have tried to use InputMethod.SetPreferredImeConversionMode but it can only sets the TextBox…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,099 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,609 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,904 questions
asked 2024-10-03T02:46:06.51+00:00
CHAN Samuel 20 Reputation points
accepted 2024-10-03T08:32:03.5133333+00:00
CHAN Samuel 20 Reputation points
3 answers

Allow only one call to web service method at a time

Hi all, I have an ASP.NET web service installed on IIS. I need to permit only one concurrent call to a specific web method? How can I achieve this? Can I use mutex? I don't have such in-depth knowledge of application pool, processes and threads... Thank…

Internet Information Services
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,482 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,904 questions
asked 2024-10-02T12:35:22.6366667+00:00
Nazza 0 Reputation points
answered 2024-10-03T06:31:25.9266667+00:00
XuDong Peng-MSFT 10,511 Reputation points Microsoft Vendor
0 answers

Microsoft Fakes and real object constructor

I'm using .NET 4.8 and Microsoft Fakes to create Shim object for unit testing. This class (KRSampleManager) is using Lazy initialization to create an instance and implements IDisposable interface. namespace SampleManager { public class…

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,904 questions
Visual Studio Testing
Visual Studio Testing
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Testing: The act or process of applying tests as a means of analysis or diagnosis.
349 questions
asked 2024-10-01T09:08:03.5166667+00:00
Raja, Kushal 0 Reputation points
commented 2024-10-03T04:51:34.86+00:00
Raja, Kushal 0 Reputation points
0 answers

Blob and file transactions have significantly increased after upgrade to .Net 8 Isolated

Hi all, We have noticed a significant increase in blob and file transactions, and therefore significant cost increase, since upgrading our function app from .NET 6 In Process model to .NET 8 Isolated. Wondering if anyone has had a similar issue and…

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,971 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,834 questions
Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
2,835 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,904 questions
asked 2024-10-03T00:30:18.1933333+00:00
MTB Holdings Pty Ltd 0 Reputation points
edited the question 2024-10-03T02:48:07.8866667+00:00
AmaranS 6,410 Reputation points Microsoft Vendor
1 answer

How can I connect to Azure database from desktop application with non-static IP address?

Hello, I am working on a WPF desktop application. I created an Azure SQL database as a database. However, the connection constantly fails because the IP address changes constantly with the connection sentence I set through the application. What settings…

Azure SQL Database
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,904 questions
asked 2024-09-28T18:15:06.2433333+00:00
fatih uyanık 100 Reputation points
commented 2024-10-02T16:42:54.21+00:00
NIKHILA NETHIKUNTA 2,395 Reputation points Microsoft Vendor
1 answer

Try to delete all file coming with filesystemwacther and delete all file created by user.

using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Diagnostics; using System.Drawing; using System.IO; using System.Linq; using System.Text; using System.Threading; using…

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,904 questions
asked 2024-09-28T14:35:40.1233333+00:00
MIPAKTEH_1 365 Reputation points
commented 2024-10-02T09:30:36.7533333+00:00
Jiale Xue - MSFT 44,926 Reputation points Microsoft Vendor
1 answer

Why can't I use some modifier in method? C#

Hello, Why can't I use const for a string array and read-only for an integer inside a method? namespace ConsoleApp1 { internal class Program { static void Main(string[] args) { } static void Summary() …

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,834 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,904 questions
asked 2024-09-28T01:25:02.2433333+00:00
Shervan360 1,541 Reputation points
commented 2024-10-02T07:10:11.8433333+00:00
Jiale Xue - MSFT 44,926 Reputation points Microsoft Vendor