FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
pythonnet/demo/DynamicGrid.py at PR/ParamsArrayRefcount · losttech/pythonnet · GitHub
losttech
pythonnet
Repository navigation
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
pythonnet
/
demo
/
DynamicGrid.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
23 lines (19 loc) · 712 Bytes
Breadcrumbs
pythonnet
/
demo
/
DynamicGrid.py
Copy path
File metadata and controls
23 lines (19 loc) · 712 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import
clr
import
sys
if
sys
.
platform
.
lower
()
not
in
[
'cli'
,
'win32'
]:
print
(
"only windows is supported for wpf"
)
clr
.
AddReference
(
r"wpf\PresentationFramework"
)
from
System
.
IO
import
StreamReader
from
System
.
Windows
.
Markup
import
XamlReader
from
System
.
Threading
import
Thread
,
ThreadStart
,
ApartmentState
from
System
.
Windows
import
Application
,
Window
class
MyWindow
(
Window
):
def
__init__
(
self
):
stream
=
StreamReader
(
"DynamicGrid.xaml"
)
window
=
XamlReader
.
Load
(
stream
.
BaseStream
)
Application
().
Run
(
window
)
if
__name__
==
'__main__'
:
thread
=
Thread
(
ThreadStart
(
MyWindow
))
thread
.
SetApartmentState
(
ApartmentState
.
STA
)
thread
.
Start
()
thread
.
Join
()
Back
|
FazBrowse Home
|
New Git URL