Hi,@Bircan, Burakhan. Welcome to Microsoft Q&A . If you want to build each XAML file in your project as a separate DLL (Dynamic Link Library), you could achieve this by creating separate User Control libraries for each XAML file. User Controls allow you to encapsulate UI elements and reuse them across different projects.
Here are the general steps to achieve this:
Create a User Control Library:
- Add a new Class Library project to your solution.
- Add a XAML file (User Control) to this project. This XAML file represents the UI you want to encapsulate.
Build the User Control Library:
- Build the Class Library project to generate the DLL.
Repeat for Each XAML File:
- Repeat steps 1 and 2 for each XAML file you want to build as a separate DLL.
Use the User Controls in Main Projects:
- In your main projects (e.g., WPF application projects), reference the User Control DLLs you created.
- Use the User Controls in your main project's XAML or code-behind files.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.