caliburn.micro

Binding View and ViewModel on a DataGrid

泪湿孤枕 提交于 2019-12-11 08:47:27
问题 I'm using a View and ViewModel set on an already existing ViewModel. You could say that's the base with the second ViewModel placed on that. When placing another ViewModel in the underlying ViewModel of MainViewModel ( BrowseViewModel in this particular sample), the associated ViewModel does not show up. Implementation as follows: class MainViewModel : PropertyChangedBase { private BrowseViewModel _BrowseViewModel= new BrowseViewModel(); public BrowseViewModel BrowseViewModel { get { return

Setting Caliburn IWindowmanager's Owner Property to Excel with handle HWND

陌路散爱 提交于 2019-12-11 07:13:51
问题 I have an Excel Vsto addin application in which I host WPF application build using Calibrun Micro Autofac.I have a dialog popping up the excel and I want that Pop up window's Owner to be set to this excel window.Only way I see doing this is using WindowInteropHelper Class which needs Window instance. And I am using settings like this : dynamic settings = new ExpandoObject(); And I show window like this : windowManager.ShowDialog(viewModel, settings: settings); So What should I do to set the

Call RichTextBox.ScrollToEnd() from View Model class

牧云@^-^@ 提交于 2019-12-11 06:36:37
问题 Hi I try solve this, in WPF I use Caliburn Micro framework. In View I have bindable richtextbox control, I bind from view model class property type of FlowDocument. I need have a way how can I call method ScrollToEnd on richetextbox control in view. Is it possible? Because in view model class I don’t have instance of richtextbox. Thank for idead. 回答1: A similar question is asked here with a solution. http://social.msdn.microsoft.com/Forums/en/wpf/thread/67b618aa-f62e-43f8-966c-48057f4d4e0c

Using Caliburn.Micro with Expression Blend in WP7

半腔热情 提交于 2019-12-11 06:23:16
问题 I just creating a little WP7 project using Caliburn.Micro as the MVVM framework, but I'm not sure of the best way of getting the project to work well with either Expression Blend or the Visual Studio designer. How are people doing their design with Calibun.Micro? Am I best to ignore the conventions and use traditional binding mechanics so that Blend will understand the views? Is there any way to import Caliburn binding logic into Blend so that it recognises the conventions? At the moment all

Guard Clause Not Firing

若如初见. 提交于 2019-12-11 05:04:56
问题 So I have been trying to get guard clauses to work with Caliburn.Micro and a bound textbox. The View: <TextBox x:Name="UserAccount_DisplayName" Margin="-10,-5,-10,8"/> <phone:PhoneApplicationPage.ApplicationBar> <shell:ApplicationBar IsVisible="True" IsMenuEnabled="False"> <shell:ApplicationBar.Buttons> <cal:AppBarButton IconUri="\Resources\Iconography\appbar.check.rest.png" Text="Save" Message="SaveAndNavigateToAddAccountView" /> </shell:ApplicationBar.Buttons> </shell:ApplicationBar> <

Locked resources (image files) management

喜欢而已 提交于 2019-12-11 04:23:48
问题 The application is a desktop document management system. Image files (of scanned docs) are stored within a shared network folder and its indices within a database. Now, when the image of a selected document page is displayed the user has the option to delete it (via a contextual menu). The problem is, if I try to do this then it throws an exception (the resource is locked) which has all the sense given that it's being shown on screen. So, currently I maintain a persistent delete queue. Once

Caliburn Micro reference implementations

蓝咒 提交于 2019-12-11 03:48:46
问题 Can you suggest some good real live and not too simplistic implementations based on Caliburn Micro where the source code is available to study approaches to common problems and "best practises"? 回答1: Have you had a look at the Caliburn.Micro contest winners for 2010? I don't know if they are too simple for your needs, and how up to date the projects are in relation to changes in the framework since they were submitted, but you could try there. I'm not sure what common problems and best

Sliding transition animation between Screens in Caliburn Micro

不羁的心 提交于 2019-12-11 03:37:35
问题 In Silverlight (or WPF) application, I have a Conductor which is a Conductor.Collection.OneActive What is a good way to animate a transition between screens (I'd like a simple slider) when I call ActivateItem(...)? P.S. In my non-Caliburn apps I have used both TransitionPresenter controls of different makers or State Manager animations. Edit: From Rob's answer, TransitionPresenter IS the way to go in the described situation. It maps nicely to the "default" Caliburn way of using ContentControl

How to get a reference to window from a user control using Caliburn Micro

北慕城南 提交于 2019-12-11 01:35:41
问题 I want to get a reference from a user control view model to the window that holds the user control. How can I do this? If I can get a reference to the view from view model then I can use: Window parentWindow = Window.GetWindow(userControlReference); So my questions are: What's the best way to get the reference from user control view model to the window that holds the user control? If I want to use the above code, what is the best way to get a reference to view from view model in Caliburn

Caliburn.Micro when setting VM to inherit Screen, overrides title field in View

泄露秘密 提交于 2019-12-11 00:36:42
问题 If I have a ViewModel like so: public class ViewModel : IPropertyChangeBase, IViewModel { } The "Title" property I set in the xaml of the view it's bound to properly shows. If I have the ViewModel inherit from Screen instead what shows up in the title is the complete type name of the ViewModel, like "MarksProject.ViewModels.ViewModel." This shows up on the window's title. //View Title property being overriden. public class ViewModel : Screen, IViewModel { } 回答1: Screen defines a property