caliburn.micro

Multiple selection in WPF MVVM ListBox

余生长醉 提交于 2019-11-27 06:13:42
问题 I have a ListBox containing filenames. Now I need to get array of selected items from this ListBox. I found a few answers here, but none of them worked for me. I'am using Caliburn Micro framework. Here is my View: <Window x:Class="ProgramsAndUpdatesDesktop.Views.DeleteHistoryView" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas

Adding a convention for IsEnabled to Caliburn.Micro

﹥>﹥吖頭↗ 提交于 2019-11-26 20:45:05
问题 How do I add a custom convention to Caliburn.Micro for the IsEnabled property of controls - something like having NameEnabled bound to IsEnabled in parallel to Name bound to Text on a TextBox. In a way, what I want to achieve is similar to the way that a CanSave property can be used to enable/disable a button bound to a Save method, but generic for all controls. 回答1: Caliburn.Micro right now ( 1.3.1 ) doesn't really support this "multiple" conventions for the same FrameworkElement , what you

using attached events with caliburn micro Message.Attach

梦想与她 提交于 2019-11-26 20:25:57
问题 I'm trying to use caliburn micro message to trigger an attached event that I created: public static class DataChanging { public delegate void DataChangingEventHandler(object sender, DataChangingEventArgs e); public static readonly RoutedEvent ChangingEvent = EventManager.RegisterRoutedEvent("Changing", RoutingStrategy.Bubble, typeof(DataChangingEventHandler), typeof(DataChanging)); public static void AddChangingHandler(DependencyObject o, DataChangingEventHandler handler) { ((UIElement)o)

How to close dialog window from viewmodel (Caliburn+WPF)?

元气小坏坏 提交于 2019-11-26 20:24:03
问题 I have ViewModel1 and View1 associated with it. I start dialog window from ViewModel2 (some another viewmodel) using IWindowManager object. The code from ViewModel2 class: windowManager.ShowDialog(new ViewModel()); So, I have Dialog Window with View1 user control. My answer is next - I can close that dialog window using red close button, but how to close it using my specific button (contained in View1 user control), something like "Cancel" button with close command ( Command={Binding

caliburn.micro serialization issue when implementing PropertyChangedBase

我们两清 提交于 2019-11-26 09:57:57
问题 I\'m developing a client/server data driven application using caliburn.micro for frontend and Asp.net WebApi 2 for backend. public class Person { public int Id {get;set;} public string FirstName{get;set;} ... } The application contains a class called \"Person\". A \"Person\" object is serialized (JSON) and moved back and forth from client to server using simple REST protocal. The solution works fine without any problem. Problem: I have set a parent class \"PropertyChangedBase\" for \"Person\"