Can we have one .exe calling a .dll with XAML and Prism (for MVVM)?Composite WPF (Prism) module resource data templatesHow to use DataTemplates in PrismCreating WPF ResourceDictionary from code doesn't seem to work when setting ResourceDictionary.SourceMVVM separate assemblies Visual Studio: What should I choose as the project types?Resolve ViewModels in separated assembly with ViewModelLocator in Prism 6Compatibility issue with Expression.Blend.Sdk 1.0.2 System.Windows.Interactivity.dllPrismDryIoc.Forms AutowireViewModel not workingConfigureViewModelLocator to bind views in different assemblysBind ViewModel to XAML View in Prism.FormsPrism region not changing in content region - WPF
Divide Numbers by 0
Displaying Time in HH:MM Format
Colored grid with coordinates on all sides?
How could reincarnation magic be limited to prevent overuse?
From not IT background to being a programmer
Should we run PBKDF2 for every plaintext to be protected or should we run PBKDF2 only once?
Is there anything in the universe that cannot be compressed?
Killing task by name - start menu shortcut
Why do modes sound so different, although they are basically the same as a mode of another scale?
How can I improve my formal definitions?
Polarity of gas discharge tubes?
Squares inside a square
Single vs Multiple Try Catch
Could a simple hospital oxygen mask protect from aerosol poison?
How do you manage to study and have a balance in your life at the same time?
Can users with the same $HOME have separate bash histories?
Ideas behind the 8.Bd3 line in the 4.Ng5 Two Knights Defense
Correct way of simplifying the result of an integral
D Scale Question
What happens if you just start drawing from the Deck of Many Things without declaring any number of cards?
What are the electrical characteristics of a PC gameport?
When you have to wait for a short time
Why is Mitch McConnell blocking nominees to the Federal Election Commission?
Given a specific computer system, is it possible to estimate the actual precise run time of a piece of Assembly code
Can we have one .exe calling a .dll with XAML and Prism (for MVVM)?
Composite WPF (Prism) module resource data templatesHow to use DataTemplates in PrismCreating WPF ResourceDictionary from code doesn't seem to work when setting ResourceDictionary.SourceMVVM separate assemblies Visual Studio: What should I choose as the project types?Resolve ViewModels in separated assembly with ViewModelLocator in Prism 6Compatibility issue with Expression.Blend.Sdk 1.0.2 System.Windows.Interactivity.dllPrismDryIoc.Forms AutowireViewModel not workingConfigureViewModelLocator to bind views in different assemblysBind ViewModel to XAML View in Prism.FormsPrism region not changing in content region - WPF
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
My question is this: How can I call a library project (DLL) that contains all my XAML (Views) and ViewModel classes from another project that is meant to only run as an "EXE"? (I want to use Prism 7 for MVVM purposes).
My intent is to have one project whose only purpose is to create an .EXE. This EXE will load the assembly where the actual WPF views and the viewmodels reside.
Ideally, I'd like to have App.xaml in the EXE project... But I want to have my Bootstrapper in the Assembly project... Is this possible with Prism 7?
I want to have an App.xaml in "Company.Product.Application" project (which produces an EXE):
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Company.Product.Application"
xmlns:Presentation="clr-namespace:Company.Product.Presentation;assembly=Product.Presentation"
DispatcherUnhandledException="Application_DispatcherUnhandledException"
xmlns:prism="http://prismlibrary.com/">
<Application.Resources>
<ResourceDictionary>
<Presentation:AppBootstrapper x:Key="Bootstrapper" />
</ResourceDictionary>
</Application.Resources>
Then from my Bootstrapper, I want to load my IoC and create my views and viewmodels.
I have been able to accomplish this with Caliburn.Micro... The idea here is that "Company.Product.Presentation" DLL can be tested out without having to create an EXE in itself. I could add the reference to "Presentation" in my test project (NUnit) and test it independently. The EXE is just a project that calls on "Company.Product.Presentation" DLL to actually generate Graphical User Interface goodness.
I appreciate any insight you may have in regards to this question. Thanks!
prism
add a comment |
My question is this: How can I call a library project (DLL) that contains all my XAML (Views) and ViewModel classes from another project that is meant to only run as an "EXE"? (I want to use Prism 7 for MVVM purposes).
My intent is to have one project whose only purpose is to create an .EXE. This EXE will load the assembly where the actual WPF views and the viewmodels reside.
Ideally, I'd like to have App.xaml in the EXE project... But I want to have my Bootstrapper in the Assembly project... Is this possible with Prism 7?
I want to have an App.xaml in "Company.Product.Application" project (which produces an EXE):
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Company.Product.Application"
xmlns:Presentation="clr-namespace:Company.Product.Presentation;assembly=Product.Presentation"
DispatcherUnhandledException="Application_DispatcherUnhandledException"
xmlns:prism="http://prismlibrary.com/">
<Application.Resources>
<ResourceDictionary>
<Presentation:AppBootstrapper x:Key="Bootstrapper" />
</ResourceDictionary>
</Application.Resources>
Then from my Bootstrapper, I want to load my IoC and create my views and viewmodels.
I have been able to accomplish this with Caliburn.Micro... The idea here is that "Company.Product.Presentation" DLL can be tested out without having to create an EXE in itself. I could add the reference to "Presentation" in my test project (NUnit) and test it independently. The EXE is just a project that calls on "Company.Product.Presentation" DLL to actually generate Graphical User Interface goodness.
I appreciate any insight you may have in regards to this question. Thanks!
prism
add a comment |
My question is this: How can I call a library project (DLL) that contains all my XAML (Views) and ViewModel classes from another project that is meant to only run as an "EXE"? (I want to use Prism 7 for MVVM purposes).
My intent is to have one project whose only purpose is to create an .EXE. This EXE will load the assembly where the actual WPF views and the viewmodels reside.
Ideally, I'd like to have App.xaml in the EXE project... But I want to have my Bootstrapper in the Assembly project... Is this possible with Prism 7?
I want to have an App.xaml in "Company.Product.Application" project (which produces an EXE):
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Company.Product.Application"
xmlns:Presentation="clr-namespace:Company.Product.Presentation;assembly=Product.Presentation"
DispatcherUnhandledException="Application_DispatcherUnhandledException"
xmlns:prism="http://prismlibrary.com/">
<Application.Resources>
<ResourceDictionary>
<Presentation:AppBootstrapper x:Key="Bootstrapper" />
</ResourceDictionary>
</Application.Resources>
Then from my Bootstrapper, I want to load my IoC and create my views and viewmodels.
I have been able to accomplish this with Caliburn.Micro... The idea here is that "Company.Product.Presentation" DLL can be tested out without having to create an EXE in itself. I could add the reference to "Presentation" in my test project (NUnit) and test it independently. The EXE is just a project that calls on "Company.Product.Presentation" DLL to actually generate Graphical User Interface goodness.
I appreciate any insight you may have in regards to this question. Thanks!
prism
My question is this: How can I call a library project (DLL) that contains all my XAML (Views) and ViewModel classes from another project that is meant to only run as an "EXE"? (I want to use Prism 7 for MVVM purposes).
My intent is to have one project whose only purpose is to create an .EXE. This EXE will load the assembly where the actual WPF views and the viewmodels reside.
Ideally, I'd like to have App.xaml in the EXE project... But I want to have my Bootstrapper in the Assembly project... Is this possible with Prism 7?
I want to have an App.xaml in "Company.Product.Application" project (which produces an EXE):
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Company.Product.Application"
xmlns:Presentation="clr-namespace:Company.Product.Presentation;assembly=Product.Presentation"
DispatcherUnhandledException="Application_DispatcherUnhandledException"
xmlns:prism="http://prismlibrary.com/">
<Application.Resources>
<ResourceDictionary>
<Presentation:AppBootstrapper x:Key="Bootstrapper" />
</ResourceDictionary>
</Application.Resources>
Then from my Bootstrapper, I want to load my IoC and create my views and viewmodels.
I have been able to accomplish this with Caliburn.Micro... The idea here is that "Company.Product.Presentation" DLL can be tested out without having to create an EXE in itself. I could add the reference to "Presentation" in my test project (NUnit) and test it independently. The EXE is just a project that calls on "Company.Product.Presentation" DLL to actually generate Graphical User Interface goodness.
I appreciate any insight you may have in regards to this question. Thanks!
prism
prism
asked Mar 28 at 0:29
lvar82lvar82
1
1
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
But I want to have my Bootstrapper in the Assembly project... Is this possible with Prism 7?
Sure, just reference the dll with the bootstrapper from the exe and put something like this in App.xaml.cs
:
protected override void Onstartup(StartupEventArgs e)
base.OnStartup(e);
var bootstrapper = new Company.Product.Presentation.Bootstrapper();
bootstrapper.Run();
Thank you very much Haukinger. That was indeed very helpful!
– lvar82
Mar 29 at 1:08
One quick question... Is there a way to completely remove the code behind (MyView.xaml.cs) such that I only end up with the MyView.xaml file? In Caliburn.Micro, I can completely remove the code behind. What I observe in Prism is that if I do not leave the constructor (with its InitializeComponent method) alone, then things don't bind. It is a minor thing, but ideally, I would want my team to not even see code behind in the view files. Thanks again!
– lvar82
Mar 29 at 1:10
You do not need to use aUserControl
for your view, you can use a custom control, too. But I personally just remove everything from code-behind but the constructor callingInitializeComponent
and forget about it...
– Haukinger
Mar 29 at 9:01
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55388458%2fcan-we-have-one-exe-calling-a-dll-with-xaml-and-prism-for-mvvm%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
But I want to have my Bootstrapper in the Assembly project... Is this possible with Prism 7?
Sure, just reference the dll with the bootstrapper from the exe and put something like this in App.xaml.cs
:
protected override void Onstartup(StartupEventArgs e)
base.OnStartup(e);
var bootstrapper = new Company.Product.Presentation.Bootstrapper();
bootstrapper.Run();
Thank you very much Haukinger. That was indeed very helpful!
– lvar82
Mar 29 at 1:08
One quick question... Is there a way to completely remove the code behind (MyView.xaml.cs) such that I only end up with the MyView.xaml file? In Caliburn.Micro, I can completely remove the code behind. What I observe in Prism is that if I do not leave the constructor (with its InitializeComponent method) alone, then things don't bind. It is a minor thing, but ideally, I would want my team to not even see code behind in the view files. Thanks again!
– lvar82
Mar 29 at 1:10
You do not need to use aUserControl
for your view, you can use a custom control, too. But I personally just remove everything from code-behind but the constructor callingInitializeComponent
and forget about it...
– Haukinger
Mar 29 at 9:01
add a comment |
But I want to have my Bootstrapper in the Assembly project... Is this possible with Prism 7?
Sure, just reference the dll with the bootstrapper from the exe and put something like this in App.xaml.cs
:
protected override void Onstartup(StartupEventArgs e)
base.OnStartup(e);
var bootstrapper = new Company.Product.Presentation.Bootstrapper();
bootstrapper.Run();
Thank you very much Haukinger. That was indeed very helpful!
– lvar82
Mar 29 at 1:08
One quick question... Is there a way to completely remove the code behind (MyView.xaml.cs) such that I only end up with the MyView.xaml file? In Caliburn.Micro, I can completely remove the code behind. What I observe in Prism is that if I do not leave the constructor (with its InitializeComponent method) alone, then things don't bind. It is a minor thing, but ideally, I would want my team to not even see code behind in the view files. Thanks again!
– lvar82
Mar 29 at 1:10
You do not need to use aUserControl
for your view, you can use a custom control, too. But I personally just remove everything from code-behind but the constructor callingInitializeComponent
and forget about it...
– Haukinger
Mar 29 at 9:01
add a comment |
But I want to have my Bootstrapper in the Assembly project... Is this possible with Prism 7?
Sure, just reference the dll with the bootstrapper from the exe and put something like this in App.xaml.cs
:
protected override void Onstartup(StartupEventArgs e)
base.OnStartup(e);
var bootstrapper = new Company.Product.Presentation.Bootstrapper();
bootstrapper.Run();
But I want to have my Bootstrapper in the Assembly project... Is this possible with Prism 7?
Sure, just reference the dll with the bootstrapper from the exe and put something like this in App.xaml.cs
:
protected override void Onstartup(StartupEventArgs e)
base.OnStartup(e);
var bootstrapper = new Company.Product.Presentation.Bootstrapper();
bootstrapper.Run();
answered Mar 28 at 14:39
HaukingerHaukinger
6,5612 gold badges8 silver badges24 bronze badges
6,5612 gold badges8 silver badges24 bronze badges
Thank you very much Haukinger. That was indeed very helpful!
– lvar82
Mar 29 at 1:08
One quick question... Is there a way to completely remove the code behind (MyView.xaml.cs) such that I only end up with the MyView.xaml file? In Caliburn.Micro, I can completely remove the code behind. What I observe in Prism is that if I do not leave the constructor (with its InitializeComponent method) alone, then things don't bind. It is a minor thing, but ideally, I would want my team to not even see code behind in the view files. Thanks again!
– lvar82
Mar 29 at 1:10
You do not need to use aUserControl
for your view, you can use a custom control, too. But I personally just remove everything from code-behind but the constructor callingInitializeComponent
and forget about it...
– Haukinger
Mar 29 at 9:01
add a comment |
Thank you very much Haukinger. That was indeed very helpful!
– lvar82
Mar 29 at 1:08
One quick question... Is there a way to completely remove the code behind (MyView.xaml.cs) such that I only end up with the MyView.xaml file? In Caliburn.Micro, I can completely remove the code behind. What I observe in Prism is that if I do not leave the constructor (with its InitializeComponent method) alone, then things don't bind. It is a minor thing, but ideally, I would want my team to not even see code behind in the view files. Thanks again!
– lvar82
Mar 29 at 1:10
You do not need to use aUserControl
for your view, you can use a custom control, too. But I personally just remove everything from code-behind but the constructor callingInitializeComponent
and forget about it...
– Haukinger
Mar 29 at 9:01
Thank you very much Haukinger. That was indeed very helpful!
– lvar82
Mar 29 at 1:08
Thank you very much Haukinger. That was indeed very helpful!
– lvar82
Mar 29 at 1:08
One quick question... Is there a way to completely remove the code behind (MyView.xaml.cs) such that I only end up with the MyView.xaml file? In Caliburn.Micro, I can completely remove the code behind. What I observe in Prism is that if I do not leave the constructor (with its InitializeComponent method) alone, then things don't bind. It is a minor thing, but ideally, I would want my team to not even see code behind in the view files. Thanks again!
– lvar82
Mar 29 at 1:10
One quick question... Is there a way to completely remove the code behind (MyView.xaml.cs) such that I only end up with the MyView.xaml file? In Caliburn.Micro, I can completely remove the code behind. What I observe in Prism is that if I do not leave the constructor (with its InitializeComponent method) alone, then things don't bind. It is a minor thing, but ideally, I would want my team to not even see code behind in the view files. Thanks again!
– lvar82
Mar 29 at 1:10
You do not need to use a
UserControl
for your view, you can use a custom control, too. But I personally just remove everything from code-behind but the constructor calling InitializeComponent
and forget about it...– Haukinger
Mar 29 at 9:01
You do not need to use a
UserControl
for your view, you can use a custom control, too. But I personally just remove everything from code-behind but the constructor calling InitializeComponent
and forget about it...– Haukinger
Mar 29 at 9:01
add a comment |
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55388458%2fcan-we-have-one-exe-calling-a-dll-with-xaml-and-prism-for-mvvm%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown