caliburn.micro

Caliburn Micro GoBack to previous page instance WinRT

柔情痞子 提交于 2019-12-23 03:46:08
问题 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

Shared viewmodel between two Views in WPF MVVM pattern

雨燕双飞 提交于 2019-12-23 01:18:18
问题 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

Binding nested ItemsControls to nested collections

a 夏天 提交于 2019-12-22 10:06:35
问题 I am trying to show pages in my WPF/Caliburn Micro application. The pages should be presented in a rectangular way to the user. My idea is to use a collection (the rows) of collections (the columns) of my base view model for the pages: public BindableCollection<BindableCollection<BaseViewModel>> Children { get; set; } And do something like this in the associated View: <ItemsControl x:Name="Children"> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> <StackPanel Orientation="Vertical" /> <

In Caliburn.Micro how to bind action to nested ViewModel method?

戏子无情 提交于 2019-12-22 08:57:40
问题 I have a WPF application, powered by Caliburn.Micro, view-model first approach. There's a command-bar type of control with its CommandBarView.xaml and bound CommandBarViewModel . Command-bar VM holds a number of nested VMs, one for each button control, all showing a common interface and having common behaviour. Command-bar VM expose them so they can be bound from view: public interface IWarningButtonViewModel { bool IsVisible { get; } bool CanShowWarning { get; } void ShowWarning(); } public

IoC is not initialized on Win7/XP

南楼画角 提交于 2019-12-22 08:29:06
问题 I'm facing a quite strange problem trying to run a WPF application on Win7/XP. The WPF application targets .NET 4.0 and it references Caliburn.Micro 1.5.2 and Autofac 3.1.0 . I'm going to start with a summary of the problem and then I'm going to give details about what I've got so far. OVERVIEW In my dev workstation I have Windows 8 and Visual Studio 2012. I'm using Caliburn and Autofac as described in this post (basically a simplified version of this). When I build and run the application in

Using Caliburn.Micro binding feature on an “inner” user control

只谈情不闲聊 提交于 2019-12-21 17:25:55
问题 I'm quite new to Caliburn.Micro, so I guess this has a simple answer (or at least I hope it has :)) I have a ViewModel with a property called ConnectedSystem that has a sub-property called Name . In my View, I have the following XAML (excerpt): <StackPanel Orientation="Horizontal"> <Label Content="Name:" /> <TextBlock x:Name="ConnectedSystem_Name" /> </StackPanel> This works just fine, and the name is shown in the TextBlock as expected. However, ConnectedSystem has around 10 properties that

Caliburn.Micro: Create and Bind View programmatically

被刻印的时光 ゝ 提交于 2019-12-21 12:19:27
问题 I am currently experimenting with view composition in Caliburn.Micro. I have a working example where I have multiple user control based views injected into my main shell via the "View.Model" attached property route. So far so good. In my application proper I am working with a mixed environment of mainly WinForms, with some WPF, so there is no WPF "shell" for Caliburn to manage. I'd like to be able to create my views on demand and add them to placeholders in my WinForms app. I would like to

Caliburn Micro -> Composing Views from multiple Views/UserControls/CustomControls

最后都变了- 提交于 2019-12-21 05:54:28
问题 How is it possible to re-use and compose parts in CM managed windows? I have found posts regarding using two UserControls to bind to the same ViewModel, but not so much if I want to have multiple views and viewmodels all composed in the same window. (a viewmodel for each view composed into a "master view") The first part of my question would be how to break up components for re-use? If I have two areas of a window where one is a datagrid and another is a details view with labels and text

How can a Caliburn.Micro sub menuitem click call an action on the containing view's viewmodel?

北城以北 提交于 2019-12-21 05:49:09
问题 I have a top level menu in my ShellView and when selecting a sub MenuItem, I would like to call the following method on the ShellViewModel (a Conductor.Collection.AllActive). public void SelectServer(string pServerName) { mDefaultClaimServer = pServerName; } The following does not work as no method gets called (I have tried various signatures and action parameters) - <Menu Name="menu1" DockPanel.Dock="Top"> <MenuItem Header="Select Server" Name="ClaimServers"> <MenuItem.ItemTemplate>

Mahapps flyout not appearing with and caliburn.micro

孤街醉人 提交于 2019-12-21 05:25:13
问题 I'm trying to show a flyout in wpf using mahapps and caliburn.micro, unfortunately the view for the flyout is not being resolved, and all I get is the type name of the view model displayed in the flyout. I need the to display the flyout based on which is ActiveItem in the shell, for example the company search flyout is different to the contact search flyout. Any ideas how I can make this work. public void ShowSearchFlyout() { var supportsSearch = ActiveItem as ISupportSearch; if