caliburn.micro

How do you bind to a command property with caliburn.micro?

感情迁移 提交于 2019-12-07 13:06:24
问题 I have a behavior that exposes several command properties. Typically I use MVVM Light and would just use a routed command in my view model and bind to those. However, this project is using Caliburn.Micro so I'm trying to do it the Caliburn.Micro way. Is there some syntax I can use on the Message.Attach to do this (is there any good documentation on the parser for Message.Attach)? Do I have to modify the behavior to expose events to make this work with Caliburn.Micro? 回答1: Caliburn.Micro has

Caliburn.Micro convention-based bindings not working in nested views?

主宰稳场 提交于 2019-12-07 11:12:38
问题 I have this Caliburn.Micro sample project I'm putting together and I am having trouble with the convention-based bindings with nested views/viewmodels. As an example, let's say I have a shell view, ShellView, backed by ShellViewModel which is a screen conductor. I have a content control in the ShellView bound to ActiveItem (using the x:Name convention), and the ActiveItem is of type EmployeeListViewModel, so the resulting view is EmployeeListView. Nested in this view is an EmployeeDetailsView

reactivate exiting window using WindowManager

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-07 06:05:38
问题 I am using WPF with the currently latest and greatest version of Caliburn.Micro (1.4.1). I use IWindowManager.ShowWindow(...) to open an new modeless window: private void OpenOrReactivateInfoView() { if(this.infoViewModel == null) { this.infoViewModel = new InfoViewModel(); } this.windowManager.ShowWindow(this.infoViewModel); } Instead of opening a new window each time when OpenOrReactivateInfoView() is called, I would like to check whether the window ist still open and if it is, the existing

Filling and binding two combobox WPF Caliburn.micro

无人久伴 提交于 2019-12-07 05:09:32
问题 I have this table: I use in my project this view Called NewItem and in this view there is two combobox. I would like to do this : that in the combobox Group there are all DESCRIPTION of table GROUP, and when i choose an item of this description (of first combobox) the second combobox fills of descriptions relating only to that description that I have chosen before. This is some code: XAML NewItemView: <ComboBox Height="21" HorizontalAlignment="Left" Margin="89,99,0,0" VerticalAlignment="Top"

Can anybody provide any simple working example of the Conductor<T>.Collection.AllActive usage?

浪尽此生 提交于 2019-12-07 03:24:12
问题 It's a bit strange, but I really can't find a working example anywhere. By the way, I'm using a ViewModel-first approach (in WPF) if this is important. Thank you in advance. 回答1: If you have a look at the discussion here you will see that the intent of AllActive is to compose several Views/ViewModels into a containing ViewModel. Judging from your previous comments it seems as if this is what you were expecting but I figured I'd at least reference it here. You then mention activating 3

Caliburn.Micro does not have “Bootstrapper” in a namespace in App.xaml

有些话、适合烂在心里 提交于 2019-12-06 17:03:28
EDIT: It seems that I finally made it to work. I asked an author of that post which I referred before and he said that it's a known issue. He also gave mi a workaround (in the comment below the post), so I consider this question as closed. But thanks to all of you for time spent with my problems :) I'm trying to learn MVVM with Caliburn Micro framework, but I got problems from the beginning. I'm following this tutorial and I got such a code in App.xaml: <Application x:Class="Caliburn.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com

Shared viewmodel between two Views in WPF MVVM pattern

被刻印的时光 ゝ 提交于 2019-12-06 16:15:47
I'm trying to find a technique to show modal views from within other views but I am having problems. Here's a simple example of what i'm trying to do: Shared ViewModel class ClientesViewModel : Screen { private bool _deleteconfirmvisible; public bool DeleteConfirmVisible { get { return _deleteconfirmvisible; } set { _deleteconfirmvisible = value; NotifyOfPropertyChange("DeleteConfirmVisible"); } } public void ShowDeleteConfirm() { this.DeleteConfirmVisible = true; } public ModalViewModel ModalDelete { get { return new ModalViewModel(); } } public void ConfirmDelete() { //Actually delete the

ViewModels references in ShellViewModel Caliburn.Micro

寵の児 提交于 2019-12-06 15:29:03
In this thread : Can anybody provide any simple working example of the Conductor<T>.Collection.AllActive usage? I've had part of an answer but I'm still a but confused. I would simply like to reference all my view models into my ShellViewModel to be able to open/close ContentControls, but without injecting all of them in the constructor. In the answer, it is suggested to inject an interface in the constructor of the ShellViewModel. If I do that, do I have to inject all my ViewModels in a class that implements that interface? public MyViewModel(IMagicViewModelFactory factory) {

Caliburn Micro GoBack to previous page instance WinRT

对着背影说爱祢 提交于 2019-12-06 15:28:31
I am using Caliburn.Micro.Core.2.0.1 on Windows Phone 8.1 (WinRT) application All my ViewModels extends Screen as the base. In my MainView(Model) I am able to navigate to a SettingsView(Model) with CM's INavigationService using private readonly INavigationService _navigationService; public void Navigate() { _navigationService.NavigateToViewModel<SettingsViewModel>(_param); } Then using the Hardware Back Button or public void GoBack() { _navigationService.GoBack(); } I can navigate back to the MainView(Model). It works; however, it does not work as I expected or wanted it to work. When the

ComponentOne's FlexGrid Background Color

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-06 15:20:54
I have a WPF Caliburn.Micro application. I used to have there a DataGrid, and here is a part of the code: <DataGrid x:Name="FirstEntries" Grid.Row="5" AutoGenerateColumns="False" BaseControls:DataGridExtension.Columns="{Binding FirstEntryGridColumns}" CanUserAddRows="False" IsReadOnly="True" SelectedItem="{Binding Path=SelectedFirstEntry}"> <DataGrid.Resources> <conv:StatusToBackgroundColorConverter x:Key="StatusToBackgroundColor"/> </DataGrid.Resources> <DataGrid.ItemContainerStyle> <Style TargetType="{x:Type DataGridRow}"> <Style.Setters> <Setter Property="Background" Value="{Binding Path