caliburn.micro

Caliburn.micro - notifying a viewmodel on property change in another viewmodel

大城市里の小女人 提交于 2019-12-10 23:57:03
问题 I have a program that connects to a server and sends commands to it. in my program I have 2 windows, one of them is a toolbar with a textbox that shows current status (we'll call that "mainviewmodel") and the other is a login window which receives username and password and logs me into the server (we'll call that "loginviewmodel") now, in order for the mainviewmodel to know the loginviewmodel I use this: [Import] Private LoginViewModel loginViewModel; lunch the login window from the

Caliburn.Micro - ShowDialog() how to close the dialog?

為{幸葍}努か 提交于 2019-12-10 19:04:27
问题 EDIT: New Information, just managed to get a logger working (I honestly had no idea cm had one!) and i'm given this message when attempting to use TryClose() . TryClose requires a parent IConductor or a view with a Close method or IsOpen property I have been stuck on this for a number of days now, and research has turned up zero, I tried posting a question previously about this issue but it received no answers so i assume I didn't word it correctly. I have a view and viewmodel ContentView

Caliburn element convention

别来无恙 提交于 2019-12-10 17:34:27
问题 While trying to learn the source for GameLibrary sample application I saw a line like this: ConventionManager.AddElementConvention<Rating>(Rating.ValueProperty, "Value", "ValueChanged"); Looked into the source of Caliburn but couldn't really understand what element conventions are. Can someone describe briefly please? 回答1: ConventionManager.AddElementConvention allows you to establish a set of "default" settings used by the convention system for each type element. In the case mentioned above,

Caliburn Micro, How to use ContentControl (or display 'sub' ViewModel) using ViewModel First

旧城冷巷雨未停 提交于 2019-12-10 15:38:31
问题 I'm using MVVM framework Caliburn Micro throughout my application with ViewModel first (or so I thought). However, when I had problems with a dialog using TryClose(true) failing to close it's parent window and stumbled upon this question that perfectly outlined my problem, I'm also getting the "TryClose requires a parent IConductor or a view with a Close method or IsOpen property.": Caliburn.Micro - ShowDialog() how to close the dialog? However, I'm not exactly sure how to implement the

Data Binding Order of Operations for Caliburn Micro Xamarin

巧了我就是萌 提交于 2019-12-10 14:33:32
问题 What is the "Order of Operations" (OOP) for Data Binding in Caliburn.Micro Xamarin Android (Mono.Android)? PS: a tutorial that explains/compares how binding occurs in Caliburn Micro Standard/WPF, Caliburn Micro Android & Caliburn Micro iOS (ie Caliburn.Micro Xamarin) would be very useful and a nice introduction into Caliburn Micro Xamarin. For regular Caliburn.Micro the OOP for Binding is (correct me if I am wrong): Declare Field in ViewModel On Field Set: call NotifyOfPropertyChange(..) Bind

Unity/Caliburn Micro, Injection Constructor with multiple parameters

China☆狼群 提交于 2019-12-10 11:57:27
问题 I am currently trying to learn how to implement MVVM using Unity and Caliburn Micro. After looking around for help elsewhere I am still unsure about how to set up the Constructor Injection properly. I don't know if this is not working due to my lack of expertise in MVVM or something else. My problem is I want to pass in two IScreen Objects into my main window(shell) Class that can be navigated between when the user clicks on a button. Here is the code for the constructor in my

Caliburn Micro Action inside ItemContainerStyle - No target found for method

随声附和 提交于 2019-12-10 11:36:37
问题 I'm working on a WPF project using Caliburn Micro as a framework for MVVM, and during the last week I've been lucky enough to find every solution to any problem on StackOverflow, but now I'm facing a bigger issue that I can't solve by myself. I have a View containing a TreeView; each item of the treeview should invoke a method when: it is double clicked [working] an entry of its context menu is clicked [not working] This is the TreeView: <TreeView x:Name="projectTreeView" Visibility="{Binding

Caliburn.Micro: Recovering from Exception in IResult

别说谁变了你拦得住时间么 提交于 2019-12-10 11:26:53
问题 This was posted at Caliburn.Micro discussions also. I'm really looking for advice and opinions on the best way to solve. Say I have the following Action public IEnumerable<IResult> SaveStation() { yield return Busy.MakeBusy(); yield return new StationSave(_station); yield return Busy.MakeNotBusy(); yield return Show.Tab<StationBrowseViewModel>(); } StationSave is an IResult wrapper around a simple (WCF) service invocation. The service uses FaultContract/FaultException for failures. In the

Cannot find view for ViewModel

混江龙づ霸主 提交于 2019-12-10 02:48:01
问题 I have a wpf application using Caliburn.Micro. I have a view MyView: <UserControl x:Class="ReferenceMaintenanceWorkspace.MyView" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" > <UserControl.Resources> </UserControl.Resources> <TabControl x:Name="Items" > </TabControl> I have also

Getting row information after a doubleclick

回眸只為那壹抹淺笑 提交于 2019-12-10 02:41:53
问题 I am trying to retrieve row info from a datagrid after a double click event. I have the event setup, but now I just need to setup the function to retrieve the data from the row. XAML: <DataGrid Width="Auto" SelectionMode="Extended" IsReadOnly="True" Name="ListDataGrid" AutoGenerateColumns="False" ItemsSource="{Binding ListFieldObject.MoviesList}" DataContext="{StaticResource MovieAppViewModel}" cal:Message.Attach="[Event MouseDoubleClick] = [Action RowSelect()]"> <DataGrid.Columns>