'How to use a usercontrol from another project in the same solution
I have 2 projets in a visual studio solution:
- Text Adventure Game
- Text Adventure Maker
The project "Text adventure Maker" have a userControl. I want to use this userControl directly in the "Text Adventure Game" project.
To do that, I added the reference of the "Text Adventure Maker" project to the "Text Adventure Game" project using visual studio :
[photo][1]
Then I tried to call that reference by using this line on my mainWindow WPF :
<Window x:Class="Text_Adventure_Game.GameWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local2="clr-namespace:Text_adventure_maker;assembly=Text adventure maker" <!-- THIS LINE -->
xmlns:local="clr-namespace:Text_Adventure_Game.Utilities.CustomUIElement"
Sadly, this give me an error :
"The uri "Textadventuremaker" cannot be found. Make sure that no assembly reference is missing".
So, what should I do to not have this error anymore so I can use my other usercontrol in the other project to this one? thanks [1]: https://i.stack.imgur.com/eWUoe.png
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
