Questions tagged [prism]
Prism is a framework for building loosely coupled, maintainable, and testable XAML applications in WPF, Windows 10 UWP, and Xamarin Forms.
4,440
questions
-1
votes
0
answers
44
views
C# WPF & XAML, proper way to copy object without the bindings [closed]
In a WPF + Xaml MVVM application, the UI elements are bound to data models.
This application uses set of parameters for performing operation, there are a bunch of models bound to the UI using the MVVM ...
0
votes
0
answers
44
views
Navigation from tabbedPage, clear stack in .Net maui
Problem is related to navigation from TabbedPage.
When we crate tabbed page and navigate deeply from one tab into e.g. details, Prism will open Page as new(no into content of tabbed page) and will ...
-1
votes
0
answers
28
views
Prism Confirmation, only having a "Cancel" button
I'm working with a Prism.Interactivity.InteractionRequest.Confirmation in the usual way:
this._...Request.Raise(confirmation, (Confirmation c) =>
{
confirmation.Content = null; // Prevent ...
0
votes
0
answers
19
views
WPF error "Window must be the root of the tree. Cannot add Window as a child of Visual" in Prism dialog service UI using MetroWindow
I'm encountering an issue in my WPF application where it crashes with the error "Window must be the root of the tree. Cannot add Window as a child of Visual" when using MetroWindow in Prism ...
1
vote
2
answers
68
views
Custom ViewModel registration with Prism and MAUI - ViewModelLocationProvider the right way to do it?
We're migrating a Forms application, which uses Prism, to MAUI, and had a custom ViewModelLocator for one of our pages, implemented by overriding ConfigureViewModelLocator in App.xaml.cs.
With a Prism ...
1
vote
0
answers
24
views
When I close a view with a control hosting a region, is the association with the region lost?
I am creating a module for an application of a foreign application. I'm building a window that will be my main module window. I create a menu and content region. I create a region for Content in the ...
0
votes
0
answers
48
views
How to syntax highlight in textarea in react
I need to apply syntax highlighting to a code written in a custom language in textarea in react.
So that as user type it highlights the code within the textarea and not to create a separate div or ...
1
vote
1
answer
84
views
How to load assemblies using new AssemblyLoadContext in .NET 7?
I am looking for community guidance to help me translate the below mentioned code to a new .NET 7 compatible version. Especially the bits and pieces inside LoadModuleCatalog method.
As per my research ...
0
votes
1
answer
44
views
Prism bind TabViews to respective ViewModels
I am migrating a legacy Xamarin.Forms app to a MAUI project. In the Xamarin Project we were using Prism 7.1 which we are now migrating to the latest version.
The issue we are having is we used to be ...
0
votes
1
answer
47
views
When Using Fody Property Changed and properties changed, Why it does not work?
I have a MVVM Prism Project with DBFirst and Entity Calsses. In View, I used My propertis of model (Class Entities) directly, and because I need to notify every other plcae in project that those ...
0
votes
0
answers
34
views
Is the BehaviorBase<T> still available to be used on Prism for .Net MAUI?
I'm migrating an app, which uses uses Prism, from Xamarin.Forms to MAUI. One of the classes in the project inherits from the BehaviorBase<Xamarin.Forms.View> class to override the OnAttachedTo ...
0
votes
1
answer
28
views
How to Re-Evaluate CanExecute in a DelegateCommand
I Have a table in SQL Server with some rows. I have a Prism MVVM project in WPF and Some textbox in which Text of each is bind to a property of my table.
When I Write some thing in textboxes, ...
2
votes
1
answer
130
views
How to write typical C# one-liners as separate pieces of code?
I'm taking over a Prism-based C# application that contains quite some lambda-ish one-liners, like the following:
using Prism.Interactivity.InteractionRequest;
...
public InteractionRequest<...
0
votes
0
answers
120
views
⨯ PrismaClientInitializationError: Invalid `prisma.user.findMany()` invocation:
Error:
Invalid `prisma.user.findMany()` invocation:
Error in connector: Error creating a database connection. (Kind: An error occurred during DNS resolution: proto error: io error: A socket ...
0
votes
0
answers
22
views
Prism: The Button become disable After implement DataErrorValidationRule to TextBox
maybe i missed something, but i implemented IDataErrorInfo to TextBox to return error message when user enter null or empty and usedSubmitCommand.RaiseCanExecuteChanged(); in the setter of TextBox ...
0
votes
0
answers
14
views
RequestNavigation is not work in my wpf programs with prism libarary
enter image description hereenter image description hereenter image description hereI using IDialogService Open a View ,in a view I denifine a region ,when I try to use
_regionManager.RequestNavigate(...
0
votes
1
answer
49
views
GoBackToAsync('pagname") not working as expected
stack
page1.xaml
page2.xaml
page3.xaml
If you use the GoBackToAsync("page1") from page3... the OnNavigatedTo is being fired on page2. This is causing issues if there is a check for ...
0
votes
0
answers
12
views
Caliburn.Micro-Multiple shell support
I have to develop a WPF application with two windows, main window in primary monitor are other other one in secondary monitor. Uses shall be able to work on each windows independently, but while ...
1
vote
0
answers
97
views
Async - await freezes UI in when using in OnNavigatedTo Prism method
I'm working on a WPF application using Prism to handle things such as navigation.
I have this view that should show a list of items. I want to get the items from the db (SQL server and EF) when I ...
0
votes
1
answer
418
views
Typescript: this expression is not constructable when trying to import a class
I'm specifically trying to follow Twilios Mock API guide here:
https://www.twilio.com/docs/openapi/mock-api-generation-with-twilio-openapi-spec
I've followed their guide, except for changing the JS ...
0
votes
0
answers
98
views
Prism GA Support for MAUI .NET 6.0 on iOS and Android
I see that the documentation has a section about Prism for MAUI including a demo video of an upgraded project. The video talks about Prism.Templates and when I download the Prism.Templates I see that ...
0
votes
0
answers
48
views
PRISM (Xamarin Forms) IPageDialogService DisplayAlertAsync is not Modal?
I have a Prism/Forms application running on Android 11 and I am using the IPageDialogService.DisplayAlertAsync method to popup a question to the user.
Problem is, if the user clicks on the page ...
0
votes
2
answers
142
views
Prism Unity Register NLog as Microsoft.Extension.Logging.ILogger<T>
I have a shared Code between my backend and my frontend(WPF), where be backend currently uses NReco.Logging.File which is compatible with Microsoft.Extensions.Logging.ILogger.
But in the fronend, I ...
0
votes
0
answers
31
views
I can disable the default buttons to minimize and close the entire wpf application window?
I can't disable the default window close and minimize buttons of a user control using IDialogService
IDialogService won't let me disable the default window buttons. I am using wpf with prism. Is there ...
0
votes
0
answers
40
views
Slow instantiation of a COM server in WPF App constructor
I have a WPF application targeting net7.0-windows.
It is also a Prism app with Unity container.
I need to register a COM out-of-process server (e.g. Microsoft.Office.Interop.Excel.Application).
Doing ...
0
votes
0
answers
43
views
How to make Telerik RadWindow implementing Prism IDialogWindow modal in WPF?
I have implemented Prism IDialogWindow on a Telerik RadWindow (WPF). The property Owner (type Window) of IDialogWindow hides Owner of RadWindow (which is of type ContentControl).
The only way I found ...
0
votes
1
answer
49
views
Prism Xamarin Forms - Slow loading of pages
I am having issues when calling NavigationService.Navigate, it navigates instantly, but content is not rendered yet as there is too many elements. You can interact with them, but you cant see them, ...
1
vote
0
answers
43
views
When setting WindowStartuPlocation to Manual, it is not set or top and top.(in wpf prism library)
Set the popup dialog style as shown below.
<prism:Dialog.WindowStyle>
<Style TargetType="{x:Type Window}">
<Setter Property="WindowStyle" Value="...
0
votes
0
answers
39
views
MVVM best practice for reading back data from hardware? My View state is always one step behind my Model/hardware state
I am pretty new to C# MVVM, so bear with me.
I have a piece of hardware that is storing data that has a minimum 16 ms latency between writing data and reading it back, and for safety and intuitive UI ...
0
votes
0
answers
33
views
Reverse proxy using nginx- use docker run to route multiple user ports to a single container port (need a nginx.conf file configuration )
This is my first question on stack overflow..
So, basically I have a repo where in I have multiple API'S JSON files let's say Offers and Continuity.
I created Offers.Dockerfile and Continuity....
0
votes
0
answers
19
views
Cannot navigate using Prism IRegionManager in the DrawerHost drawer
I'm using Prism and Material Design frameworks, have xaml like this:
<md:DrawerHost IsRightDrawerOpen="{Binding IsDrawerOpen}">
<StackPanel>
<Button
...
1
vote
2
answers
73
views
Can't bind to DelegateCommand of ViewModel from within DataGrid
I am trying to put a ContextMenu into cells of one column of a DataGrid.
Clicking on a menu item of the ContextMenu should execute a command.
I can show the ContextMenu but the command is not ...
0
votes
0
answers
71
views
Docker and Prisma permission issues
I have dockerized my NestJS and Prisma project but when I was done and pushed the changes to Github and tried to checkout to develop from my feature branch, I got this error.
Error
warning: unable to ...
0
votes
1
answer
21
views
What should I do to make a preview window with Prism UnityContainer?
I'm quite new to Prism containers and want to create an app in WPF with a preview window. What should I do to make it in the right way? I made this CreateShell method in my Application class (that ...
2
votes
1
answer
65
views
Converting Prism application container from Autofac to DryIoc, ReactiveUI Viewmodels are not automatically registered as they were
We're updating an old .Net Framework application to .Net 7 and with it, many of it's dependencies. The application is built on Prism (currently version 6.3.0) and it's corresponding Autofac ...
1
vote
0
answers
53
views
Stoplight prism returning null when referencing a .json file in .yaml using $ref
I have a .yaml file, api_spec.yaml, and it's up and running. Inside, there's one endpoint (paths:) where I'm trying to refer to the entire request_payload.json file, stored in the same directory as ...
1
vote
0
answers
62
views
Prism 8 Handling Resolution Errors
Basically what I do is I want to handling resolution errors based on here https://prismlibrary.com/docs/dependency-injection/resolution-errors.html but I am not sure how to do it because we actually ...
0
votes
1
answer
62
views
Code Generator to generate a static class holding constants of sub-classes names on-the-fly when a new sub-class is added to a .net project
I am developing a Revit addin utilizing the Prism library as my MVVM/IOC framework.
The addin relies heavily on Prism's DialogService to display various dialogs for several tools.
I want to avoid hard-...
0
votes
1
answer
49
views
SetProperty not working correctly on the "Text" property of an editable ComboBox
Summary:
I have an editable ComboBox where the user can select a "Connection" object from the list, or they can type in the URL for a new Connection object. If I use the "Prism way&...
0
votes
0
answers
30
views
ObservableCollection not notifying on Add or Delete with Prism
I am using Prism BindableBase to notify property change events and it works mostly well, except for ObservableCollections. Changes such as Add or Delete are not notified. What could be the issue:
...
0
votes
0
answers
44
views
.NET Application Not Starting When Using Both Prism and Costura.Fody
I'm having an issue with my .NET application. When I use both Prism (version 8.1.97) and Costura.Fody (version 5.7.0) in my project, the application fails to start. However, if I only use one or the ...
0
votes
1
answer
32
views
Create nested mutation graphql field not provided
I am trying to create a user with a profile simultaneously in my mutation like this :
mutation {
addUser(
input: {
firstName: "Jane"
lastName: "Doe"
...
0
votes
2
answers
97
views
useEffect is running twice [duplicate]
here is the code:
import { type AppType } from 'next/app'
import { api } from '~/utils/api'
import '~/styles/globals.css'
import Nav from '~/components/Nav'
import { useEffect, useState } from 'react'
...
2
votes
2
answers
2k
views
Maui android. Either set MainPage or override CreateWindows
In maui android app, when app was moved to back it occassionally invokes Destroy and bringing app back to front, throws an exeption:
Either set MainPage or override CreateWindows.
protected ...
-2
votes
1
answer
63
views
How can I can method from another viewmodel
I have HomeViewModel and MainViewModel. I want to call method TestEvent of MainViewModel in HomeViewModel but I don't know how to do it? Anyone can help me. I tried to use Prism but I alway get error ...
0
votes
1
answer
43
views
WPF Nested User Controls Dependency Binding Properties
I have an WPF application using Prism using ViewModels and I'm having problems with a Nested UserControl with its own CodeBehind and DependencyBinding properties.
With this code the binding in ...
0
votes
1
answer
38
views
WPF Prism how to access Parent Model From DataTemplate
For some DataTemplates in a view, I am trying to create some DataTriggers that change the property on a DataTemplate control.. based on a property in the parent class
The following pseudo code is ...
0
votes
1
answer
121
views
Multiple instances of same view in 2 regions on one view MVVM / Prism / WPF
i have sort of the same question but i don't understand the answers on this page.
Am I doing it correctly do deal with multiple instances of same view in MVVM / Prism / WPF
what i'm trying to do is ...
0
votes
1
answer
314
views
Navigation Stack empty when navigating from TabbedPage (Back button missing)
I am having an issue where I have no NavigationBar on my page and this only happened after I implemented Tabbed pages in .NET MAUI with the Prism MVVM framework. Any help is much appreciated.
All the ...
0
votes
0
answers
99
views
WPF Inventor Add-In Project Could not Load 'Microsoft.Xaml.Behaviors'
I created a WPF project with
TargetFramework - .NET 6.0
NugetPackage - Microsoft.Xaml.Behaviors
Used Interaction in the View to for Trigger Action
<ComboBox x:Name="Desc" ...