2,686 questions with Windows Presentation Foundation tags

Sort by: Updated
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,686 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,686 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 6,931 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,686 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,686 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,686 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,686 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,686 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,686 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,686 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,686 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,231 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,686 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,686 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,686 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,686 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
4 answers One of the answers was accepted by the question author.

DataGrid with data won't fill parent's width

Hi, I met a very weird thing. I have a DataGrid in my WPF program. The overall setting for the DataGrid is as following: <Grid> <Grid.RowDefinitions> <RowDefinition Height="*" /> …

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,686 questions
asked 2020-03-30T08:00:16.127+00:00
Fanhua Kong 241 Reputation points
commented 2020-04-02T00:52:51.317+00:00
Fanhua Kong 241 Reputation points
1 answer

WPF ComboBox binding

How can I make a ComboBox to display the selected item? I have following ComboBox declared in XAML: <ComboBox Margin="4 0 2 0"; ItemsSource="{Binding YAxes}" SelectedItem="{Binding SelectedYAxis,…

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,686 questions
asked 2020-03-18T11:34:37.233+00:00
Arli Chokoev 1 Reputation point
commented 2020-03-30T12:28:51.407+00:00
Peter Fleischer (former MVP) 19,231 Reputation points
1 answer

Binding to a DependencyProperty from a ControlTemplate

I have a UserControl with a DependencyProperty called "MyObject." In UserControl.Resources I have a ControlTemplate with a Rectangle and I'm wanting to change the Fill based on a Property in MyObject using DataTriggers. I'm just not sure how…

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,686 questions
asked 2020-03-30T00:52:22+00:00
n0kx 1 Reputation point
answered 2020-03-30T04:59:16.79+00:00
Alex Li-MSFT 1,096 Reputation points
0 answers

static resources color name

<sys:Double x:Key="Window.Main.Background" >1200</sys:Double> ///////////////////////////////////////////////////////////////////////////////////// <Window x:Class="DCAD.MainWindow" …

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,686 questions
asked 2020-03-28T16:12:40.513+00:00
essamce 621 Reputation points
commented 2020-03-30T03:13:03.113+00:00
Alex Li-MSFT 1,096 Reputation points
2 answers

App won't come to the foreground when started

This is a MSDN question asked by Will Pittenger, the source is App won't come to the foreground when started. I have a WPF application that when I start it from Visual Studio, its main Window goes to the background rather than becoming the foremost…

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,686 questions
asked 2020-03-27T07:41:31.56+00:00
Charles He-MSFT 96 Reputation points Microsoft Employee
commented 2020-03-28T18:27:38.407+00:00
Viorel 112.9K Reputation points
2 answers

Removing line chart datapoints where dependency property is null

This is a MSDN question asked by Mike Whalley, the source is Removing line chart datapoints where dependency property is null. I have a line and bar chart showing the monthly movement in a bank account and the account balance (cashflow) as illustrated: …

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,686 questions
asked 2020-03-27T08:01:54.197+00:00
Charles He-MSFT 96 Reputation points Microsoft Employee
answered 2020-03-27T16:49:34.557+00:00
Mike Whalley 71 Reputation points