Creating UI using dot net libraries(WPF) in Visual studio code

hariharanradha098
Community Visitor
Community Visitor

Creating UI using dot net libraries(WPF) in Visual studio code

hariharanradha098
Community Visitor
Community Visitor

I have created a simple User Interface using the .NET Presentation Framework (WPF) in Dynamo, and it works perfectly. Now, I am interested in creating the same User Interface outside of Dynamo, specifically in Visual Studio Code using Python. I have attempted to install Iron Python 2.7 on my system, but Visual Studio Code is still unable to use CLR.

Could anyone advise me on how to create a User Interface using .NET libraries in Visual Studio Code?

 

hariharanradha098_0-1732163492100.png

 

0 Likes
Reply
Accepted solutions (1)
154 Views
2 Replies
Replies (2)

Mohamed_Arshad
Advisor
Advisor
Accepted solution

Hi @hariharanradha098 

 

To create a User Interface using .NET libraries in Visual Studio Code with Python, you'll need to move beyond IronPython 2.7, which is outdated and has limited support for modern .NET applications. Instead, you can use Python for .NET (pythonnet), a library that bridges Python with the .NET Common Language Runtime (CLR). Here's how you can set up and create a WPF User Interface using Python in Visual Studio Code

 

Step 1: Install Required Tools
Install .NET Framework/Runtime: Ensure you have the .NET Framework or the latest .NET Runtime installed on your system.

Install Python 3.x and Pip: Ensure Python 3.x is installed (you can download it from python.org).

Install pythonnet: Open a terminal in Visual Studio Code and install pythonnet using pip:

pip install pythonnet

 

Hope this will helps 🙂

Thanks & Regards,
Mohamed Arshad K
0 Likes

hariharanradha098
Community Visitor
Community Visitor

Thank you for the solution, It's working now

0 Likes