prism

Close dynamically added Tab Items using Prism - WPF

两盒软妹~` 提交于 2019-12-24 09:53:10
问题 I'm using Prism RegionManager , to register different views with a TabControl region inside the MainView . MainView.xaml <TabControl regions:RegionManager.RegionName="MainViewTabRegion"> <TabControl.ItemTemplate> <DataTemplate> <DockPanel Width="Auto"> <Button Command="{Binding DataContext.DataContext.CloseTabCommand, RelativeSource={RelativeSource AncestorType={x:Type TabItem}}}" CommandParameter="{Binding RelativeSource={RelativeSource AncestorType={x:Type TabItem}}}" Content="X" Cursor=

Xamarin Forms: How to add controls on MasterDetail Tool Bar

雨燕双飞 提交于 2019-12-24 09:04:03
问题 I am creating a master detail page in Xamarin Forms. I want to have Menu icon on top left, searcher on the right and another label on the menu bar. Can some help help me with how I can be done? I added the menu icon. I want help with adding other controls on the toolbar/Menubar/Navigation bar what ever it is called. Its the bar on top of the master detail page. Code: <?xml version="1.0" encoding="UTF-8"?> <MasterDetailPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas

Prism 2 SL : Remove View from Region when button clicked

情到浓时终转凉″ 提交于 2019-12-24 08:38:25
问题 I am new to Prism and I am trying to determine a best practice for deactivating a view in a Prism 2 application -- when a user clicks a button on the view I want to deactivate the view. The view is executing a command when the button is clicked. The view model is receiving the command but the viewmodel does not have a reference to the regionmanager. Should the view model know about the region manager? And even if the viewmodel had a reference to it, it needs the view instance to pass to the

How to redirect Assembly Versions in wpf?

落花浮王杯 提交于 2019-12-24 06:58:19
问题 How to redirect Assembly Versions in WPF? Following http://msdn.microsoft.com/en-us/library/7wd6ex19(v=vs.110).aspx#bypass_PP throws File Load exception. Could not load file or assembly 'Microsoft.Practices.Unity, Version=2.1.505.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"

Creating WPF ResourceDictionary from code doesn't seem to work when setting ResourceDictionary.Source

眉间皱痕 提交于 2019-12-24 06:39:12
问题 I have a project containing a xaml ResourceDictionary that I wish to use outside of a FrameworkElement. The resource dictionary will contain a DataTemplate for a class local to the project to avoid polluting the app.xaml (as the project is a prism module, and will not always be present depending on config). So, I have a test.xaml file with a Resource build action. This is intended to supply the DataTemplate for a TestObject class. In the TestObject class I have a GetTemplate() method The

Module is not loaded by Prism framework if a type from the same module is used explicitly

荒凉一梦 提交于 2019-12-24 06:32:08
问题 We have a WPF application using prism 5 framework. Modules are loaded using DirectoryModuleCatalog. At the same time if I refer one of the modules in the start up project where bootstrapper is located and use a type from it, that module is skipped from loading. Looks like the prism framework is skipping it as it is already loaded in AppDomain. Is there any way to load the module albeit a type from it is referred in the startup project? 回答1: Sounds like you are only referencing the Module and

Non-Generic CompositePresentationEvent and EventSubscription?

China☆狼群 提交于 2019-12-24 05:51:18
问题 I am trying to create a TPayLoad -free CompositePresentationEvent , that its delegate is parameterless. I want to have a global application event that takes no parameters such as UserLoggedInEvent , UserGotIdleEvent etc. etc. How should this be done with the Prism 4.0 event aggregation system? 回答1: This post clarified some things for me. Anyway I realize now the the Prism EA system is really clumzy tho. Here are some extension methods that focus on reducing the verbosity of the EA. 回答2: For

Implement dependency injection in background services in Xamarin Forms using Prism

会有一股神秘感。 提交于 2019-12-24 02:45:23
问题 I am making use of Prism in my xamarin forms project.I was able to use dependency injection(constructor injection) in my View Model without any problems.I am also making use of background services to push long running tasks in the background.How do I inject dependency in my Background services?When I try to pass the interface object as a paramater to the constructor(SyncingBackgroundingCode) ,the object(SqliteService) is null.I have registered and resolved the objects in the dependency

Handling the same click event in a nested control inside ListBoxItem DataTemplate - WPF

混江龙づ霸主 提交于 2019-12-24 01:54:40
问题 When we have a custom listbox with a defined event-handling for the left-click of the mouse, and also an additional shape inside the ListBoxItem data template which needs to do some action when it is clicked how can we handle these I have a Custom ListBox witch tries to handle the Click event : In the ContentView: <ABC:AListBox ClickCommand="{Binding LaunchCommand}" ...> </ABC:AListBox> In it's datatemplate we have this: <DataTemplate x:Key="ThisListTemplate"> <StackPanel ...> <Border Grid

Handling the same click event in a nested control inside ListBoxItem DataTemplate - WPF

只谈情不闲聊 提交于 2019-12-24 01:54:14
问题 When we have a custom listbox with a defined event-handling for the left-click of the mouse, and also an additional shape inside the ListBoxItem data template which needs to do some action when it is clicked how can we handle these I have a Custom ListBox witch tries to handle the Click event : In the ContentView: <ABC:AListBox ClickCommand="{Binding LaunchCommand}" ...> </ABC:AListBox> In it's datatemplate we have this: <DataTemplate x:Key="ThisListTemplate"> <StackPanel ...> <Border Grid