24,752 questions with .NET-related tags

Sort by: Updated
3 answers

im using word Inetrop in a WPF C# App Which i find a word and Change its color to red and im facing issues

This is my Code it works but I have a problem at the third part when I try to change the word 'No' color to red it changes any word that includes 'No' for example 'Not Isolated' was Effected by this and its color was changed how can i specify that i…

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-04-08T01:23:51.503+00:00
IProfileTNo 1 Reputation point
answered 2020-04-15T01:33:15.183+00:00
Alex Li-MSFT 1,096 Reputation points
0 answers

Reg: Clear previously logged-in users list from OneDrive login screen

Hi Team, We have developed a WPF application, where multiple users can log in to our application. We are using WPF web browser control to load the one drive login page. Our requirement is to not show the previously logged users' information on the…

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-04-06T05:33:55.607+00:00
Chakradhar Y 1 Reputation point
commented 2020-04-14T09:31:06.883+00:00
Alex Li-MSFT 1,096 Reputation points
1 answer

How to increase WPF 3D Performance?

I have a problem looking forward to your suggestions about WPF 3D performance. It runs quite well with a small width and length, but with a width and length of about 949x825 When measured by stopwatch, all of the implementation in c# code only takes…

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-04-10T04:58:49.733+00:00
Dragon 81 Reputation points
commented 2020-04-13T07:57:02.457+00:00
Dragon 81 Reputation points
1 answer One of the answers was accepted by the question author.

Why this error when doing an image conversion

I am trying to convert a BitmapImage to a Byte() with the following code: Dim ic As New ImageConverter Dim bts() As Byte = DirectCast(ic.ConvertTo(clsImage, GetType(Byte())), Byte()) The error message I get is: > Unable to cast object of type…

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-04-12T14:11:16.517+00:00
RogerSchlueter-7899 1,236 Reputation points
accepted 2020-04-12T20:57:39.707+00:00
RogerSchlueter-7899 1,236 Reputation points
2 answers One of the answers was accepted by the question author.

Can't Get My Image to Appear in an Image Container

I have all the parts to display an image in the wpf Image control but I cant' get them all wired together. First I have a Picture class as follows ((ignoring irrelevant code): Public Class Picture .... Private _Image As Byte() Private _Title As String…

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-04-03T16:04:42.707+00:00
RogerSchlueter-7899 1,236 Reputation points
accepted 2020-04-12T17:15:24.51+00:00
RogerSchlueter-7899 1,236 Reputation points
1 answer

XAML > Binding SelectedValue to a concatenation of 2 properties

Hi, I've a Person class public class Person { public string location; public string name; ... } ...and a list of Person List<Person> list1 = new List<Person>() { new Person() { location = "Chicago", name =…

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-04-12T08:04:22.117+00:00
JM Deb 1 Reputation point
answered 2020-04-12T09:15:55.863+00:00
Peter Fleischer (former MVP) 19,306 Reputation points
3 answers One of the answers was accepted by the question author.

Toggle Button Color Bound Property Not Concistant

Can't get my color property's bind logic right. I get odd color behavior and occasionally the toggle switch switches back on its own. Can anybody help Thanks Madaxe <UserControl x:Class="WpfApp5.ToggleButtonUserControl" …

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-04-09T19:37:23.907+00:00
Marc Jeeves 386 Reputation points
answered 2020-04-10T16:44:44.11+00:00
Marc Jeeves 386 Reputation points
1 answer One of the answers was accepted by the question author.

DocumentViewer "PART_FindToolBarHost" - change default language

Hi, I would like to use DocumentViewer for print preview of my XPS files. However, the ContentPresenter control known as PART_FindToolBarHost embedded inside DocumentViewer doesn't recognize my Windows language settings, so by default It's everything…

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-04-08T17:13:09.45+00:00
Luka Ciglar 21 Reputation points
commented 2020-04-09T23:49:55.893+00:00
gekka 7,911 Reputation points MVP
1 answer

C# WPF user Control Binding Problem

I'm building a simple user control toggle switch, I'm using the margin to move the Ellipse once the user selects with the left mouse button. I want the usage to bind to a boolean to make it simple. The control works when i put it in a datagrid but…

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-04-09T16:45:47.1+00:00
Marc Jeeves 386 Reputation points
answered 2020-04-09T18:39:43.037+00:00
Marc Jeeves 386 Reputation points
4 answers One of the answers was accepted by the question author.

[WPF] XAML how to inherit lists?

Hello everyone! I have a structure class MyContainer { List<MyItem> Items; } class MyItem { string Name; int Value; } I want to get instances of Containers whic have values from the base => mean broadcast values to other containers…

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-04-08T20:58:35.07+00:00
FireFenix 21 Reputation points
accepted 2020-04-09T18:27:11.79+00:00
FireFenix 21 Reputation points
2 answers One of the answers was accepted by the question author.

How to use a SharedProject between different solutions?

I've been working on a SharedProject for our various WPF apps that we're writing. There's some common, general (and sometimes generic) code that we've been sharing between different projects, by using the good ol' tried-and-true copy-and-paste. I've…

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-04-07T22:19:55.93+00:00
Rod At Work 866 Reputation points
accepted 2020-04-08T15:00:39.903+00:00
Rod At Work 866 Reputation points
0 answers

Does webview support webauthn(FIDO2.0)?

WPF app with webview tested with https://demo.yubico.com. But it shows browser not supported. At the same time, the edge browser works fine. On checking the user agent of WPF app and Edge below difference found. WPF WebView User Agent: …

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-04-03T08:45:20.007+00:00
Vishnu Gopalakrishnan 126 Reputation points
commented 2020-04-08T07:30:16.983+00:00
Charles He-MSFT 96 Reputation points Microsoft Employee
1 answer

[WPF] Some paths was disappeared when scale canvas

When I add many Paths on canvas and zoom out canvas, some paths was disappeared. I execute on Window 10, 64 bit and .Net 4.7 Please let me know, why some paths was disappeared and solution for this issue. Thank you so much!

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-03-31T02:13:32.99+00:00
Trần Bảo Dũng 1 Reputation point
commented 2020-04-07T08:40:31.047+00:00
Alex Li-MSFT 1,096 Reputation points
1 answer

How to merge single binding validationrule errors to bindinggroup?

Example: <Grid> <Grid.BindingGroup> <BindingGroup x:Name="Group"/> </Grid.BindingGroup> <TextBox> <TextBox.Text> <Binding Path="Name"…

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-04-07T02:19:02.657+00:00
Flithor 196 Reputation points
answered 2020-04-07T06:57:40.807+00:00
Alex Li-MSFT 1,096 Reputation points
1 answer One of the answers was accepted by the question author.

CommandBinding not set CanExecute will disable button.

If I create the CommandBinding with no CanExecute: CommandManager.RegisterClassCommandBinding(typeof(MyClass), new CommandBinding(MyCommand, MyCommandExecuted)); And set the command to a button: <Button Content="Click Me!"…

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-04-07T02:28:57.637+00:00
Flithor 196 Reputation points
accepted 2020-04-07T03:01:21.177+00:00
Flithor 196 Reputation points
1 answer

WPF MVVM - Unable to bind Model property directly to the IsEnabled Property of Button

Hello Team, Please find below View, ViewModel and Model class. I have binded collection of models (in ViewModel) to DataGrid control in the view. But based on UI selection, need to update another property in model. I am not able do to it via…

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-04-06T04:44:18.333+00:00
Sudarshan Gujar 1 Reputation point
answered 2020-04-06T19:40:25.637+00:00
Peter Fleischer (former MVP) 19,306 Reputation points
3 answers

Dispatcher required for changing WPF bound properties?

Hello, From time to time I read some articles that state that if WPF binds to a property that implements INotifyProperyChanged, such property can be changed from any thread without a dispatcher, because WPF would automatically dispatch the…

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-04-01T12:18:43.747+00:00
Sebastian Möller 6 Reputation points
commented 2020-04-06T05:53:04.187+00:00
Darius Geiß 1 Reputation point
1 answer

c# : Get EventHandler Change Notification without Creating Instance or Making it static

c# : Get EventHandler Change Notification without Creating Instance or Making it static Public class A { public EventHandler KeyboardCloseEventHandlerTest; private void someMethod(object sender, EventArgs e) { …

Universal Windows Platform (UWP)
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-04-03T18:41:01.687+00:00
Indudhar Gowda 426 Reputation points
answered 2020-04-06T02:29:06.633+00:00
Alex Li-MSFT 1,096 Reputation points
1 answer

Wpf TextBox Stroke and Stroke Thickness

How can I use Stroke and Stroke Thickness style options for text in TextBox? Or is there other editable control that has it? Cause I have OutlinedTextBlock with this options and I want editing to look the same.

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-04-03T06:40:09.143+00:00
Agata Czupryn 1 Reputation point
answered 2020-04-06T01:23:49.84+00:00
Alex Li-MSFT 1,096 Reputation points
1 answer

How to ignore key and pass it next to the window?

I display WPF UserControl inside HwndSource. I want ignore certain keys from keyboard and ignore that keys, but pass it next to the host window or host application. That means, if spacebar key is pressed, WPF UsuerControl ignore it, but host application…

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-04-01T21:37:31.18+00:00
Code Wanderer 396 Reputation points
answered 2020-04-02T02:46:10.43+00:00
Alex Li-MSFT 1,096 Reputation points