14
14
-->
15
15
<Grid >
16
16
<Grid .RowDefinitions>
17
- <RowDefinition Height =" 50*" />
18
17
<RowDefinition Height =" Auto" />
19
- <RowDefinition Height =" 30*" />
18
+ <RowDefinition Height =" 20*" />
19
+ <RowDefinition Height =" 10" />
20
+ <RowDefinition Height =" 12*" />
20
21
</Grid .RowDefinitions>
21
22
<Grid .ColumnDefinitions>
22
23
<ColumnDefinition Width =" 1*" />
23
24
<ColumnDefinition Width =" Auto" />
24
25
</Grid .ColumnDefinitions>
25
- <Grid Grid.Column=" 0" Grid.Row=" 0" >
26
- <console : IronPythonConsoleControl Name =" consoleControl" />
27
- </Grid >
28
- <GridSplitter
29
- Grid.Row=" 1"
30
- Height =" 10"
31
- HorizontalAlignment =" Stretch"
32
- VerticalAlignment =" Center" />
33
- <DockPanel Grid.Column=" 0" Grid.Row=" 2" >
34
- <ToolBar DockPanel.Dock=" Top" >
35
- <ToolBar .Resources>
26
+ <DockPanel Grid.Column=" 0" Grid.Row=" 0" >
27
+ <Ribbon Margin =" 0,-22,0,0"
28
+ KeyboardNavigation.TabIndex=" 0"
29
+ ContextMenu =" {x:Null}"
30
+ AllowDrop =" False" >
31
+ <Ribbon .Resources>
36
32
<Style TargetType =" {x:Type Image}" >
37
33
<Style .Triggers>
38
- <DataTrigger Binding =" {Binding RelativeSource={RelativeSource AncestorType={x:Type ButtonBase}, AncestorLevel=1}, Path=IsEnabled}" Value =" False" >
34
+ <DataTrigger
35
+ Binding =" {Binding RelativeSource={RelativeSource AncestorType={x:Type ButtonBase}, AncestorLevel=1}, Path=IsEnabled}"
36
+ Value =" False" >
39
37
<Setter Property =" Opacity" Value =" 0.30" />
40
38
</DataTrigger >
41
39
</Style .Triggers>
42
40
</Style >
43
- </ToolBar .Resources>
44
- <Button Click =" openFileClick" >
45
- <Image
46
- Height =" 16"
47
- SnapsToDevicePixels =" True"
48
- Source =" /RevitPythonShell;component/Resources/Theme/Open.png"
49
- ToolTip =" Open Python Script" />
50
- </Button >
51
- <Button Click =" saveFileClick" >
52
- <Image
53
- Height =" 16"
54
- SnapsToDevicePixels =" True"
55
- Source =" /RevitPythonShell;component/Resources/Theme/Save.png"
56
- ToolTip =" Save This Script Into File" />
57
- </Button >
58
- <Separator />
59
- <Button Command =" Cut" >
60
- <Image
61
- Height =" 16"
62
- SnapsToDevicePixels =" True"
63
- Source =" /RevitPythonShell;component/Resources/Theme/Cut.png"
64
- ToolTip =" Cut Selected" />
65
- </Button >
66
- <Button Command =" Copy" >
67
- <Image
68
- Height =" 16"
69
- SnapsToDevicePixels =" True"
70
- Source =" /RevitPythonShell;component/Resources/Theme/Copy.png"
71
- ToolTip =" Copy Selected" />
72
- </Button >
73
- <Button Command =" Paste" >
74
- <Image
75
- Height =" 16"
76
- SnapsToDevicePixels =" True"
77
- Source =" /RevitPythonShell;component/Resources/Theme/Paste.png"
78
- ToolTip =" Paste Into Script Editor" />
79
- </Button >
80
- <Button Command =" Delete" >
81
- <Image
82
- Height =" 16"
83
- SnapsToDevicePixels =" True"
84
- Source =" /RevitPythonShell;component/Resources/Theme/Delete.png"
85
- ToolTip =" Delete Selected" />
86
- </Button >
87
- <Separator />
88
- <Button Command =" Undo" >
89
- <Image
90
- Height =" 16"
91
- SnapsToDevicePixels =" True"
92
- Source =" /RevitPythonShell;component/Resources/Theme/Undo.png"
93
- ToolTip =" Undo" />
94
- </Button >
95
- <Button Command =" Redo" >
96
- <Image
97
- Height =" 16"
98
- SnapsToDevicePixels =" True"
99
- Source =" /RevitPythonShell;component/Resources/Theme/Redo.png"
100
- ToolTip =" Redo" />
101
- </Button >
102
- <Separator />
103
- <CheckBox IsChecked =" {Binding ElementName=textEditor, Path=WordWrap}" >
104
- <Image
105
- Height =" 16"
106
- SnapsToDevicePixels =" True"
107
- Source =" /RevitPythonShell;component/Resources/Theme/WordWrap.png"
108
- ToolTip =" Toggle Word Wrap" />
109
- </CheckBox >
110
- <CheckBox IsChecked =" {Binding ElementName=textEditor, Path=ShowLineNumbers}" >
111
- <Image
112
- Height =" 16"
113
- SnapsToDevicePixels =" True"
114
- Source =" /RevitPythonShell;component/Resources/Theme/Number.png"
115
- ToolTip =" Toggle Line Numbers" />
116
- </CheckBox >
117
- <CheckBox IsChecked =" {Binding ElementName=textEditor, Path=Options.ShowEndOfLine}" >
118
- <Image
119
- Height =" 16"
120
- SnapsToDevicePixels =" True"
121
- Source =" /RevitPythonShell;component/Resources/Theme/Paragraph.png"
122
- ToolTip =" Toggle Show End of Line" />
123
- </CheckBox >
124
- <Separator />
125
- <Button Click =" runClick" >
126
- <Image
127
- Height =" 16"
128
- SnapsToDevicePixels =" True"
129
- Source =" /RevitPythonShell;component/Resources/Theme/Run.png"
130
- ToolTip =" Run Script. Results will be displayed in the IronPython prompt." />
131
- </Button >
132
- </ToolBar >
133
- <Grid DockPanel.Dock=" Bottom" >
134
- <avalonEdit : TextEditor
135
- FontFamily =" Consolas"
136
- FontSize =" 10pt"
137
- GotFocus =" textEditor_GotFocus"
138
- Name =" textEditor" >
139
- # IronPython Pad. Write code snippets here and F5 to run.
140
- </avalonEdit : TextEditor >
141
- </Grid >
41
+ </Ribbon .Resources>
42
+ <Ribbon .ApplicationMenu>
43
+ <RibbonApplicationMenu Visibility =" Collapsed" >
44
+ </RibbonApplicationMenu >
45
+ </Ribbon .ApplicationMenu>
46
+ <RibbonTab Header =" Home" ContextMenu =" {x:Null}" >
47
+ <RibbonGroup Header =" File" >
48
+ <RibbonButton Label =" New" LargeImageSource =" ../Resources/Theme/New.png"
49
+ ToolTip =" New (Ctrl + N)"
50
+ SnapsToDevicePixels =" True"
51
+ Click =" newFileClick" />
52
+ <RibbonButton Label =" Open" LargeImageSource =" ../Resources/Theme/Open.png"
53
+ ToolTip =" Open (Ctrl + O)"
54
+ Click =" openFileClick" />
55
+ <RibbonButton Label =" Save" LargeImageSource =" ../Resources/Theme/Save.png"
56
+ ToolTip =" Save (Ctrl + S)"
57
+ Click =" saveFileClick"
58
+ SnapsToDevicePixels =" True" />
59
+ <RibbonButton Label =" Save As" LargeImageSource =" ../Resources/Theme/SaveAs.png"
60
+ ToolTip =" Save As (Ctrl + Shift + S)"
61
+ SnapsToDevicePixels =" True"
62
+ Click =" saveAsFileClick" />
63
+ </RibbonGroup >
64
+ <RibbonGroup Header =" Modify" >
65
+ <RibbonButton Label =" Cut" SmallImageSource =" ../Resources/Theme/Cut.png"
66
+ ToolTip =" Cut Selected"
67
+ SnapsToDevicePixels =" True"
68
+ Command =" Cut" />
69
+ <RibbonButton Label =" Copy" SmallImageSource =" ../Resources/Theme/Save.png"
70
+ ToolTip =" Copy Selected"
71
+ SnapsToDevicePixels =" True"
72
+ Command =" Copy" />
73
+ <RibbonButton Label =" Paste" SmallImageSource =" ../Resources/Theme/Paste.png"
74
+ ToolTip =" Paste Into Script Editor"
75
+ SnapsToDevicePixels =" True"
76
+ Command =" Paste" />
77
+ </RibbonGroup >
78
+ <RibbonGroup Header =" Edit" >
79
+ <RibbonToggleButton Label =" Undo"
80
+ SmallImageSource =" ../Resources/Theme/Undo.png"
81
+ SnapsToDevicePixels =" True"
82
+ ToolTip =" Undo"
83
+ Command =" Undo" />
84
+ <RibbonButton Label =" Redo" SmallImageSource =" ../Resources/Theme/Redo.png"
85
+ ToolTip =" Redo"
86
+ SnapsToDevicePixels =" True"
87
+ Command =" Redo" />
88
+ <RibbonButton Label =" Delete" SmallImageSource =" ../Resources/Theme/Delete.png"
89
+ ToolTip =" Delete Selected"
90
+ SnapsToDevicePixels =" True"
91
+ Command =" Delete" />
92
+ </RibbonGroup >
93
+ <RibbonGroup Header =" Cell" >
94
+ <RibbonCheckBox Label =" WordWrap" SmallImageSource =" ../Resources/Theme/WordWrap.png"
95
+ ToolTip =" Toggle Word Wrap"
96
+ SnapsToDevicePixels =" True"
97
+ IsChecked =" {Binding ElementName=textEditor, Path=WordWrap}" />
98
+ <RibbonCheckBox Label =" Paragraph" SmallImageSource =" ../Resources/Theme/Paragraph.png"
99
+ ToolTip =" Toggle Show End of Line"
100
+ SnapsToDevicePixels =" True"
101
+ IsChecked =" {Binding ElementName=textEditor, Path=Options.ShowEndOfLine}"
102
+ />
103
+ <RibbonCheckBox Label =" Number" SmallImageSource =" ../Resources/Theme/Number.png"
104
+ IsChecked =" {Binding ElementName=textEditor, Path=ShowLineNumbers}"
105
+ ToolTip =" Toggle Line Numbers"
106
+ SnapsToDevicePixels =" True" />
107
+ </RibbonGroup >
108
+ <RibbonGroup Header =" Execute" >
109
+ <RibbonButton Label =" Run" LargeImageSource =" ../Resources/Theme/Run.png"
110
+ SnapsToDevicePixels =" True"
111
+ Click =" runClick"
112
+ ToolTip =" (F5) Run Script. Results will be displayed in the IronPython prompt." />
113
+ </RibbonGroup >
114
+ </RibbonTab >
115
+ </Ribbon >
116
+ <!-- <ToolBar DockPanel.Dock="Top"> -->
117
+ <!-- <Separator /> -->
118
+ <!-- <CheckBox IsChecked="{Binding ElementName=textEditor, Path=ShowLineNumbers}"> -->
119
+ <!-- <Image -->
120
+ <!-- Height="16" -->
121
+ <!-- SnapsToDevicePixels="True" -->
122
+ <!-- Source="/RevitPythonShell;component/Resources/Theme/Number.png" -->
123
+ <!-- ToolTip="Toggle Line Numbers" /> -->
124
+ <!-- </CheckBox> -->
125
+ <!-- </ToolBar> -->
142
126
</DockPanel >
127
+ <Grid Grid.Column=" 0" Grid.Row=" 1" >
128
+ <avalonEdit : TextEditor
129
+ FontFamily =" Consolas"
130
+ FontSize =" 10pt"
131
+ GotFocus =" textEditor_GotFocus"
132
+ Name =" textEditor" >
133
+ # IronPython Pad. Write code snippets here and F5 to run.
134
+ </avalonEdit : TextEditor >
135
+ </Grid >
136
+ <GridSplitter
137
+ Grid.Row=" 2"
138
+ Grid.Column=" 0"
139
+ Height =" 10"
140
+ HorizontalAlignment =" Stretch"
141
+ VerticalAlignment =" Center" />
142
+
143
+ <Grid Grid.Row=" 3" MinHeight =" 20" >
144
+ <console : IronPythonConsoleControl Name =" consoleControl" />
145
+ </Grid >
143
146
144
147
</Grid >
145
- </Window >
148
+ </Window >
0 commit comments