Microsoft Q&A

.NET

20,561 questions

Microsoft Technologies based on the .NET software framework.

Browse all .NET tags

20,561 questions with .NET-related tags

Sort by: Updated
0 answers

how to use ForcedSampleCount in DX11.1.

Dear Microsoft Official, I hope this email finds you well. I am writing to seek your guidance regarding the usage of ForcedSampleCount in DX11.1. I have been working on a project that involves DirectX 11.1 and I am currently facing some challenges with…

Windows
Windows
A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
3,029 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
2,018 questions
asked 2023-09-22T01:48:29.0566667+00:00
DAVIDE VENCENT 0 Reputation points
edited the question 2023-09-22T13:32:00.2633333+00:00
msft-an 260 Reputation points
0 answers

How to run AI model in a Blazor frontend

Hi, What is the best way to run a AI model (programmed in Python) that has been deployed in Azure as a managed endpoint in the Blazor frontend of each user of a Blazor website? Is there a way to run the AI model in the Blazor frontend in a simple and…

Azure Machine Learning
Azure Machine Learning
An Azure machine learning service for building and deploying models.
2,075 questions
Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
5,918 questions
Azure Managed Applications
Azure Managed Applications
An Azure service that enables managed service providers, independent software vendors, and enterprise IT teams to deliver turnkey solutions through the Azure Marketplace or service catalog.
93 questions
Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,102 questions
.NET Machine learning
.NET Machine learning
.NET: Microsoft Technologies based on the .NET software framework.Machine learning: A type of artificial intelligence focused on enabling computers to use observed data to evolve new behaviors that have not been explicitly programmed.
131 questions
asked 2023-09-21T17:27:39.8233333+00:00
Héðinn Steingrímsson 0 Reputation points
edited a comment 2023-09-22T12:51:53.1366667+00:00
Héðinn Steingrímsson 0 Reputation points
5 answers

handling enter press on a form

Hi , Can someone pls suggest how to detect if the user presses enter key on his keyboard so that we can capture that event . i don't have and don't want a button(or a hidden button) for that purpose (as the size of the form is too small) .

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,625 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.
8,950 questions
asked 2023-09-22T10:46:45.1433333+00:00
Shaifali jain 80 Reputation points
edited an answer 2023-09-22T12:35:40.7633333+00:00
Karen Payne MVP 32,766 Reputation points
0 answers

How can I get the Material You design in my Maui app on Android?

When running my app on android, the controls are of Material design 2, while the latest is 3 - Material You. Can I in some way update the android part of the project to support the latest design?

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,835 questions
asked 2023-09-22T12:15:07.9133333+00:00
Noam 0 Reputation points
0 answers

How to change the default layout appearing when tap to write on entry or search bar in xamarin forms app

When I press to write text on the xamarin forms searchbar a page shown with keyboard and editor and button that fill the full width of screen but I nerd the basic page to show with keyboard on the button like chat or any other search engine I attach the…

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,145 questions
asked 2023-09-15T09:58:53.38+00:00
adel romany 0 Reputation points
commented 2023-09-22T11:38:20.1133333+00:00
adel romany 0 Reputation points
2 answers

Special characters in a textbox

Hi , i have crated a textbox which shows current date . i want that user cannot enter special characters inside that except - or / . can you please suggest how to do it .

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,625 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.
8,950 questions
asked 2023-09-22T09:07:13.48+00:00
Shaifali jain 80 Reputation points
edited a comment 2023-09-22T11:05:12.63+00:00
Brian Zarb 1,105 Reputation points
1 answer

Return values from a form

Hi , Which is the best technique to return values from a form and use that in another form . like using a variable or some other way . for example , i have a form with a textbox which returns a value . i want to use that value in the textbox of other…

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,625 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.
8,950 questions
asked 2023-09-22T09:26:05.5166667+00:00
Shaifali jain 80 Reputation points
answered 2023-09-22T11:02:25.9133333+00:00
Johan Smarius 390 Reputation points
1 answer One of the answers was accepted by the question author.

How to display ContextMenu on certain TreeViewItem and highlight the selected TreeViewItem in WPF following MVVM

Following MVVM, I have developed a TreeView and now I want mouse right click to show ContextMenu on certain TreeViewItem. As you can see in the screeshot, I only want the ContextMenu to be displayed when mouse right clicks on the first level…

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,474 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.
8,950 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.
687 questions
asked 2023-09-20T10:36:51.4633333+00:00
BabyHai 41 Reputation points
edited a comment 2023-09-22T10:51:17.3833333+00:00
BabyHai 41 Reputation points
2 answers One of the answers was accepted by the question author.

minimum rows to display in datagridview

hello , is there a way by which i can set that there must be minimum number of rows is available to display in datagridview regardless of the data it has or not .

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,625 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.
8,950 questions
asked 2023-09-20T15:09:51.38+00:00
Shaifali jain 80 Reputation points
accepted 2023-09-22T10:36:39.5833333+00:00
Shaifali jain 80 Reputation points
1 answer

WPF custom animation thread

Hello, I have a small simple WPF application (I am learing by doing). I made some custom drawing on a Canvas declared in XAML, by using code in the corresponding C# file. Now I want to access the canvas from another thread to be able to apply geometric…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
2,018 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,474 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
5,942 questions
asked 2023-09-16T17:21:29.6333333+00:00
Daniel Santos 0 Reputation points
commented 2023-09-22T09:56:41.3666667+00:00
Hui Liu-MSFT 21,376 Reputation points Microsoft Vendor
1 answer One of the answers was accepted by the question author.

Gap between Text and underline of label control

Hi , is it possible to increase the gap between the text and underline in a label control . for example , below is a label with underline in vs and this is what i have to

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,625 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.
8,950 questions
asked 2023-09-22T08:49:58.82+00:00
Shaifali jain 80 Reputation points
accepted 2023-09-22T09:55:59.7833333+00:00
Shaifali jain 80 Reputation points
3 answers One of the answers was accepted by the question author.

How to fix double permission popup in xamarin ios web view

When I am trying to use camera in a web view, there are two permissions that are asked in iOS. One is the popup created from browser and the other is created from the Phone. Are there are any ways to avoid the browser popup for camera permission? …

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,145 questions
asked 2023-02-06T09:19:10.4933333+00:00
Anila Mathew 25 Reputation points
edited an answer 2023-09-22T09:55:28.97+00:00
Learnaholic Pte Ltd 0 Reputation points
1 answer

Xamarin.Forms building with Pair to Mac XCode 15, building for iOS 17

VS Version 2022 Pro 17.6.5 Xamarin.Forms 5.0.0.2312 XCode 15 Xamarin.iOS 16.4.0.18 - Installed Manually Mac M2 Ventura 13.5.2 I am unable to debug my application on my Visual Studio. Another issue that started happening is I am opening and creating…

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,145 questions
asked 2023-09-21T07:54:29.7833333+00:00
Deon Van Niekerk 0 Reputation points
answered 2023-09-22T09:48:45.58+00:00
Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 22,331 Reputation points Microsoft Vendor
3 answers One of the answers was accepted by the question author.

The type or namespace name 'Notes' could not be found

Hi, How to resolve such issue, to the line below? using Notes.Models;

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,145 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
3,767 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.
8,950 questions
asked 2023-09-16T06:33:54.24+00:00
Peter_1985 2,116 Reputation points
accepted 2023-09-22T09:44:08.83+00:00
Peter_1985 2,116 Reputation points
1 answer

Use Azure Function (.Net 6) with JwtBearer middleware

Hello, I couldn't find any official documentation on the following: I want Azure function to use bearer token authentication. Is it possible to use Azure Function (.Net 6) with JwtBearer middleware? So like in an ASP.NET app, set this code into…

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
3,430 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
2,018 questions
asked 2023-09-19T15:32:07.0833333+00:00
Anita A 25 Reputation points
commented 2023-09-22T09:35:40.5066667+00:00
Anita A 25 Reputation points
1 answer

Running Xamarin iOS Error simctl returned exit code 4

Hi Three days ago, my app ran well and deployed smoothly to Emulator on my mac until today when I tried to run again, my apps cannot run with the error Error on Visual Studio Severity Code Description Project File Line Suppression State Error error…

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,145 questions
asked 2023-09-21T12:32:39.5166667+00:00
Yohanes AI 0 Reputation points
answered 2023-09-22T09:29:42.7633333+00:00
Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 22,331 Reputation points Microsoft Vendor
1 answer

.NET Maui support - Splash image size

I'm using .NET Maui and would like to add the splash screen. Now Maui uses a single svg file. Checking the Android documentation, there's a new size for the splash https://developer.android.com/develop/ui/views/launch/splash-screen for Android v12 and…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
3,767 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,835 questions
asked 2023-06-12T15:09:51.0333333+00:00
Junior Saravia 20 Reputation points
commented 2023-09-22T09:28:09.15+00:00
Jockey Zheng 0 Reputation points
1 answer One of the answers was accepted by the question author.

Event for changing backcolor of form

Hi , suppose if i want to change the backcolor of a windows form by hard coding which is the best event to do it . like load or paint or shown or something else .

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,625 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.
8,950 questions
asked 2023-09-22T08:54:10.14+00:00
Shaifali jain 80 Reputation points
accepted 2023-09-22T09:15:49.3133333+00:00
Shaifali jain 80 Reputation points
1 answer

How to validate XML dataset when hexadecimal invalid character arrives

I am processing some xml document. while reading xml value through dataset, I am getting below error. System.Xml.XmlException: ''', hexadecimal value 0x02, is an invalid character. Line 1, position 989.' How to avoid this...? How to validate and…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
2,018 questions
asked 2023-09-21T09:49:42.04+00:00
Gani_tpt 1,401 Reputation points
commented 2023-09-22T09:05:58.8666667+00:00
Jiale Xue - MSFT 10,156 Reputation points Microsoft Vendor
1 answer

Setting XML Root XMLNS

Hi, Everybody! I need to create a Shipment XML root whose xmlns is the following fictitious XSD URL: http://api.company.com/schemas/api/company-api-vN.xsd. <?xml version="1.0"…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
2,018 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.
8,950 questions
.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: The period of time during which a program is being executed in a computer.
1,041 questions
asked 2023-09-19T12:11:16.19+00:00
Julio Bello 201 Reputation points
edited an answer 2023-09-22T09:03:26.7266667+00:00
Hui Liu-MSFT 21,376 Reputation points Microsoft Vendor