Questions tagged [prism]

Prism is a framework for building loosely coupled, maintainable, and testable XAML applications in WPF, Windows 10 UWP, and Xamarin Forms.

Prism is an open source framework for building loosely coupled, maintainable, and testable XAML applications in WPF, Windows 10 UWP, and Xamarin Forms.

Prism provides an implementation of a collection of design patterns that are helpful in writing well-structured and maintainable XAML applications, including MVVM, dependency injection, commands, event aggregation, and others.

Prism's core functionality is a shared code base in a Portable Class Library targeting these platforms. Those things that need to be platform specific are implemented in the respective libraries for the target platform.

Prism also provides great integration of these patterns with the target platform. For example, Prism for UWP and Xamarin Forms allows you to use an abstraction for navigation that is unit testable, but that layers on top of the platform concepts and APIs for navigation so that you can fully leverage what the platform itself has to offer, but done in the MVVM way.

For more information visit the project site https://github.com/PrismLibrary/Prism.

You can find the latest documentation here.

Samples

Some samples for using Prism with WPF, UWP and Xamarin Forms can be found here:

WPF

UWP

Xamarin Forms

4433 questions
1
vote
2 answers

How can I bind a CommandParameter with a child UserControl's child element?

I have the following xaml view: [...]
Laurent Michel
  • 1,069
  • 3
  • 14
  • 29
1
vote
2 answers

RegisterSingleton issue in Prism 7.2

I have a class defined as follows (UPDATED): internal class SharedData : ISharedData { public List AllGases { get; set; } public List AllCylinders { get; set; } } And the interface is defined as public interface…
chuckp
  • 313
  • 1
  • 2
  • 15
1
vote
2 answers

Begin a storyboard on loaded event in silverlight

I am looking at the Prism Stocktrader RI and I can see that the InTransition Storyboard is played using code. I tried the following xaml:
basarat
  • 261,912
  • 58
  • 460
  • 511
1
vote
0 answers

Passing a selected object from child region to parent (PRISM)

We want to pass a selected object inside a child region back to the parent What we have is a view for selecting a new object (IClient) and assign a text reason why this object has been added. To select the new object we have another view that…
1
vote
2 answers

How to bind Image Button command from a DataTemplate Selector to a ViewModel?

I am working with SyncFusion's TreeView. I have a TreeView with three separate DataTemplate/Custom View Cells. In my main XAML, I have the following tree view code below which binds to my DataTemplates. SamplePage.xaml
Mochi
  • 1,059
  • 11
  • 26
1
vote
2 answers

How do I use RequestClose in IDialogAware in Prism 7.2.0.1367 for Xamarin Forms

I have been following the Prism 7.2.0.1367 release notes. I am able to navigate to a dialog ViewModel using dialogService.ShowDialog(NavigationStrings.MyViewModel). But when I close it, I get a null reference exception on RequestClose. I have a…
Chucky
  • 1,701
  • 7
  • 28
  • 62
1
vote
0 answers

GoBackAsync() goes back 2 pages instead of 1. Prism Xamarin Forms

I am trying to pass parameters back to a view using GoBackAsync(). All my view modelas inherit a BaseViewModel which inherits INavigatedAware. The navigation path to the last page where I go back is as follows: NavigationPage/TabbedView -> ViewA ->…
steve
  • 797
  • 1
  • 9
  • 27
1
vote
0 answers

View not visibly changing in Region of Second Window

I have a Prism application using v7.0.0396 and I have recently added a second window that opens when the user needs to sign in. This second window is held in a separate module. When the window opens, it should load in the ‘SignIn’ view and if the…
Nick Bull
  • 1,099
  • 10
  • 23
1
vote
1 answer

Loading modules in Prism from xap without reference

I'm using Prism 4 with Unity. I have a main project, and a module. The module is created as Silverlight Applications, so it builds a separate xap file. I load the modules in the Bootstrapper's ConfigureModuleCatalog, just like the documentation…
Matt Johnson-Pint
  • 230,703
  • 74
  • 448
  • 575
1
vote
2 answers

Use Feature Folders with Prism

I have a Xamarin.Forms project that uses Prism, and the number of Views and View Models is growing unwieldy. In web projects I usually use Feature Folders, grouping relevant code together,…
Cocowalla
  • 13,822
  • 6
  • 66
  • 112
1
vote
2 answers

Is there a way set a dirty flag in a Xamarin ViewModel after the properties are initialized?

I want to set a dirty flag for any of the required properties in my view model. I initialize IsDirty to false in the constructor. Unfortunately all of the setters in my properties are called after the constructor. Is there a way I can set IsDirty to…
Blanthor
  • 2,568
  • 8
  • 48
  • 66
1
vote
1 answer

Is something like Prism INavigationAware Interface for ViewModels in Xamarin.Forms 4 AppShell Navigation?

In Prism for Xamarin.Forms there is an interface INavigationAware. You implement it in the ViewModels (if you want to). There are three methods, OnNavigatedFrom, OnNavigatedTo and OnNavigatingTo. These methods are called by the Prism navigation…
this.myself
  • 2,101
  • 2
  • 22
  • 36
1
vote
2 answers

How To - Properly Bind Button Inside of ListView to View Model Property

I seem to be having issues with getting a command wired up to a button. Suppose I have the following: MainPageViewModel.cs public class MainPageViewModel : ViewModelBase { private ICollection _menuItems; public…
Jason Richmeier
  • 1,595
  • 3
  • 19
  • 38
1
vote
1 answer

Content Page Tool Bar Item Is Missing Upon Navigating using PopUpPage Prism

I'm currently facing a problem that when I use await _navigationService.PushPopupAsync() The tool bar item on the next page where I am going to navigate is missing its like the PushPopupAsync() is destroying my next page. Does somebody encounter…
Ginxxx
  • 1,602
  • 2
  • 25
  • 54
1
vote
0 answers

Multiple NavigationStack in Xamarin.Forms App with Prism Library

There's some way to create two navigation stacks in Xamarin.Forms App using Prism Library? I faced this needs to manage two stacks one for the app and another for authentication as shown in the attached image. Think in scenario when the…