Git Product home page Git Product logo

prism-documentation's People

Contributors

andersnicolai avatar bartlannoeye avatar brianlagunas avatar chaseflorell avatar damiansuess avatar dansiegel avatar duanenewman avatar feliperomero3 avatar githubpang avatar grab-a-byte avatar hnabbasi avatar hofmadresu avatar jmegner avatar kbhaggan avatar leocdi avatar michaelponti avatar mlimber avatar petergregg avatar phenixita avatar prashantbaher avatar r2d2rigo avatar segor avatar sekiya9311 avatar sergeytarkhanov avatar snehansh avatar squiddie avatar strayswonderland avatar sturlath avatar timosalomaki avatar waded avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

prism-documentation's Issues

Prism WPF DryIoc application crash with .NET 6.0.1 runtime

Hello, I'd like to report an issue using Prism with the .NET 6.0.1 runtime.

Repro steps

  1. Use Visual Studio Prism Template pack to create a new "Prism Full App (WPF)" then select DryIoc as the container.
  2. Set FullApp1 as the default startup project in Visual Studio Debug|AnyCPU
  3. Build solution then start debugging session.
  4. Observe following callstack (redacted some PII details)

'FullApp1.exe' (CoreCLR: DefaultDomain): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\6.0.1\System.Private.CoreLib.dll'.
'FullApp1.exe' (CoreCLR: clrhost): Loaded 'C:\Users\local.user\source\repos\FullApp1\FullApp1\FullApp1\bin\Debug\net6.0-windows\FullApp1.dll'. Symbols loaded.
'FullApp1.exe' (CoreCLR: clrhost): Loaded 'C:\Users\local.user\source\repos\FullApp1\FullApp1\FullApp1\bin\Debug\net6.0-windows\Prism.DryIoc.Wpf.dll'.
'FullApp1.exe' (CoreCLR: clrhost): Loaded 'C:\Users\local.user\source\repos\FullApp1\FullApp1\FullApp1\bin\Debug\net6.0-windows\Prism.Wpf.dll'.
'FullApp1.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\6.0.1\PresentationFramework.dll'.
'FullApp1.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\6.0.1\WindowsBase.dll'.
'FullApp1.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\6.0.1\System.Runtime.dll'.
'FullApp1.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\6.0.1\System.Xaml.dll'.
'FullApp1.exe' (CoreCLR: clrhost): Loaded 'C:\Users\local.user\source\repos\FullApp1\FullApp1\FullApp1\bin\Debug\net6.0-windows\Prism.dll'.
The program '[30752] FullApp1.exe' has exited with code 3762504530 (0xe0434352).

This occurs with the .NET 6.0.1 runtime and seems to be fixed with 6.0.2 or any later version.

¿Net MAUI?

Hello. Thanks for great toolkit.
One question: With Net MAUI and the new Release Candidate
Do you have plans for migrations?

Confusion with defining Detail page in xaml for MasterDetailPage

https://prismlibrary.com/docs/xamarin-forms/navigation/working-with-masterdetailpages.html

The link above on how to use Prism with Master Detail Pages currently says 'TBD'. It would be useful to add how to use it, particularly on how a Detail page cannot be defined in XAML but only as part of Navigation MasterDetailPage/DetailPage. The Prism sample for Master detail page is empty too. https://github.com/PrismLibrary/Prism-Samples-Forms/tree/master/09-MasterDetail

When using Prism for TabbedPage (if I'm not mistaken) you can define the Tab Page in xaml, following from this I am in a situation when I want to define a <tabPage: MasterDetailPage /> as a Tab page - it will always fail to load as I am not able to "hardcode" the detail page in advance. This confusion is more for Stackoverflow but was wondering if there is a way to define Details page in advance, if not, would be nice to make clear in documentation.

[Bug] GTK# - Method add_ModuleDownloadProgressChanged does not have an implementation.

Description

I created GTK# project following the documentation and the application is crashing ("System.TypeLoadException: 'Method 'add_ModuleDownloadProgressChanged' in type 'Prism.Modularity.ModuleManager' from assembly 'Prism.Forms, Version=7.2.0.1422, Culture=neutral, PublicKeyToken=null' does not have an implementation."). I also followed the instructions of this article, but I was not able to reproduce the steps from article, because my csproj looks different.

Steps to Reproduce

  1. Clone the repo included in reproduction link and start PrismGTKTest.GTK project.

Expected Behavior

Program does not crash and display the simple GUI.

Actual Behavior

Program crashes -> "System.TypeLoadException: 'Method 'add_ModuleDownloadProgressChanged' in type 'Prism.Modularity.ModuleManager' from assembly 'Prism.Forms, Version=7.2.0.1422, Culture=neutral, PublicKeyToken=null' does not have an implementation."

Basic Information

  • Version with issue: 7.2.0.1422 & 7.2.0.1367 (earlier versions are missing Prism.Navigation)
  • Last known good version: -
  • Xamarin.Forms version: 4.8.0.1269
  • IDE: Visual Studio 2019 (16.7.0) - Win 10

Screenshots

Exception:
image

CsProj
image

Reproduction Link

https://github.com/DlbSt/PrismGTKTest

Make Prism Modularity Support clearer

Description

As reported, the current Prism Modularity docs make it seem that Modularity is supported for WPF & Uno, and it's less clear that it is supported for Xamarin.Forms. The docs need to be updated to make this abundantly clear.

Since the API's are nearly identical the Modules topic should move from WPF to the core level

Why did I can not Compile my wpf project by using prism 7, what it reports : There is no “Main” function as entrypoint

First, I followed the prism 7 documention:change the base class of 'App' to PrismApplication, remove the 'StartUri' property, override the function CreateShell(),RegisterTypes(IContainerRegistry containerRegistry),then,add a ItemGroup with point to "App.xaml" .all of this can not help to compile success.

Code:
<prism:PrismApplication x:Class="WpfApp2.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:WpfApp2"
xmlns:prism="http://prismlibrary.com/"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
d1p1:Ignorable="d"
xmlns:d1p1="http://schemas.openxmlformats.org/markup-compatibility/2006" >
prism:PrismApplication.Resources

</prism:PrismApplication.Resources>

</prism:PrismApplication>

public partial class App
{
protected override Window CreateShell()
{
//return Container.Resolve();
return ServiceLocator.Current.GetInstance();
}

    protected override void RegisterTypes(IContainerRegistry containerRegistry)
    {
        containerRegistry.Register<MainWindow>();
    }
}
MSBuild:Compile Designer ........

DialogService does not show dialogs view in modal page (Xamarin.Forms)

DialogService does not show dialogs view if right now visible some modal page:

In Application class (App.xaml.cs):

await NavigationService.NavigateAsync($"{nameof(NavigationPage)}/{nameof(SomeContentPage)}");

in SomeContentPageViewModel

        private INavigationService navigationService { get; private set; }
        public Command OpenModalPage { get; set; }
        public SomeContentPageViewModel(INavigationService navigationService)
        {
            this.navigationService = navigationService;
            OpenModalPage = new Command(NavigateToModalPage);
        }

        private void NavigateToModalPage()
        {
             navigationService.NavigateAsync($"{nameof(SomeModalContentPage)}", useModalNavigation: true);
        }

in SomeModalContentPageViewModel

           private readonly IDialogService dialogService;
           public SomeModalContentPageViewModel(IDialogService dialogService)
        {
            this.dialogService = dialogService;
        }
.....
            dialogService.ShowDialog("DialogView", new DialogParameters
           {
               {"message" , message },
               {"backgroundColor", Color.FromHex("#D0021B") }
           });
....

also have DialogView.xaml

<?xml version="1.0" encoding="UTF-8"?>
<Frame xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:prism="http://prismlibrary.com"
             x:Class="Test.Forms.Views.DialogViews.DialogView"
             prism:DialogLayout.RelativeWidthRequest="1"
             prism:DialogLayout.CloseOnBackgroundTapped="{Binding CloseOnTap}">
    <StackLayout>
         <Label Text="{Binding Message}"
                HorizontalTextAlignment="Center"/>
    </StackLayout>
</Frame>

after execute dialogServic.show dialog in SomeModalContentPageViewModel we don't see dialog view.. actually the dialog view add in SomeContentPage but don't add in SomeModalContentPage

iOS Navigation bar with back button & maintain stack.

Hello Team,
I am using the Prism library in one of the Xamarin form project.
I follow steps given in video https://prismlibrary.com/docs/xamarin-forms/navigation/navigation-basics.html & it's working fine for Android but it's not giving me same behavior for iOS.
For Example
MainPage > Screen A > Screen B > Screen C
Behavior in Android
Here in Android, each screen has a default back button at Navigation bar & If I press the back button from Screen C, It goes to Screen B & if I press the Back button from Screen B then it's going to Screen A.

Behavior in iOS
Each screen has a default back button at Navigation bar & if I press the back button from Screen C, It navigates me to MainPage instead of Screen B.

I need the below kind of Behavior in my app for iOS.
Navigation Stack : MainPage > Screen A > Screen B > Screen C

MainPage & Screen A Should not have a navigation bar with a back button.
When I navigate to Screen B from Screen A, Screen B should have a Navigation bar with back button & title.
When I navigate to Screen C from Screen B, Screen C Should have also a back button with a title.
Back button action should be the previous screen.

One More Scenario & behavior in iOS.
App.xmal.cs

MainPage opening by below Code.

    MainPage = new NavigationPage(new MainPage())
            {
           
            };

Screen A opening from MainPage from below code.

await navigationServ.NavigateAsync("ScreenA", null, false, true);

Screen B opening from Screen A from below Code.

await navigationService.NavigateAsync(new Uri("NavigationPage/ScreenB", UriKind.RelativeOrAbsolute));
Screen B

Screen C opening from Screen B from below code.

await navigationService.NavigateAsync(new Uri("/ScreenC", UriKind.Relative));
Screen C

Not sure why it's giving 2 navigation bars at Screen C in place of a single one.

Can someone help me?

Thanks in Advance.

Conflicting .dlls with Unity.Abstractions

  1. As best I can tell I need Prism.Unity in order to use the PrismApplication class.
  2. Prism.Unity 7.1.0.431 needs Unity.Abstractions 3.3.1. It will not accept Unity.Abstractions 4.1.0.0, the current version, which other dlls in my solution require.
  3. What should I do>

[uno] Can I use multiple DialogWindow in Uno platform prism?

Hi

Multiple DialogWindow cannot be displayed in Uno Platform. I know that's because it uses the ContentDialog control.
Is there any way to display multiple DialogWindow like other platforms? If you can't do that, I would like to have a way to know if the DialogWindow is currently outputting.
So, if I know in advance whether to display or not, I think I can program to use a different method.

Navigating between tabs destroys and instantiates a new instance of ViewModel

Hi guys. I have an app with tabbed pages. When the user switches over to PageA tab I load a large amount of data in PageAViewModel. When I navigate to MainPage/PageB PageAViewModel get reinstantiated and I lose that data I loaded. I thought that PageAViewModel would remain just as if a user is switching tabs using the tab control. I'm using:

await NavigationService.NavigateAsync("MainPage?selectedTab=PageB", navParams);

Is this expected behavior?

Prism 7 WPF

When I visit the official docs website at http://prismlibrary.github.io/docs/ I only see Prism 6 listed as legacy under WPF.

I'm new to Prism so I'm relying on the documentation. Is there a reason why Prism 7 is missing under WPF?

Update Xamarin Forms Passing-parameters documents

The documents still talk about INavigatingAware in the Getting parameters section.

But as of Prism 7.2, INavigatingAware is obsolete and has been replaced with IInitialize. Can I update the docs to incorporate the usage defined here?

And, maybe this is a separate issue, but would it be possible to show the latest version of Prism a document refers to, like the framework version which shows on Microsoft docs for example? #

improve docs for modularity (2 issues)

The current docs on the website (respectively here on github) seem to be a bit out of date.
I am new to PRISM and have noticed a lot of small pieces that might be worth changing to help getting into PRISM.

First: DirectoryModuleCatalog

The listed DirectoryModuleCatalog doesn't exist (anymore?).
I've found a blog post from Brian Lagunas explaining it, but I think it's out dated.
Is there any new way to achieve the same?
We are currently using MEF to do it but if there is a PRISM way that would be nice.

Second: CreateModuleCatalog(IModuleCatalog moduleCatalog)

The method CreateModuleCatalog(IModuleCatalog moduleCatalog) is sometimes used instead of the (newer?)
ConfigureModuleCatalog(IModuleCatalog moduleCatalog). I can't find any method named "CreateModuleCatalog".

If preferred, I can make a PR to change that or give you exact locations (line numbers) where these are.
Any other way to improve documentation?

MAUI Documentation appears to be Out-of-Date

I noticed that shortly before it was archived and merged into the Prism project, the Prism.MAUI project had the ReadMe (https://github.com/PrismLibrary/Prism.Maui) updated to change the instructions from using UsePrismApp<App>() to UsePrism() in MauiProgram.cs.

However, the docs in this repo still seem to reflect the older method of using UsePrismApp<App>.
Are the docs out-of-date, or is this just because Prism.MAUI is still in pre-release? Am I looking in the wrong place?

Additional topics?

Hi @brianlagunas , things have been kind of crazy for me at work the last few months, but I might have some more time to help out with the docs, especially over the next couple of weeks. I think all of the wpf stuff has been brought up to date, but if there is something missing, or needs more work, I will try and get it done.

Named services documentation deviates from actual behavior

According to the documentation (Xamarin.Forms / Dependency Injection / Registering Types) it should be possible to register a named service as

containerRegistry.Register<IService, Service>("fooService");

and consume it in a viewmodel by adding a parameter that's named similar to the registered service.

public MainPageViewModel(IService fooService)
{
    // ...
}

However, when I'm trying to navigate to MainPage it fails with an exception that there is no public constructor for IService (which seems to me as if it tries to resolve an unnamed service and ignores the named services). It works when I'm registering the service with

containerRegistry.Register<IService, Service>();

The behavior is the same when registering instances/singletons instead of transients. Furthermore the behavior seems to be invariant against the IoC container in use.

I don't know if this is an issue with the documentation or with the library itself, (actually the behavior is a non-issue for me, since with Unity I can still use Unity.DependencyAttribute), but it occurred to me that there seems to be a mismatch between the documentation and the actual behavior.

API Docs

I was watching your Documentation Twitch streams @brianlagunas:

Thanks for showing DocFX.

I’ve been using MkDocs so great to see an alternative, and the switch should be quick as most of it is the same, md, yml.

Since there were problems with just the API portion you might want to try out Sandcastle.
It looks more like the old school api browsers but it can create a help file (chm) and a website.

—-

For API Docs for web I usually use Swashbuckle.

Namespacing/Using statements in examples?

I'm brand new to Prism and coming in with just enough hands-on experience with WPF to be dangerous, so that may be the root of the issue.

But, the docs are confusing for me to follow on their own - in the WPF Initializing chapter alone it's entirely ambiguous to me which classes are being used in examples for return types and the like. I think that it should be clarified via namespacing, or the inclusion of using statements, exactly which classes are being used.

i.e. instead of this example on the WPF Initializing chapter:

protected override DependencyObject CreateShell()
{
    return ServiceLocator.Current.GetInstance<Shell>();
}

I think it should read either:

using System.Windows;
using CommonServiceLocator;
using YourApp.Views;

protected override DependencyObject CreateShell()
{
    return ServiceLocator.Current.GetInstance<Shell>();
}

or:

protected override System.Windows.DependencyObject CreateShell()
{
    return CommonServiceLocator.ServiceLocator.Current.GetInstance<YourApp.Views.Shell>();
}

Prism with MAUI

Hi,

I would like to have both modal and non-modal page navigation.

But modal navigation not working as expected I navigated to a new page with the below example.

image

Prism Template Pack stopped working after installing a few other vsix

I had installed PrismTemplatePack.vsix few month ago and it worked fine.
Over the past 2-3 weeks I also installed:
ProjectReunion.Extension.vsix
OpenSilver-1.0.0-alpha-007.vsix
SQLite_and_SQL_Server_Compact_Toolbox_v4.7.691.vsix
Now, when I create a new solution of type "Blank App (WPF) (Brian Lagunas)" - it adds all solution/project files, but doesn't write project entry in .sln file. Solution Explorer shows 0 projects.
Reinstalling PrismTemplatePack.vsix didn't help.
VS2019 16.9.4

Xamarin Partial Views

I'd like to add a document explaining partial views with a code example of the parent and the partial view. Also some notes on when INavigatedAware methods are called for partial views and that using the IEventAggregator is a good solution to updating the view if changes happen in the parent.

Is there anything I should or shouldn't include?

Xamarin.Forms Working with NavigationPages is empty

The page that documents how to work with NavigationPages is empty, only headers are inside.
https://prismlibrary.com/docs/xamarin-forms/navigation/working-with-navigationpages.html

Maybe this was moved but where are information about this topic?
_navigationService.NavigateAsync("NavigationPage/MainPage");

There are information about this on https://prismlibrary.com/docs/xamarin-forms/navigation/working-with-masterdetailpages.html But this page focuses on MasterDetailPages not NavigationPages - or is that all available/needed?

If so could you remove the first page and just refer to the other page? Looks like a big gap currently.

Getting Started Topic

@brianlagunas , I think I am going to have a bit of time over the next couple of weeks. If you aren't already working this topic, I will take a run at it. I remember seeing an issue somewhere where someone wanted guidance on converting from 6.x to 7, I can add that as a topic as well.

wpf view composition edits

Hi @brianlagunas , I am starting to do some work on the view-composition topic and using the legacy part as a base. In reading it, it contains a ton of information about things like MVVM, commands, user interactions, data binding, unit and ui testing.

I feel like it would be good to remove this stuff, or, have a list of topics that the user should be familiar with before attempting to use view composition. What is your preference?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.