Skip to content

Instantly share code, notes, and snippets.

@MomenFathi
Forked from SteveGilham/gist:1df41d2e7d92fba0a763
Last active September 5, 2017 13:56
Show Gist options
  • Select an option

  • Save MomenFathi/9856a4e589bd46575cf6ff6a6c3b4904 to your computer and use it in GitHub Desktop.

Select an option

Save MomenFathi/9856a4e589bd46575cf6ff6a6c3b4904 to your computer and use it in GitHub Desktop.
WPF UI for Python
# Reference the WPF assemblies
import clr
clr.AddReferenceByName("PresentationFramework, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35")
clr.AddReferenceByName("PresentationCore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35")
import System.Windows
# Initialization Constants
Window = System.Windows.Window
Application = System.Windows.Application
Button = System.Windows.Controls.Button
StackPanel = System.Windows.Controls.StackPanel
Label = System.Windows.Controls.Label
Thickness = System.Windows.Thickness
DropShadowBitmapEffect = System.Windows.Media.Effects.DropShadowBitmapEffect
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment