caliburn.micro

Caliburn Micro Guard Methods not evaluating on property change

这一生的挚爱 提交于 2021-02-18 09:04:44
问题 I've been playing with the Caliburn Micro MVVM framework and am having some problems with guard methods. I have a view model: public class MyViewModel : PropertyChangedBase, IMyViewModel A property: public DateTime? Date { get{return this.date; } set { this.date = value; this.NotifyOfPropertyChange(() => Date); } } Also, i have a method in my view model with a guard method public void Calculate() { // ..some code.. } public bool CanCalculate() { return this.Date.HasValue; } And a button in my

How to have a application with caliburn for both console and wpf?

爷,独闯天下 提交于 2021-02-07 09:34:49
问题 We have an application that shall support a "batch mode". So we want to make it callable from the console, just like devenv.exe. The application has a WPF user interface, which is the default interface for most users. We use caliburn.micro with a bootstrapper for the mainwindow. Think we should have a different bootstrapper for that. (Or no bootstrapper at all) How can we "choose" what the environment is? Is there any way to do anything before the bootstrapper begins his job? 回答1: If I

How do you apply a ValueConverter to a convention-based Caliburn.Micro binding Example?

末鹿安然 提交于 2021-02-07 03:25:30
问题 I have seen the following question: how-do-you-apply-a-valueconverter-to-a-convention-based-caliburn-micro-binding. I couldn't post a comment on that topic, so I am posting my question here. How to use the ConventionManager.ApplyValueConverter in Caliburn.Micro for value converters when using convention based binding ? Could anyone write an example here? 回答1: ApplyValueConverter is defined as a static Func<> delegate in the ConventionManager class. In order to provide your own converter in

How do you apply a ValueConverter to a convention-based Caliburn.Micro binding Example?

别等时光非礼了梦想. 提交于 2021-02-07 03:25:18
问题 I have seen the following question: how-do-you-apply-a-valueconverter-to-a-convention-based-caliburn-micro-binding. I couldn't post a comment on that topic, so I am posting my question here. How to use the ConventionManager.ApplyValueConverter in Caliburn.Micro for value converters when using convention based binding ? Could anyone write an example here? 回答1: ApplyValueConverter is defined as a static Func<> delegate in the ConventionManager class. In order to provide your own converter in

How do you apply a ValueConverter to a convention-based Caliburn.Micro binding Example?

故事扮演 提交于 2021-02-07 03:23:01
问题 I have seen the following question: how-do-you-apply-a-valueconverter-to-a-convention-based-caliburn-micro-binding. I couldn't post a comment on that topic, so I am posting my question here. How to use the ConventionManager.ApplyValueConverter in Caliburn.Micro for value converters when using convention based binding ? Could anyone write an example here? 回答1: ApplyValueConverter is defined as a static Func<> delegate in the ConventionManager class. In order to provide your own converter in

Caliburn ShowDialog and MessageBox

浪子不回头ぞ 提交于 2021-02-06 12:46:25
问题 I'm making a small demo application for MVVM with caliburn. Now I want to show a MessageBox , but the MVVM way. For dialogs I created an event, that is handled in the ShellView (the root view) and just calls WindowManager.ShowDialog with a Dialogs ViewModel type. Seems to stick to MVVM for me. But what is the way to show a messagebox and get its result (Okay or cancel)? I already saw this question, but it contains no answer either. Mr Eisenberg hisself answers with "Caliburn has services

enable child control while Custom parent is disabled in wpf C#

爷,独闯天下 提交于 2021-02-04 08:36:05
问题 Hello I made custom made parent control for zooming Picture . Inside That Control there is child canvas and inside Canvas There is child image Control . And I created A menu for Zoom and Image measuring . I also can able to measure co Ordinates the image . My problem when I disabled Parent ZoomBorder control I cannot triggering event of Child Image . I can disable ZoomControl named ZoomBorder but I want image event of MouseDown . I can Disable child Image event when Zoomcontrol enabled and It

Caliburn Micro void function can't be triggered inside DialogHost

烂漫一生 提交于 2021-01-29 08:33:05
问题 Normally you can call void function(from ViewModel) in View by simply: Button Name = VoidFunctionInViewModel Button Command={Binding Path=VoidFunctionInViewModel} But when accessing this function inside a DialogHost, the void function isn't triggered. I have tried retrieving a string field to the DialogHost and it works fine, but when it comes to commands on buttons it doesn't work. MainViewModel.cs Commands: public async void OpenDialog() { var confirm = new ConfirmationView{DataContext =

Issues using Telerik RadWindow and custom WindowManager in Caliburn Micro

不羁岁月 提交于 2021-01-27 08:12:40
问题 I am currently working on a WPF project that utilizes Caliburn Micro and Caliburn.Micro.Telerik. My issues are twofold. Firstly, if I create the View as a telerik:RadWindow then whenever the Show / ShowDialog method is called the window never gets displayed. If I create the view as UserControl then it will display. Secondly TryClose() works fine without parameters but whenever I try and pass in true / false the window does not close. For reference here are the pertinent pieces of code: Window

Issues using Telerik RadWindow and custom WindowManager in Caliburn Micro

白昼怎懂夜的黑 提交于 2021-01-27 08:12:40
问题 I am currently working on a WPF project that utilizes Caliburn Micro and Caliburn.Micro.Telerik. My issues are twofold. Firstly, if I create the View as a telerik:RadWindow then whenever the Show / ShowDialog method is called the window never gets displayed. If I create the view as UserControl then it will display. Secondly TryClose() works fine without parameters but whenever I try and pass in true / false the window does not close. For reference here are the pertinent pieces of code: Window