prism

Alternative way to create shell in Prism.Windows 7.1.0?

陌路散爱 提交于 2019-12-13 03:26:29
问题 As of this writing, the upcoming Prism.Windows 7.1.0 from MyGet Package is missing override method CreateShell() and I really wonder if it's gonna be moved into another method or it'll be gone in the final release. If so, what's the alternative solution to implement shell view, assuming the code is from this tutorial and DryIoC container is used instead. 回答1: Rather than using the CreateShell() override, you could create the NavigationService inside of a NavigationView . The code provided in

Prism Xamarin Forms View is not updated after changing the model in OnNavigatedTo

最后都变了- 提交于 2019-12-13 03:19:10
问题 Prism 6.3.0 I'm navigating to a View and I'm settings some properties of the Model in the OnNavigatedTo method. The problem is that the view is not updated after setting the properties of the model. My model looks like this public class Person { public string Name { get; set; } public string Email { get; set; } } In my ViewModel public Person Model { get => _model; set => SetProperty(ref _model, value); } The OnNavigatedTo method is public void OnNavigatedTo(NavigationParameters parameters) {

WPF Module toolbar prism

喜你入骨 提交于 2019-12-13 03:11:30
问题 Can anyone provide a hint on how I would populate a navigation toolbar similar to the StaffLynx Entity toolbar that the Billy Hollis video displays across bottom of the app? I only want to show a "Client" icon in the toolbar if indeed the application version running has the Client module loaded and available but am unsure how to perform this MVVM style? Thanks 回答1: What you want is your toolbar to have a region: <controls:MyToolbar Prism:RegionManager.RegionName="ToolbarRegion" /> Then ensure

WPF & Prism 4.1 Garbage Collection / Memory Issues

半腔热情 提交于 2019-12-13 03:07:58
问题 I built a Prism application using WPF, .Net 4, Prism 4.1, and Unity. I'm using a DirectoryModuleCatalog to find modules at runtime. My views are displayed in a TabControl (MainRegion). When I remove a view from the region, the view and viewmodel remain in memory and never get garbage collected - the tabitem is removed. After many hours searching, I cannot figure out what I'm doing wrong. Here's my bootstrapper: public class Bootstrapper : UnityBootstrapper { protected override void

Prism Xamarin Forms ToolbarItem appearing twice

岁酱吖の 提交于 2019-12-13 02:57:43
问题 I am using Prism for Xamarin Forms application development. May be because I am new to both Prism and Xamarin Froms because of which I am facing a basic issue with the navigation. Let me start with the details of my implementation and then the issue at hand. I have a MasterDetail Page (named Home) which is my main page. There are a few menu items in the Master Page. One of them is Partner. On Click of Partner menu item, NavigationService.NavigateAsync("Navigation/Partner") method is called.

Unit testing with Moq, Prism 6, and Event Aggregation

我怕爱的太早我们不能终老 提交于 2019-12-13 02:35:49
问题 I want to unit test a module by throwing messages at it via Event Aggregation to make sure it responds appropriately, either by setting properties appropriately, or by publishing other messages as a result. I am using Prism 6. In my project, the infrastructure project has: public class ImportantMessage : PubSubEvent<string> { } ModuleA publishes a message like this: eventAggregator.GetEvent<ImportantMessage>().Publish(importantString); ModuleB receives the message like this: eventAggregator

Prism RegionAdapter - Removing then Adding View

依然范特西╮ 提交于 2019-12-12 20:57:20
问题 I have a prism/wpf/mef solution that contains an AvalonDock. I created a RegionAdapterBase<Pane> class that handles creating and removing the Panes from AvalonDock. Heres the problem I'm running into: I click a button in my menu and a view is registered with a region and displayed in my DocumentPane I click the close button in AvalonDock to close the tab and remove the view I click the same menu button to add it back again I receive the error: "Specified element is already the logical child

Master page but for Regions?

点点圈 提交于 2019-12-12 18:14:59
问题 I have a RibbonBar with four buttons, each of which selects a different view and injects it into the MainRegion. Right now, it's working well but each of the four views have a few controls in common e.g. Displaying the username, date/time, search box etc. As of now, I've made separate views but I would like to know if there is a way of implementing a Master Page/UserControl so that I don't have to repeat code. So the design, right now, is like so: Shell <Window> <Grid> <DockPanel> <RibbonBar

AutoWirePartialView with prism does not work or badly used?

半世苍凉 提交于 2019-12-12 13:59:33
问题 I'm trying to use prism 7.1 AutoWirePartialView to bind a PartialView to its viewModel. However, binding is not working, or at least, setting the viewModel to the PartialView does not seem to work, it still has the page's BindingContext as BindingContext. There is my Page : <?xml version="1.0" encoding="utf-8" ?> <ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="Project.Core.Views.NotConnectedViews.ForecastDemoPage"

Prism ServiceLocator GetInstance and MEF

十年热恋 提交于 2019-12-12 13:46:48
问题 I'm trying to use Microsoft.Practices.ServiceLocation.ServiceLocator and MEF. Interface IServiceLocator defines method GetInstance with two parameters. First parameter is serviceType and second paremeter is key. I have two classes which implement interface IMyInterface and they have Export attribute: [Export(typeof(IMyInterface)), PartCreationPolicy(CreationPolicy.Shared)] public class Class1 : IMyInterface {} [Export(typeof(IMyInterface)), PartCreationPolicy(CreationPolicy.Shared)] public