I have a `MessageBoxView` and an associated `MessageBoxViewModel` class, as shown below
public class MessageBoxViewModel : DialogViewModel<MessageDialogResult> { ... }
where
public abstract class DialogViewModel<TResult> : PropertyChangedBase { ... }
In my `MessageBoxView` XAML I am attempting to bind to some properties within the `MessageBoxViewModel` class. However, using Snoop I can see that the binding is failing. the stack trace/binding error is showing:
>System.Windows.Data Error: 40 : BindingExpression path error: 'AffirmativeButtonText' property not found on 'object' ''ShellViewModel' (HashCode=19096940)'. BindingExpression:Path=AffirmativeButtonText; DataItem='ShellViewModel' (HashCode=19096940); target element is 'Button' (Name='AffirmativeButton'); target property is 'Content' (type 'Object')
This view is for a dialog box, so I do not want this to inherit from IScreen. How can I get Caliburn.Micro to bind to properties in the associated view model?
Thanks for your time.
public class MessageBoxViewModel : DialogViewModel<MessageDialogResult> { ... }
where
public abstract class DialogViewModel<TResult> : PropertyChangedBase { ... }
In my `MessageBoxView` XAML I am attempting to bind to some properties within the `MessageBoxViewModel` class. However, using Snoop I can see that the binding is failing. the stack trace/binding error is showing:
>System.Windows.Data Error: 40 : BindingExpression path error: 'AffirmativeButtonText' property not found on 'object' ''ShellViewModel' (HashCode=19096940)'. BindingExpression:Path=AffirmativeButtonText; DataItem='ShellViewModel' (HashCode=19096940); target element is 'Button' (Name='AffirmativeButton'); target property is 'Content' (type 'Object')
This view is for a dialog box, so I do not want this to inherit from IScreen. How can I get Caliburn.Micro to bind to properties in the associated view model?
Thanks for your time.