caliburn.micro

Why does binding affect height?

橙三吉。 提交于 2020-01-02 07:00:35
问题 Style definition in Resources/Shared.xaml ( updated ): <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:system="clr-namespace:System;assembly=mscorlib"> <system:Double x:Key="fullHeight" >26</system:Double> <system:Double x:Key="halfHeight" >16</system:Double> <Thickness x:Key="m">10</Thickness> <Style TargetType="Button"> <Setter Property="FontSize" Value="{StaticResource fullHeight}"/> <Setter

(Caliburn Micro) Mapping a ActionMessage Methodname to a Child Object of the ViewModel

自古美人都是妖i 提交于 2020-01-02 05:25:25
问题 I would like to bind the methodname propererty of the caliburn.micro actionmessage to a method on a child object of the ViewModel. How I would imagine it should work: <i:Interaction.Triggers> <i:EventTrigger EventName="Click"> <cal:ActionMessage MethodName="MenuItemX.Clicked" /> </i:EventTrigger> </i:Interaction.Triggers> The problem here is that the methodname does not live directly on the viewmodel, but on a childobject of the viewmodel. So in this case I would like to bind to: ViewModel

Calling method of Map control with Caliburn Micro and WP7

对着背影说爱祢 提交于 2019-12-30 14:38:43
问题 I have a page (view) in my Windows Phone 7 application that uses the Silverlight Map control. I need to call the SetView method on the control, but I'd like to stick to the MVVM style of keeping functionality in the view model. I plan to call this method after clicking on an application bar button, so I don't have access to the Map via the EventArgs parameter. What's the best way to do this? 回答1: I haven't worked with the map control myself, but here's a couple of ideas off of the top of my

Advice on Views navigation using Caliburn.Micro MVVM WPF

血红的双手。 提交于 2019-12-30 11:36:07
问题 I'm new on Caliburn Micro and want some advice on which path to take to devolop my app interface and navigation between views. My idea is to have a MainWindow which will contain a menu of buttons, each one related with a specific view. Each view will be stored in a separated WPF UserControl. The mainWindow will also contain a TabControl bound to an ObservableCollection of tabs on viewmodel. Everytime a button on menu is clicked, I want to add a new tab with a ContentPresenter inside that will

Caliburn.Micro nested ViewModels best practice

∥☆過路亽.° 提交于 2019-12-30 06:21:08
问题 This is a pretty long question, so please bear with me. Currently I am developing a small tool intended to help me keep track of the myriad of characters in my Stories. The tool does the following: Load the characters which are currently stored as json on the disk and stores them in a list, which is presented in the Shell via a ListBox. If the user then opens a character the Shell, which is a Conductor<Screen>.Collection.OneActive , opens a new CharacterViewModel , that derives from Screen .

Replacing dll to a newer version

那年仲夏 提交于 2019-12-29 09:27:07
问题 I have a Caliburn.Micro application with many projects. Several projects refer to the same dll in a separate folder. Now I needed to replace that dll with a newer version. I removed the reference from all projects and added it again. But I am getting a runtime error: Could you please help? P.S. I tried to use fuslogvw.exe, but it shows up empty: 回答1: I think you're using Visual Studio. First of all, check in the properties of all that FileHelpers referenced if the Specific Version is set to

Caliburn.Micro and DataGrid: Reliable approach for detecting individual cell changes?

老子叫甜甜 提交于 2019-12-25 05:25:25
问题 I have an MVVM-based WPF application that relies on Caliburn.Micro . In one view, I am displaying a DataGrid and a Button . The DataGrid displays a collection of items, where the item class derives from PropertyChangedBase . The button should be enabled or disabled based on the contents in the editable DataGrid cells. What is the most reliable approach to achieve this with Caliburn.Micro ? Schematically, this is what my code looks right now: public class ItemViewModel : PropertyChangedBase {

Binding KeyDown Event Silverlight

喜欢而已 提交于 2019-12-25 03:30:34
问题 I am attempting to have a key binding cause an event within the view model. I have been search for a while and have not come across any solutions that have worked thus far, unfortunately. This is what I am basically attempting to implement: <i:Interaction.Triggers> <i:EventTrigger EventName="createNew"> <cal:ActionMessage MethodName="newCustomer" /> </i:EventTrigger> </i:Interaction.Triggers> I am wanting a way to provide a "hotkey" to allow the user to implement a newCustomer event within

How to automatically change text in a silverlight textbox?

三世轮回 提交于 2019-12-25 02:19:14
问题 I am using MVVM/Caliburn.Micro in a silverlight 5 project and I have a requirement to automatically change the text the user enters in a silverlight textbox to uppercase. First, I thought I could just set the backing variable on the ViewModel to uppercase and the two way binding would change the text. That didn't work (though I believe it will if I use a lost focus event, but I cannot do that since I have other things I must do for KeyUp as well and attaching two events results in a xaml

How to reuse a wpf view?

瘦欲@ 提交于 2019-12-24 16:33:25
问题 Is there a way to reuse a WPF View using it with Caliburn.Micro? In example I've got a DetailViewBase.xaml with a SaveAndClose and Cancel button. Now I want to use the DetailViewModelBase and the XAML in PersonView(Model). I hope this is question is clear. 回答1: If my assumption is correct, I think what you mean is that you want to 'compose' a more complex view from several simpler viewmodels. You can inherit from viewmodels, but obviously a viewmodel can only have one active view at a time.