Click here to Skip to main content
14,696,222 members
Home » Discussions » Silverlight / WPF
   

Silverlight / WPF

 
GeneralRe: MVVM: DataGrid Cell BeginEdit Pin
Kevin Marois14-Apr-20 7:15
professionalKevin Marois14-Apr-20 7:15 
GeneralRe: MVVM: DataGrid Cell BeginEdit Pin
Richard Deeming14-Apr-20 7:28
mveRichard Deeming14-Apr-20 7:28 
GeneralRe: MVVM: DataGrid Cell BeginEdit Pin
Kevin Marois14-Apr-20 7:39
professionalKevin Marois14-Apr-20 7:39 
QuestionProblem in designer while creating a new window in a WPF project in Visual Studio 2010. Pin
priyamtheone13-Apr-20 4:38
Memberpriyamtheone13-Apr-20 4:38 
AnswerRe: Problem in designer while creating a new window in a WPF project in Visual Studio 2010. Pin
Gerry Schmitz13-Apr-20 7:59
mveGerry Schmitz13-Apr-20 7:59 
GeneralRe: Problem in designer while creating a new window in a WPF project in Visual Studio 2010. Pin
priyamtheone14-Apr-20 2:36
Memberpriyamtheone14-Apr-20 2:36 
QuestionDP Firing Order Pin
Kevin Marois30-Mar-20 8:43
professionalKevin Marois30-Mar-20 8:43 
AnswerRe: DP Firing Order Pin
Dave Simon31-Mar-20 10:35
MemberDave Simon31-Mar-20 10:35 
Many developers use property binding in a Model-View-ViewModel pattern when using WPF along with INotifyPropertyChanged and relaycommands.

If you research "relaycommand WPF" and "INotifyPropertyChanged" then implement that pattern your bindings and checking for values becomes easy.

In short, you want to have property change notification in your code and then use the RaiseCanExecuteChanged in your methods/commands. In your scenario, your DPs can fire based on if you set the command CanExecute to true when certain DPs are not null or have values.

If you're just going to use codebehind, which it seems you are using; I would set event handlers
Handling and Raising Events | Microsoft Docs[^] for each of your DPs in the codebehind and initially set the Enabled property to false. When all of the values are satisfied in the changed event for each DP set your control to enabled.
c# - Raise an event whenever a property's value changed? - Stack Overflow[^]



How to: Implement Property Change Notification - WPF | Microsoft Docs[^]

wpf - MVVM RelayCommand CanExecute - Stack Overflow[^]
QuestionHow can a class from a class library manipulate XAML/UI Pin
httitb30-Mar-20 4:32
Memberhttitb30-Mar-20 4:32 
AnswerRe: How can a class from a class library manipulate XAML/UI Pin
Gerry Schmitz30-Mar-20 9:19
mveGerry Schmitz30-Mar-20 9:19 
GeneralRe: How can a class from a class library manipulate XAML/UI Pin
httitb30-Mar-20 9:31
Memberhttitb30-Mar-20 9:31 
QuestionPrism doesn't load all modules in the ModulePath Pin
hapy71018-Mar-20 17:39
Memberhapy71018-Mar-20 17:39 
QuestionInstaller Project Problem Pin
Kevin Marois13-Mar-20 14:08
professionalKevin Marois13-Mar-20 14:08 
AnswerRe: Installer Project Problem Pin
Mycroft Holmes14-Mar-20 13:17
professionalMycroft Holmes14-Mar-20 13:17 
GeneralRe: Installer Project Problem Pin
Kevin Marois16-Mar-20 7:36
professionalKevin Marois16-Mar-20 7:36 
AnswerRe: Installer Project Problem Pin
Richard Deeming16-Mar-20 10:37
mveRichard Deeming16-Mar-20 10:37 
GeneralRe: Installer Project Problem Pin
Kevin Marois16-Mar-20 11:57
professionalKevin Marois16-Mar-20 11:57 
GeneralRe: Installer Project Problem Pin
Mycroft Holmes16-Mar-20 12:05
professionalMycroft Holmes16-Mar-20 12:05 
QuestionAForge VideoSourcePlayer Pin
Kevin Marois11-Mar-20 14:56
professionalKevin Marois11-Mar-20 14:56 
QuestionTextBox DynamicResource Not Working Pin
Kevin Marois19-Feb-20 9:39
professionalKevin Marois19-Feb-20 9:39 
QuestionDock DataGrid's column to the right Pin
Mc_Topaz9-Feb-20 22:46
MemberMc_Topaz9-Feb-20 22:46 
AnswerRe: Dock DataGrid's column to the right Pin
Gerry Schmitz10-Feb-20 3:33
mveGerry Schmitz10-Feb-20 3:33 
AnswerRe: Dock DataGrid's column to the right Pin
Richard Deeming10-Feb-20 9:55
mveRichard Deeming10-Feb-20 9:55 
GeneralRe: Dock DataGrid's column to the right Pin
Mc_Topaz10-Feb-20 22:24
MemberMc_Topaz10-Feb-20 22:24 
Question[WPF] Datagrid With Dynamic column Pin
mjaniaut4-Feb-20 20:57
Membermjaniaut4-Feb-20 20:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.