forked from extnet/Ext.NET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAbstractWindow.cs
More file actions
822 lines (757 loc) · 33.4 KB
/
AbstractWindow.cs
File metadata and controls
822 lines (757 loc) · 33.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
/********
* @version : 2.1.1 - Ext.NET Pro License
* @author : Ext.NET, Inc. http://www.ext.net/
* @date : 2012-12-10
* @copyright : Copyright (c) 2007-2012, Ext.NET, Inc. (http://www.ext.net/). All rights reserved.
* @license : See license.txt and http://www.ext.net/license/.
********/
using System.ComponentModel;
using System.Web.UI;
using Ext.Net.Utilities;
using System.Web.UI.WebControls;
namespace Ext.Net
{
/// <summary>
///
/// </summary>
[Meta]
[Description("")]
public abstract partial class AbstractWindow : AbstractPanel
{
/// <summary>
///
/// </summary>
[Description("")]
protected override string ContainerStyle
{
get
{
return Const.DisplayNone;
}
}
protected override void OnBeforeClientInit(Observable sender)
{
base.OnBeforeClientInit(sender);
if (!this.DesignMode && !this.AutoRender && this.ClientForm.IsNotEmpty() && (!Ext.Net.X.IsAjaxRequest || this.IsDynamic))
{
this.DefaultRenderTo = Ext.Net.DefaultRenderTo.Form;
}
}
/* Public Properties
-----------------------------------------------------------------------------------------------*/
/// <summary>
/// Id or element from which the window should animate while opening (defaults to null with no animation).
/// </summary>
[Meta]
[ConfigOption]
[DirectEventUpdate(MethodName = "SetAnimateTarget")]
[Category("6. AbstractWindow")]
[DefaultValue("")]
[TypeConverter(typeof(ControlConverter))]
[Description("Id or element from which the window should animate while opening (defaults to null with no animation).")]
public virtual string AnimateTarget
{
get
{
return this.State.Get<string>("AnimateTarget", "");
}
set
{
this.State.Set("AnimateTarget", value);
}
}
/// <summary>
/// True to display the 'close' tool button and allow the user to close the window, false to hide the button and disallow closing the window (defaults to true).
///
/// By default, when close is requested by either clicking the close button in the header or pressing ESC when the Window has focus, the close method will be called. This will destroy the Window and its content meaning that it may not be reused.
///
/// To make closing a Window hide the Window so that it may be reused, set closeAction to 'hide'.
/// </summary>
[ConfigOption]
[Category("6. AbstractWindow")]
[DefaultValue(true)]
[Description("True to display the 'close' tool button and allow the user to close the window, false to hide the button and disallow closing the window (default to true).")]
public override bool Closable
{
get
{
return this.State.Get<bool>("Closable", true);
}
set
{
this.State.Set("Closable", value);
}
}
/// <summary>
/// The action to take when the close button is clicked. The default action is 'close' which will actually remove the window from the DOM and destroy it. The other valid option is 'hide' which will simply hide the window by setting visibility to hidden and applying negative offsets, keeping the window available to be redisplayed via the show method.
/// </summary>
[ConfigOption(JsonMode.ToLower)]
[Category("6. AbstractWindow")]
[DefaultValue(CloseAction.Hide)]
[Description("The action to take when the close button is clicked. The default action is 'close' which will actually remove the window from the DOM and destroy it. The other valid option is 'hide' which will simply hide the window by setting visibility to hidden and applying negative offsets, keeping the window available to be redisplayed via the show method.")]
public override CloseAction CloseAction
{
get
{
return this.State.Get<CloseAction>("CloseAction", CloseAction.Hide);
}
set
{
this.State.Set("CloseAction", value);
}
}
/// <summary>
/// True to constrain the window within its containing element, false to allow it to fall outside of its containing element. By default the window will be rendered to document.body. To render and constrain the window within another element specify renderTo. (defaults to false). Optionally the header only can be constrained using constrainHeader.
/// </summary>
[Meta]
[ConfigOption]
[Category("6. AbstractWindow")]
[DefaultValue(false)]
[Description("True to constrain the window within its containing element, false to allow it to fall outside of its containing element. By default the window will be rendered to document.body. To render and constrain the window within another element specify renderTo. (defaults to false). Optionally the header only can be constrained using constrainHeader.")]
public virtual bool Constrain
{
get
{
return this.State.Get<bool>("Constrain", false);
}
set
{
this.State.Set("Constrain", value);
}
}
/// <summary>
/// True to constrain the window header within its containing element (allowing the window body to fall outside of its containing element) or false to allow the header to fall outside its containing element (defaults to false). Optionally the entire window can be constrained using constrain.
/// </summary>
[Meta]
[ConfigOption]
[Category("6. AbstractWindow")]
[DefaultValue(false)]
[Description("True to constrain the window header within its containing element (allowing the window body to fall outside of its containing element) or false to allow the header to fall outside its containing element (defaults to false). Optionally the entire window can be constrained using constrain.")]
public virtual bool ConstrainHeader
{
get
{
return this.State.Get<bool>("ConstrainHeader", false);
}
set
{
this.State.Set("ConstrainHeader", value);
}
}
/// <summary>
/// An element id which is used to constrain the window.
/// </summary>
[Meta]
[ConfigOption("constrainTo")]
[Category("6. AbstractWindow")]
[DefaultValue("")]
[Description("An element id which is used to constrain the window.")]
public virtual string ConstrainToElement
{
get
{
return this.State.Get<string>("ConstrainToElement", "");
}
set
{
this.State.Set("ConstrainToElement", value);
}
}
/// <summary>
/// A region which is used to constrain the window.
/// </summary>
[Meta]
[Category("6. AbstractWindow")]
[DefaultValue(null)]
[PersistenceMode(PersistenceMode.InnerProperty)]
[Description("A region which is used to constrain the window.")]
public virtual System.Drawing.Rectangle? ConstrainToRegion
{
get
{
return this.State.Get<System.Drawing.Rectangle?>("ConstrainToRegion", null);
}
set
{
this.State.Set("ConstrainToRegion", value);
}
}
[ConfigOption("constrainTo", JsonMode.Raw)]
[DefaultValue(null)]
protected virtual string ConstrainToRegionProxy
{
get
{
if (this.ConstrainToRegion == null)
{
return null;
}
return string.Format("Ext.util.Region.from({0})", JSON.Serialize(new { top = this.ConstrainToRegion.Value.Top, bottom = this.ConstrainToRegion.Value.Bottom, right = this.ConstrainToRegion.Value.Right, left = this.ConstrainToRegion.Value.Left }));
}
}
/// <summary>
/// Specifies a Component to receive focus when this Window is focused.
///
/// This may be one of:
///
/// The index of a footer Button.
/// The id or Ext.AbstractComponent-itemId of a descendant Component.
/// A Component.
/// </summary>
[Meta]
[Category("6. AbstractWindow")]
[DefaultValue("")]
[Description("The id of a button to focus when this window received the focus.")]
public virtual string DefaultFocus
{
get
{
return this.State.Get<string>("DefaultFocus", "");
}
set
{
this.State.Set("DefaultFocus", value);
}
}
/// <summary>
///
/// </summary>
[ConfigOption("defaultFocus", JsonMode.Raw)]
[DefaultValue("")]
protected virtual string DefaultFocusProxy
{
get
{
if (this.DefaultFocus.IsEmpty())
{
return "";
}
int number;
if (int.TryParse(this.DefaultFocus, out number))
{
return number.ToString();
}
if (TokenUtils.IsRawToken(this.DefaultFocus))
{
return TokenUtils.ParseTokens(this.DefaultFocus, this);
}
return TokenUtils.ParseAndNormalize(this.DefaultFocus, this);
}
}
/// <summary>
/// The default render to Element (Body or Form). Using when AutoRender="false"
/// </summary>
[Meta]
[ConfigOption(JsonMode.ToLower)]
[Category("6. AbstractWindow")]
[DefaultValue(DefaultRenderTo.Body)]
[Description("The default render to Element (Body or Form). Using when AutoRender='false'")]
public virtual DefaultRenderTo DefaultRenderTo
{
get
{
var defaultValue = this.IsLazy && this.ClientForm.IsNotEmpty() && !this.DesignMode ? DefaultRenderTo.Form : DefaultRenderTo.Body;
return this.State.Get<DefaultRenderTo>("DefaultRenderTo", defaultValue);
}
set
{
this.State.Set("DefaultRenderTo", value);
}
}
/// <summary>
/// True to allow the window to be dragged by the header bar, false to disable dragging (defaults to true). Note that by default the window will be centered in the viewport, so if dragging is disabled the window may need to be positioned programmatically after render (e.g., myWindow.setPosition(100, 100);).
/// </summary>
[Category("6. AbstractWindow")]
[DefaultValue(true)]
[Description("True to allow the window to be dragged by the header bar, false to disable dragging (defaults to true). Note that by default the window will be centered in the viewport, so if dragging is disabled the window may need to be positioned programmatically after render (e.g., myWindow.setPosition(100, 100);).")]
public override bool Draggable
{
get
{
return this.State.Get<bool>("Draggable", true);
}
set
{
this.State.Set("Draggable", value);
}
}
/// <summary>
///
/// </summary>
[DefaultValue(true)]
[ConfigOption("draggable")]
protected override bool DraggableProxy
{
get
{
if (this.DraggableConfig != null)
{
return true;
}
return this.Draggable;
}
}
/// <summary>
/// True to always expand the window when it is displayed, false to keep it in its current state (which may be collapsed) when displayed (defaults to true).
/// </summary>
[Meta]
[Category("6. AbstractWindow")]
[DefaultValue(true)]
[Description("True to always expand the window when it is displayed, false to keep it in its current state (which may be collapsed) when displayed (defaults to true).")]
public virtual bool ExpandOnShow
{
get
{
return this.State.Get<bool>("ExpandOnShow", true);
}
set
{
this.State.Set("ExpandOnShow", value);
}
}
/// <summary>
///
/// </summary>
[ConfigOption("expandOnShow")]
[DefaultValue(true)]
[Description("")]
protected bool ExpandOnShowProxy
{
get
{
return (this.Collapsed) ? false : this.ExpandOnShow;
}
}
/// <summary>
/// Render this Window hidden (default is false). If true, the hide method will be called internally.
/// </summary>
[ConfigOption]
[DirectEventUpdate(Script = "{0}.setVisible(!{1});")]
[Category("3. AbstractComponent")]
[DefaultValue(true)]
[Description("Render this Window hidden (default is true). If true, the hide method will be called internally.")]
public override bool Hidden
{
get
{
return this.State.Get<bool>("Hidden", false);
}
set
{
this.State.Set("Hidden", value);
}
}
/// <summary>
/// Windows hide using offsets in order to preserve the scroll positions of their descendants.
///
/// A String which specifies how this Component's encapsulating DOM element will be hidden. Values may be:
///
/// 'display' : The Component will be hidden using the display: none style.
/// 'visibility' : The Component will be hidden using the visibility: hidden style.
/// 'offsets' : The Component will be hidden by absolutely positioning it out of the visible area of the document. This is useful when a hidden Component must maintain measurable dimensions. Hiding using display results in a Component having zero dimensions.
/// Defaults to: "offsets"
/// </summary>
[Meta]
[ConfigOption(JsonMode.ToLower)]
[Category("3. AbstractComponent")]
[DefaultValue(HideMode.Offsets)]
[NotifyParentProperty(true)]
[Description("A String which specifies how this AbstractComponent's encapsulating DOM element will be hidden.")]
public override HideMode HideMode
{
get
{
return this.State.Get<HideMode>("HideMode", HideMode.Offsets);
}
set
{
this.State.Set("HideMode", value);
}
}
/// <summary>
/// True to display the 'maximize' tool button and allow the user to maximize the window, false to hide the button and disallow maximizing the window (defaults to false). Note that when a window is maximized, the tool button will automatically change to a 'restore' button with the appropriate behavior already built-in that will restore the window to its previous size.
/// </summary>
[Meta]
[ConfigOption]
[Category("6. AbstractWindow")]
[DefaultValue(null)]
[Description("True to display the 'maximize' tool button and allow the user to maximize the window, false to hide the button and disallow maximizing the window (defaults to false). Note that when a window is maximized, the tool button will automatically change to a 'restore' button with the appropriate behavior already built-in that will restore the window to its previous size.")]
public virtual bool? Maximizable
{
get
{
return this.State.Get<bool?>("Maximizable", null);
}
set
{
this.State.Set("Maximizable", value);
}
}
/// <summary>
/// True to initially display the window in a maximized state. (Defaults to false).
/// </summary>
[Meta]
[ConfigOption]
[Category("6. AbstractWindow")]
[DefaultValue(false)]
[Description("True to initially display the window in a maximized state. (Defaults to false).")]
public virtual bool Maximized
{
get
{
return this.State.Get<bool>("Maximized", false);
}
set
{
this.State.Set("Maximized", value);
}
}
/// <summary>
/// True to display the 'minimize' tool button and allow the user to minimize the window, false to hide the button and disallow minimizing the window (defaults to false). Note that this button provides no implementation -- the behavior of minimizing a window is implementation-specific, so the minimize event must be handled and a custom minimize behavior implemented for this option to be useful.
/// </summary>
[Meta]
[ConfigOption]
[Category("6. AbstractWindow")]
[DefaultValue(null)]
[Description("True to display the 'minimize' tool button and allow the user to minimize the window, false to hide the button and disallow minimizing the window (defaults to false). Note that this button provides no implementation -- the behavior of minimizing a window is implementation-specific, so the minimize event must be handled and a custom minimize behavior implemented for this option to be useful.")]
public virtual bool? Minimizable
{
get
{
return this.State.Get<bool?>("Minimizable", null);
}
set
{
this.State.Set("Minimizable", value);
}
}
/// <summary>
/// True to make the window modal and mask everything behind it when displayed, false to display it without restricting access to other UI elements (defaults to false).
/// </summary>
[Meta]
[ConfigOption]
[DirectEventUpdate(MethodName = "ToggleModal")]
[Category("6. AbstractWindow")]
[DefaultValue(false)]
[Description("True to make the window modal and mask everything behind it when displayed, false to display it without restricting access to other UI elements (defaults to false).")]
public virtual bool Modal
{
get
{
return this.State.Get<bool>("Modal", false);
}
set
{
this.State.Set("Modal", value);
}
}
/// <summary>
/// Allows override of the built-in processing for the escape key. Default action is to close the Window (performing whatever action is specified in closeAction. To prevent the Window closing when the escape key is pressed, specify this as Ext.emptyFn (See Ext.emptyFn).
/// </summary>
[Meta]
[ConfigOption(JsonMode.Raw)]
[Category("6. AbstractWindow")]
[DefaultValue("Ext.emptyFn")]
[Description("Allows override of the built-in processing for the escape key. Default action is to close the Window (performing whatever action is specified in closeAction. To prevent the Window closing when the escape key is pressed, specify this as Ext.emptyFn (See Ext.emptyFn).")]
public virtual string OnEsc
{
get
{
return this.State.Get<string>("OnEsc", "Ext.emptyFn");
}
set
{
this.State.Set("OnEsc", value);
}
}
/// <summary>
/// True to render the window body with a transparent background so that it will blend into the framing elements, false to add a lighter background color to visually highlight the body element and separate it more distinctly from the surrounding frame (defaults to false).
/// </summary>
[Meta]
[ConfigOption]
[Category("6. AbstractWindow")]
[DefaultValue(false)]
[Description("True to render the window body with a transparent background so that it will blend into the framing elements, false to add a lighter background color to visually highlight the body element and separate it more distinctly from the surrounding frame (defaults to false).")]
public virtual bool Plain
{
get
{
return this.State.Get<bool>("Plain", false);
}
set
{
this.State.Set("Plain", value);
}
}
/// <summary>
/// Set to false to disable the ghost panel during dragging the window.
/// </summary>
[Meta]
[ConfigOption]
[Category("6. AbstractWindow")]
[DefaultValue(true)]
[Description("Set to false to disable the ghost panel during dragging the window.")]
public virtual bool Ghost
{
get
{
return this.State.Get<bool>("Ghost", true);
}
set
{
this.State.Set("Ghost", value);
}
}
/// <summary>
/// Specify as true to allow user resizing at each edge and corner of the window, false to disable resizing (defaults to true).
///
/// This may also be specified as a config object to
/// </summary>
[Category("6. AbstractWindow")]
[DefaultValue(true)]
[Description("True to allow user resizing at each edge and corner of the window, false to disable resizing (defaults to true).")]
public override bool Resizable
{
get
{
return this.State.Get<bool>("Resizable", true);
}
set
{
this.State.Set("Resizable", value);
}
}
/// <summary>
///
/// </summary>
[DefaultValue(true)]
[ConfigOption("resizable")]
protected override bool ResizableProxy
{
get
{
return this.Resizable || this.ResizableConfig != null ? true : false;
}
}
/// <summary>
/// The width of this component in pixels.
/// </summary>
[ConfigOption]
[DirectEventUpdate(MethodName = "SetWidth")]
[Category("3. AbstractComponent")]
[DefaultValue(typeof(Unit), "")]
[NotifyParentProperty(true)]
[Description("The width of this component in pixels.")]
public override Unit Width
{
get
{
return this.UnitPixelTypeCheck(this.State.Get<Unit>("Width", Unit.Pixel(200)), Unit.Empty, "Width");
}
set
{
this.State.Set("Width", value);
}
}
/* Overrides
-----------------------------------------------------------------------------------------------*/
/// <summary>
/// Windows render to the body on first show.
/// This config is intended mainly for floating Components which may or may not be shown. Instead of using renderTo in the configuration, and rendering upon construction, this allows a Component to render itself upon first show.
/// Specify as true to have this AbstractComponent render to the document body upon first show.
/// Specify as an element, or the ID of an element to have this AbstractComponent render to a specific element upon first show.
/// This defaults to true for the Window class.
/// </summary>
[Meta]
[ConfigOption]
[Category("3. AbstractComponent")]
[DefaultValue(true)]
[Description("This config is intended mainly for floating Components which may or may not be shown. Instead of using renderTo in the configuration, and rendering upon construction, this allows a AbstractComponent to render itself upon first show. Default is false.")]
public override bool AutoRender
{
get
{
return this.State.Get<bool>("AutoRender", true);
}
set
{
this.State.Set("AutoRender", value);
}
}
/// <summary>
///
/// </summary>
[ConfigOption("renderTo")]
[DefaultValue("")]
protected internal override string RenderToProxy
{
get
{
if (!this.AutoRender || this.IsLazy)
{
return "";
}
if (this.RenderTo.IsEmpty())
{
string formId = this.ClientForm;
return TokenUtils.RawWrap(formId.IsNotEmpty() ? "Ext.get(\"".ConcatWith(formId, "\")") : "Ext.getBody()");
}
return base.RenderToProxy;
}
}
/// <summary>
///
/// </summary>
[Description("")]
protected override bool RemoveContainer
{
get
{
return true;
}
}
/* Public Methods
-----------------------------------------------------------------------------------------------*/
///// <summary>
///// Anchors this window to another element and realigns it when the window is resized or scrolled.
///// </summary>
//[Meta]
//[Description("Anchors this window to another element and realigns it when the window is resized or scrolled.")]
//public virtual void AnchorTo(string element, string position)
//{
// this.Call("anchorTo", new JRawValue(element), position);
//}
///// <summary>
///// Anchors this window to another element and realigns it when the window is resized or scrolled.
///// </summary>
//[Meta]
//[Description("Anchors this window to another element and realigns it when the window is resized or scrolled.")]
//public virtual void AnchorTo(string element, string position, int offsetX, int offsetY)
//{
// this.Call("anchorTo", new JRawValue(element), position, new int[] { offsetX, offsetY });
//}
///// <summary>
///// Anchors this window to another element and realigns it when the window is resized or scrolled.
///// </summary>
//[Meta]
//[Description("Anchors this window to another element and realigns it when the window is resized or scrolled.")]
//public virtual void AnchorTo(string element, string position, int offsetX, int offsetY, bool monitorScroll)
//{
// this.Call("anchorTo", new JRawValue(element), position, new int[] { offsetX, offsetY }, monitorScroll);
//}
/// <summary>
/// Hides the window, setting it to invisible and applying negative offsets.
/// </summary>
[Description("Hides the window, setting it to invisible and applying negative offsets.")]
public override void Hide()
{
base.Hide();
}
/// <summary>
/// Hides the window, setting it to invisible and applying negative offsets.
/// </summary>
[Meta]
[Description("Hides the window, setting it to invisible and applying negative offsets.")]
public virtual void Hide(Control animateTarget)
{
this.Call("hide", animateTarget.ClientID);
}
/// <summary>
/// Hides the window, setting it to invisible and applying negative offsets.
/// </summary>
[Meta]
[Description("Hides the window, setting it to invisible and applying negative offsets.")]
public virtual void Hide(Control animateTarget, string callback)
{
this.Call("hide", animateTarget.ClientID, new JRawValue(callback));
}
/// <summary>
/// Hides the window, setting it to invisible and applying negative offsets.
/// </summary>
[Meta]
[Description("Hides the window, setting it to invisible and applying negative offsets.")]
public virtual void Hide(Control animateTarget, string callback, string scope)
{
this.Call("hide", animateTarget.ClientID, new JRawValue(callback), new JRawValue(scope));
}
/// <summary>
/// Hides the window, setting it to invisible and applying negative offsets.
/// </summary>
[Description("Hides the window, setting it to invisible and applying negative offsets.")]
public override void Hide(string animateTarget)
{
this.Call("hide", animateTarget);
}
/// <summary>
/// Hides the window, setting it to invisible and applying negative offsets.
/// </summary>
[Description("Hides the window, setting it to invisible and applying negative offsets.")]
public override void Hide(string animateTarget, string callback)
{
this.Call("hide", animateTarget, new JRawValue(callback));
}
/// <summary>
/// Hides the window, setting it to invisible and applying negative offsets.
/// </summary>
[Meta]
[Description("Hides the window, setting it to invisible and applying negative offsets.")]
public override void Hide(string animateTarget, string callback, string scope)
{
this.Call("hide", animateTarget, new JRawValue(callback), new JRawValue(scope));
}
/// <summary>
/// Fits the window within its current container and automatically replaces the 'maximize' tool button with the 'restore' tool button.
/// </summary>
[Meta]
[Description("Fits the window within its current container and automatically replaces the 'maximize' tool button with the 'restore' tool button.")]
public virtual void Maximize()
{
this.Call("maximize");
}
/// <summary>
/// Placeholder method for minimizing the window. By default, this method simply fires the minimize event since the behavior of minimizing a window is application-specific. To implement custom minimize behavior, either the minimize event can be handled or this method can be overridden.
/// </summary>
[Meta]
[Description("Placeholder method for minimizing the window. By default, this method simply fires the minimize event since the behavior of minimizing a window is application-specific. To implement custom minimize behavior, either the minimize event can be handled or this method can be overridden.")]
public virtual void Minimize()
{
this.Call("minimize");
}
/// <summary>
/// Restores a maximized window back to its original size and position prior to being maximized and also replaces the 'restore' tool button with the 'maximize' tool button.
/// </summary>
[Meta]
[Description("Restores a maximized window back to its original size and position prior to being maximized and also replaces the 'restore' tool button with the 'maximize' tool button.")]
public virtual void Restore()
{
this.Call("restore");
}
/// <summary>
/// Sets the target element from which the window should animate while opening.
/// </summary>
[Meta]
[Description("Sets the target element from which the window should animate while opening.")]
public virtual void SetAnimateTarget(string element)
{
this.Set("animateTarget", new JRawValue("Ext.net.getEl(" + JSON.Serialize(element) + ")"));
}
/// <summary>
/// Sets the target element from which the window should animate while opening.
/// </summary>
[Meta]
[Description("Sets the target element from which the window should animate while opening.")]
public virtual void SetAnimateTarget(Control element)
{
this.Set("animateTarget", new JRawValue(element.ClientID + ".getEl()"));
}
/// <summary>
/// A shortcut method for toggling between maximize and restore based on the current maximized state of the window.
/// </summary>
[Meta]
[Description("A shortcut method for toggling between maximize and restore based on the current maximized state of the window.")]
public virtual void ToggleMaximize()
{
this.Call("toggleMaximize");
}
}
}