File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
samples/ControlCatalog/Pages Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 20
20
Text =" Window dialogs" />
21
21
<Button Name =" DecoratedWindow" >Decorated _window</Button >
22
22
<Button Name =" DecoratedWindowDialog" >Decorated w_indow (dialog)</Button >
23
- <Button Name =" Dialog" >_Dialog</Button >
23
+ <Button Name =" Dialog" ToolTip.Tip= " Shows a dialog " >_Dialog</Button >
24
24
<Button Name =" DialogNoTaskbar" >Dialog (_No taskbar icon)</Button >
25
25
<Button Name =" OwnedWindow" >Own_ed window</Button >
26
26
<Button Name =" OwnedWindowNoTaskbar" >Owned window (No tas_kbar icon)</Button >
Original file line number Diff line number Diff line change @@ -142,6 +142,7 @@ public DialogsPage()
142
142
private Window CreateSampleWindow ( )
143
143
{
144
144
Button button ;
145
+ Button dialogButton ;
145
146
146
147
var window = new Window
147
148
{
@@ -158,13 +159,25 @@ private Window CreateSampleWindow()
158
159
HorizontalAlignment = HorizontalAlignment . Center ,
159
160
Content = "Click to close" ,
160
161
IsDefault = true
162
+ } ) ,
163
+ ( dialogButton = new Button
164
+ {
165
+ HorizontalAlignment = HorizontalAlignment . Center ,
166
+ Content = "Dialog" ,
167
+ IsDefault = false
161
168
} )
162
169
}
163
170
} ,
164
171
WindowStartupLocation = WindowStartupLocation . CenterOwner
165
172
} ;
166
173
167
174
button . Click += ( _ , __ ) => window . Close ( ) ;
175
+ dialogButton . Click += ( _ , __ ) =>
176
+ {
177
+ var dialog = CreateSampleWindow ( ) ;
178
+ dialog . Height = 200 ;
179
+ dialog . ShowDialog ( window ) ;
180
+ } ;
168
181
169
182
return window ;
170
183
}
You can’t perform that action at this time.
0 commit comments