203 questions
-1 votes
2 answers
128 views
WPF CommandBindings, ViewModel and UserControl
I'm quite new to WPF so it would be better that I will describe the intent: I have multiple User Controls inside the main window. Each User Control has its own buttons, that I would like to bind to ...
0 votes
1 answer
158 views
How to add a WPF custom command
I am just learning WPF and C#. I followed this tutorial but cannot assign my custom WPF command. I get the following error: Schweregrad Code Beschreibung Projekt Datei Zeile ...
1 vote
1 answer
87 views
Custom Command Class with WPF (without ViewModel link)
In context of : .NET Core WPF application I would like to : Create custom Command Class for what : Binding basic custom action on Button click I try lot of things but I always error generated in ...
1 vote
3 answers
6k views
Maui How to disable a button when using Command-binding
I am using a command binding for a button in Maui. The button's IsEnabled property does not work because of the command binding. Even if IsEnable is set to true, the command is not fired. How can I ...
2 votes
1 answer
54 views
WPF - CommandBinding to a Command defined in a F# library doesn't work
The repo https://github.com/francotiveron/WpfApp1 contains the following projects: A C# WPF library (WpfLibrary1) <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <...
-1 votes
2 answers
989 views
wpf Button always disabled (with CommandBinding, CanExecute=True and IsEnabled= True)
Revised: I apologize for missing some important descriptions in the first version, now the problem should be well-defined: so I'm making a toy CAD program with following views: MainWindow.xaml ...
2 votes
0 answers
59 views
Is it possible to get any 'active' command bindings for a particular command?
We have a case where we have two externally-defined RoutedUICommand objects (i.e. we don't own them thus we can't change them) which come pre-wired to the same CTRL+N key binding. We can address that ...
-3 votes
2 answers
114 views
Why WPF CommandBinding with one button is effecting the other button?
My following code is Implementing a custom WPF Command. I have bonded only the first button (titled Exit) with the CommandBinding so that when Exit button is clicked and e.CanExecute is true in ...
0 votes
3 answers
252 views
Xamarin command binding to 2 argument methods
I am newbie and I am not familiar enough with delegates and lambda statements. So it might too simple but here is my issue: I am trying to implement async subscription method with 2 argument by using ...
0 votes
1 answer
324 views
Call RelayCommand in WPF-Control from WPF-Windows (XAML) [closed]
I have a WPF UserControl with a ViewModel as DataContext. This ViewModel also contains RelayCommands. From the control I can call these commands (e.g. with a button) <Button Command="{Binding ...
1 vote
1 answer
684 views
Xamarin Custom Control Binding Not Working
I created a ContentView, called Switch, to host this slider as a custom control mainly so I can reuse the on and off visual states. The ContentView contains a Label (which is there just for debugging)...
0 votes
1 answer
341 views
Dynamic menus and submenus with Caliburn Micro, how can I bind the commands?
I am using Caliburn Micro in a WPF project where I want plugin components to be able to populate a toolbar. Each plugin gets a top level menu item and can populate it with submenus if they choose. <...
0 votes
1 answer
373 views
How to raise a command from a DataTemplate and using command parameter?
I have multiple DataTemplates with a TextBox inside and they are selected with a DataTemplateSelector. The TextBoxes represent nodes within a tree. When I click on a TextBox at runtime, the command ...
0 votes
1 answer
141 views
where is the code behind implemented for this xaml
I have a xaml without a x:Class, this xaml has command bindings for some buttons. I want to add a new button and add some functionality to this button. If I add x:Class, I get the error this class ...
1 vote
1 answer
497 views
ControlTemlate Command Binding
Microsoft documentation shows how to inherit from a ControlTemplate and use a ContentPresenter. It shows how to use string properties to populate string bound items in the template. (e.g. HeaderText)...