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" …
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…
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…
[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…
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…
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: …
[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!
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"…
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!"…
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…
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…
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) { …
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.
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…
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="*" /> …
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,…
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…
static resources color name
<sys:Double x:Key="Window.Main.Background" >1200</sys:Double> ///////////////////////////////////////////////////////////////////////////////////// <Window x:Class="DCAD.MainWindow" …
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…
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: …