Skip to content

Instantly share code, notes, and snippets.

@azyobuzin
Created November 12, 2011 04:56
Show Gist options
  • Save azyobuzin/1360064 to your computer and use it in GitHub Desktop.
Save azyobuzin/1360064 to your computer and use it in GitHub Desktop.
(assembly "PresentationFramework")
(load "cts:System.IO")
(load "cts:System.Threading")
(load "cts:System.Windows")
(load "cts:System.Windows.Markup")
Thread.(new (\ []
Application.Current
.(let app
FileStream.(new "MainWindow.xaml" FileMode.Open FileAccess.Read)
.(let fs
XamlReader.(Load fs)
.(let window
fs.(Dispose)
(= app.MainWindow window.(to Window))
app.(Run)
)
)
)
))
.(let t
t.(SetApartmentState ApartmentState.STA)
t.(Start)
t.(Join)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment