27 instantiations of Unit
System.Web (22)
UI\Html32TextWriter.cs (1)
278
Unit u = new
Unit
(value, CultureInfo.InvariantCulture);
UI\ObjectStateFormatter.cs (1)
610
return new
Unit
(reader.ReadDouble(), (UnitType)reader.ReadInt32());
UI\WebControls\Adapters\MenuAdapter.cs (2)
381
spacerImage.Width = new
Unit
(indent, owner.StaticSubMenuIndent.Type);
384
spacerImage.Width = new
Unit
(Unit.MaxValue, owner.StaticSubMenuIndent.Type);;
UI\WebControls\FontUnit.cs (3)
133
public FontUnit(double value) : this(new
Unit
(value, UnitType.Point)) {
140
public FontUnit(double value, UnitType type) : this(new
Unit
(value, type)) {
209
this.value = new
Unit
(value, culture, UnitType.Point);
UI\WebControls\MenuItem.cs (2)
977
indent = new
Unit
(indentValue, indent.Type);
980
indent = new
Unit
(Unit.MaxValue, indent.Type);
UI\WebControls\MenuRendererStandards.cs (3)
205
indent = new
Unit
(1, UnitType.Em);
211
indent = new
Unit
(indentValue, indent.Type);
214
indent = new
Unit
(Unit.MaxValue, indent.Type);
UI\WebControls\Unit.cs (6)
26
public static readonly Unit Empty = new
Unit
();
309
return new
Unit
(s, CultureInfo.CurrentCulture);
317
return new
Unit
(s, culture);
325
return new
Unit
(n,UnitType.Percentage);
333
return new
Unit
(n);
342
return new
Unit
(n,UnitType.Point);
UI\WebParts\AppearanceEditorPart.cs (2)
112
height = new
Unit
(heightValue, _height.Type);
144
width = new
Unit
(widthValue, _width.Type);
UI\WebParts\ToolZone.cs (1)
307
style.Font.Size = new FontUnit(new
Unit
(100, UnitType.Percentage));
UI\WebParts\WebPartZoneBase.cs (1)
1450
style.Font.Size = new FontUnit(new
Unit
(100, UnitType.Percentage));
System.Web.DataVisualization (5)
Common\Utilities\XmlSerializer.cs (2)
2174
objValue = new
Unit
(Int32.Parse(attrValue, System.Globalization.CultureInfo.InvariantCulture));
3111
objValue = new
Unit
((double)reader.ReadDouble());
WebForm\ChartWebControl.cs (2)
2355
return new
Unit
(chartPicture.Width);
2453
return new
Unit
(chartPicture.Height);
WebForm\General\ChartHttpHandler.cs (1)
649
result.Width = new
Unit
(100, UnitType.Percentage);
283 references to Unit
System.Web (268)
Handlers\TraceHandler.cs (6)
224
table.Width =
Unit
.Percentage(100);
252
table.Width =
Unit
.Percentage(100);
343
table.Width =
Unit
.Percentage(100);
427
table.Width =
Unit
.Percentage(100);
507
table.Width =
Unit
.Percentage(100);
561
table.Width =
Unit
.Percentage(100);
UI\Html32TextWriter.cs (1)
278
Unit
u = new Unit(value, CultureInfo.InvariantCulture);
UI\ObjectStateFormatter.cs (4)
612
return
Unit
.Empty;
1150
if (value is
Unit
) {
1151
Unit
uval = (
Unit
)value;
UI\WebControls\Adapters\MenuAdapter.cs (9)
154
skipLink.Height =
Unit
.Pixel(1);
155
skipLink.Width =
Unit
.Pixel(1);
374
owner.StaticSubMenuIndent !=
Unit
.Pixel(0) &&
380
if (indent <
Unit
.MaxValue) {
384
spacerImage.Width = new Unit(
Unit
.MaxValue, owner.StaticSubMenuIndent.Type);;
386
spacerImage.Height =
Unit
.Pixel(1);
548
private void RenderSpace(HtmlTextWriter writer,
Unit
space, Orientation orientation) {
555
spacerImage.Width =
Unit
.Pixel(1);
561
spacerImage.Height =
Unit
.Pixel(1);
UI\WebControls\AdCreatedEventArgs.cs (7)
33
private
Unit
width;
34
private
Unit
height;
104
internal
Unit
Height {
135
internal
Unit
Width {
147
private bool GetUnitValue(IDictionary properties, String keyIndex, ref
Unit
unitValue) {
153
unitValue =
Unit
.Parse(temp, CultureInfo.InvariantCulture);
157
SR.GetString(SR.AdRotator_invalid_integer_format, temp, keyIndex, typeof(
Unit
).FullName));
UI\WebControls\Calendar.cs (12)
856
if (titleStyle.BorderWidth !=
Unit
.Empty) {
862
if (titleStyle.Height !=
Unit
.Empty) {
1273
BorderWidth.Equals(
Unit
.Empty)) {
1274
table.BorderWidth =
Unit
.Pixel(1);
1450
Unit
defaultWidth;
1454
weekSelectorStyle.Width =
Unit
.Percentage(12);
1457
defaultWidth =
Unit
.Percentage(12);
1460
defaultWidth =
Unit
.Percentage(14);
1676
titleTable.Width =
Unit
.Percentage(100);
1689
nextPrevStyle.Width =
Unit
.Percentage(15);
1742
cellMainStyle.Width =
Unit
.Percentage(70);
1848
private void SetDayStyles(TableItemStyle style, int styleMask,
Unit
defaultWidth) {
UI\WebControls\CreateUserWizard.cs (2)
2316
table.Width =
Unit
.Percentage(100);
2317
table.Height =
Unit
.Percentage(100);
UI\WebControls\DropDownList.cs (1)
74
public override
Unit
BorderWidth {
UI\WebControls\FontUnit.cs (10)
86
private readonly
Unit
value;
98
value =
Unit
.Point(10);
101
value =
Unit
.Empty;
107
/// <para>Initializes a new instance of the <see cref='System.Web.UI.WebControls.FontUnit'/> class with a <see cref='System.Web.UI.WebControls.
Unit
'/>.</para>
109
public FontUnit(
Unit
value) {
116
this.value =
Unit
.Empty;
126
this.value =
Unit
.Point(value);
156
this.value =
Unit
.Empty;
237
/// <para>Indicates the font size by <see cref='System.Web.UI.WebControls.
Unit
'/>.</para>
239
public
Unit
Unit {
UI\WebControls\FontUnitConverter.cs (1)
130
member = typeof(FontUnit).GetConstructor(new Type[] { typeof(
Unit
) });
UI\WebControls\HyperLink.cs (10)
78
DefaultValue(typeof(
Unit
), ""),
81
public virtual
Unit
ImageHeight {
85
return (
Unit
)o;
87
return
Unit
.Empty;
96
DefaultValue(typeof(
Unit
), ""),
99
public virtual
Unit
ImageWidth {
103
return (
Unit
)o;
105
return
Unit
.Empty;
275
if (ImageHeight !=
Unit
.Empty) {
278
if (ImageWidth !=
Unit
.Empty) {
UI\WebControls\Listbox.cs (1)
74
public override
Unit
BorderWidth {
UI\WebControls\LoginUtil.cs (3)
459
if (control.BorderWidth !=
Unit
.Empty) {
471
if (control.Height !=
Unit
.Empty) {
474
if (control.Width !=
Unit
.Empty) {
UI\WebControls\Menu.cs (4)
1135
[DefaultValue(typeof(
Unit
), "")]
1138
public
Unit
StaticSubMenuIndent {
1142
return
Unit
.Empty;
1144
return (
Unit
)o;
UI\WebControls\MenuItem.cs (7)
27
private static readonly
Unit
HorizontalDefaultSpacing =
Unit
.Pixel(3);
964
Unit
indent = _owner.StaticSubMenuIndent;
971
indent =
Unit
.Pixel(16);
976
if (indentValue <
Unit
.MaxValue) {
980
indent = new Unit(
Unit
.MaxValue, indent.Type);
1126
private void RenderItemSpacing(HtmlTextWriter writer,
Unit
spacing, Orientation orientation) {
UI\WebControls\MenuItemStyle.cs (20)
35
DefaultValue(typeof(
Unit
), ""),
40
public
Unit
HorizontalPadding {
43
return (
Unit
)(ViewState["HorizontalPadding"]);
45
return
Unit
.Empty;
71
DefaultValue(typeof(
Unit
), ""),
76
public
Unit
ItemSpacing {
79
return (
Unit
)(ViewState["ItemSpacing"]);
81
return
Unit
.Empty;
97
DefaultValue(typeof(
Unit
), ""),
102
public
Unit
VerticalPadding {
105
return (
Unit
)(ViewState["VerticalPadding"]);
107
return
Unit
.Empty;
184
Unit
bu = this.BorderWidth;
202
Unit
u;
206
u = (
Unit
)viewState["Height"];
214
u = (
Unit
)viewState["Width"];
222
Unit
verticalPadding = VerticalPadding.IsEmpty ?
Unit
.Pixel(0) : VerticalPadding;
223
Unit
horizontalPadding = HorizontalPadding.IsEmpty ?
Unit
.Pixel(0) : HorizontalPadding;
UI\WebControls\MenuRendererStandards.cs (3)
200
Unit
indent = Menu.StaticSubMenuIndent;
210
if (indentValue <
Unit
.MaxValue) {
214
indent = new Unit(
Unit
.MaxValue, indent.Type);
UI\WebControls\Style.cs (25)
151
DefaultValue(typeof(
Unit
), ""),
155
public
Unit
BorderWidth {
158
return(
Unit
)(ViewState["BorderWidth"]);
160
return
Unit
.Empty;
277
DefaultValue(typeof(
Unit
), ""),
281
public
Unit
Height {
284
return(
Unit
)(ViewState["Height"]);
286
return
Unit
.Empty;
369
DefaultValue(typeof(
Unit
), ""),
373
public
Unit
Width {
376
return(
Unit
)(ViewState["Width"]);
378
return
Unit
.Empty;
486
if (s.IsSet(PROP_BORDERWIDTH) && (s.BorderWidth !=
Unit
.Empty)) {
494
if (s.IsSet(PROP_HEIGHT) && (s.Height !=
Unit
.Empty)) {
498
if (s.IsSet(PROP_WIDTH) && (s.Width !=
Unit
.Empty)) {
510
if (s.IsSet(PROP_BORDERWIDTH) && (s.BorderWidth !=
Unit
.Empty))
514
if (s.IsSet(PROP_HEIGHT) && (s.Height !=
Unit
.Empty))
516
if (s.IsSet(PROP_WIDTH) && (s.Width !=
Unit
.Empty))
553
Unit
bu = this.BorderWidth;
627
Unit
u;
631
u = (
Unit
)viewState["Height"];
639
u = (
Unit
)viewState["Width"];
748
if (s.IsSet(PROP_BORDERWIDTH) && (!this.IsSet(PROP_BORDERWIDTH) || (BorderWidth ==
Unit
.Empty)))
752
if (s.IsSet(PROP_HEIGHT) && (!this.IsSet(PROP_HEIGHT) || (Height ==
Unit
.Empty)))
754
if (s.IsSet(PROP_WIDTH) && (!this.IsSet(PROP_WIDTH) || (Width ==
Unit
.Empty)))
UI\WebControls\SubMenuStyle.cs (14)
31
DefaultValue(typeof(
Unit
), ""),
36
public
Unit
HorizontalPadding {
39
return (
Unit
)(ViewState["HorizontalPadding"]);
41
return
Unit
.Empty;
57
DefaultValue(typeof(
Unit
), ""),
62
public
Unit
VerticalPadding {
65
return (
Unit
)(ViewState["VerticalPadding"]);
67
return
Unit
.Empty;
140
Unit
bu = this.BorderWidth;
158
Unit
u;
162
u = (
Unit
)viewState["Height"];
170
u = (
Unit
)viewState["Width"];
179
VerticalPadding.IsEmpty ?
Unit
.Pixel(0) : VerticalPadding,
180
HorizontalPadding.IsEmpty ?
Unit
.Pixel(0) : HorizontalPadding));
UI\WebControls\Table.cs (1)
245
Unit
borderWidth = BorderWidth;
UI\WebControls\TreeNodeStyle.cs (22)
37
DefaultValue(typeof(
Unit
), ""),
42
public
Unit
ChildNodesPadding {
45
return (
Unit
)(ViewState["ChildNodesPadding"]);
47
return
Unit
.Empty;
62
DefaultValue(typeof(
Unit
), ""),
67
public
Unit
HorizontalPadding {
70
return (
Unit
)(ViewState["HorizontalPadding"]);
72
return
Unit
.Empty;
119
DefaultValue(typeof(
Unit
), ""),
124
public
Unit
NodeSpacing {
127
return (
Unit
)(ViewState["NodeSpacing"]);
129
return
Unit
.Empty;
144
DefaultValue(typeof(
Unit
), ""),
149
public
Unit
VerticalPadding {
152
return (
Unit
)(ViewState["VerticalPadding"]);
154
return
Unit
.Empty;
238
Unit
bu = this.BorderWidth;
256
Unit
u;
260
u = (
Unit
)viewState["Height"];
268
u = (
Unit
)viewState["Width"];
277
VerticalPadding.IsEmpty ?
Unit
.Pixel(0) : VerticalPadding,
278
HorizontalPadding.IsEmpty ?
Unit
.Pixel(0) : HorizontalPadding));
UI\WebControls\Unit.cs (29)
26
public static readonly
Unit
Empty = new Unit();
36
/// <para>Initializes a new instance of the <see cref='System.Web.UI.WebControls.
Unit
'/> structure with the specified 32-bit signed integer as
50
/// <para> Initializes a new instance of the <see cref='System.Web.UI.WebControls.
Unit
'/> structure with the
65
/// <para>Initializes a new instance of the <see cref='System.Web.UI.WebControls.
Unit
'/> structure with the specified
84
/// <para>Initializes a new instance of the <see cref='System.Web.UI.WebControls.
Unit
'/> structure with the specified text
152
/// <para>Gets a value indicating whether the <see cref='System.Web.UI.WebControls.
Unit
'/> is empty.</para>
162
/// <para>Gets or sets the type of the <see cref='System.Web.UI.WebControls.
Unit
'/> .</para>
177
/// <para>Gets the value of the <see cref='System.Web.UI.WebControls.
Unit
'/> .</para>
195
/// <para>Compares this <see cref='System.Web.UI.WebControls.
Unit
'/> with the specified object.</para>
198
if (obj == null || !(obj is
Unit
)) {
201
Unit
u = (
Unit
)obj;
216
public static bool operator ==(
Unit
left,
Unit
right) {
228
public static bool operator !=(
Unit
left,
Unit
right) {
308
public static
Unit
Parse(string s) {
316
public static
Unit
Parse(string s, CultureInfo culture) {
322
/// <para>Creates a <see cref='System.Web.UI.WebControls.
Unit
'/> of type <see langword='Percentage'/> from the specified 32-bit signed integer.</para>
324
public static
Unit
Percentage(double n) {
330
/// <para>Creates a <see cref='System.Web.UI.WebControls.
Unit
'/> of type <see langword='Pixel'/> from the specified 32-bit signed integer.</para>
332
public static
Unit
Pixel(int n) {
338
/// <para>Creates a <see cref='System.Web.UI.WebControls.
Unit
'/> of type <see langword='Point'/> from the
341
public static
Unit
Point(int n) {
348
/// <para>Converts a <see cref='System.Web.UI.WebControls.
Unit
'/> to a <see cref='System.String' qualify='true'/> .</para>
373
return valuePart +
Unit
.GetStringFromType(type);
378
/// <para>Implicitly creates a <see cref='System.Web.UI.WebControls.
Unit
'/> of type <see langword='Pixel'/> from the specified 32-bit unsigned integer.</para>
380
public static implicit operator
Unit
(int n) {
381
return
Unit
.Pixel(n);
UI\WebControls\unitconverter.cs (9)
63
return
Unit
.Empty;
66
return
Unit
.Parse(textValue, culture);
69
return
Unit
.Parse(textValue, CultureInfo.CurrentCulture);
84
if ((value == null) || ((
Unit
)value).IsEmpty)
87
return ((
Unit
)value).ToString(culture);
90
Unit
u = (
Unit
)value;
95
member = typeof(
Unit
).GetField("Empty");
98
member = typeof(
Unit
).GetConstructor(new Type[] { typeof(double), typeof(UnitType) });
UI\WebControls\WebControl.cs (9)
186
DefaultValue(typeof(
Unit
), ""),
189
public virtual
Unit
BorderWidth {
192
return
Unit
.Empty;
414
DefaultValue(typeof(
Unit
), ""),
417
public virtual
Unit
Height {
420
return
Unit
.Empty;
567
DefaultValue(typeof(
Unit
), ""),
570
public virtual
Unit
Width {
573
return
Unit
.Empty;
UI\WebControls\Wizard.cs (18)
2661
(!Owner.ControlStyleCreated || Owner.ControlStyle.Height ==
Unit
.Empty)) {
2662
_renderTable.ControlStyle.Height =
Unit
.Pixel(1);
2669
_navigationTableCell.ControlStyle.Height =
Unit
.Pixel(1);
2682
if (!Owner.DesignMode && Owner.IsMacIE5 && Owner._navigationStyle.Height ==
Unit
.Empty) {
2683
Owner._navigationStyle.Height =
Unit
.Pixel(1);
2701
if (!Owner.DesignMode && Owner.IsMacIE5 && Owner._stepStyle.Height ==
Unit
.Empty) {
2702
Owner._stepStyle.Height =
Unit
.Pixel(1);
2793
Height =
Unit
.Percentage(100)
2857
Height =
Unit
.Percentage(100)
2864
Height =
Unit
.Percentage(100),
2865
Width =
Unit
.Percentage(100)
2873
outerRightCell.Height =
Unit
.Pixel(1);
2893
Height =
Unit
.Percentage(100)
3232
_cell.Height =
Unit
.Percentage(100);
3233
_cell.Width =
Unit
.Percentage(100);
3260
_cell.Height =
Unit
.Pixel(1);
3312
Table.Width =
Unit
.Percentage(100);
3313
Table.Height =
Unit
.Percentage(100);
UI\WebParts\AppearanceEditorPart.cs (8)
99
Unit
height =
Unit
.Empty;
122
webPart.Height = (
Unit
)height;
131
Unit
width =
Unit
.Empty;
153
webPart.Width = (
Unit
)width;
316
public
Unit
Unit {
319
if (value ==
Unit
.Empty) {
UI\WebParts\CatalogPartChrome.cs (4)
57
if (style.BorderWidth ==
Unit
.Empty) {
58
style.BorderWidth =
Unit
.Pixel(1);
76
if (style.BorderWidth !=
Unit
.Empty) {
77
style.BorderWidth =
Unit
.Empty;
UI\WebParts\DeclarativeCatalogPart.cs (3)
198
public override
Unit
BorderWidth {
251
public override
Unit
Height {
293
public override
Unit
Width {
UI\WebParts\EditorPartChrome.cs (2)
65
if (style.BorderWidth !=
Unit
.Empty) {
66
style.BorderWidth =
Unit
.Empty;
UI\WebParts\GenericWebPart.cs (2)
103
public override
Unit
Height {
226
public override
Unit
Width {
UI\WebParts\PageCatalogPart.cs (3)
183
public override
Unit
BorderWidth {
236
public override
Unit
Height {
278
public override
Unit
Width {
UI\WebParts\WebPart.cs (2)
387
public override
Unit
Height {
661
public override
Unit
Width {
UI\WebParts\WebPartChrome.cs (4)
102
if (style.BorderWidth !=
Unit
.Empty) {
103
style.BorderWidth =
Unit
.Empty;
117
if (style.BorderWidth ==
Unit
.Empty) {
118
style.BorderWidth =
Unit
.Pixel(1);
UI\WebParts\WebPartManager.cs (2)
2445
return typeof(
Unit
);
2487
else if (type == typeof(
Unit
)) {
UI\WebParts\WebPartZoneBase.cs (5)
98
private
Unit
_borderWidth;
159
DefaultValue(typeof(
Unit
), "1")
161
public override
Unit
BorderWidth {
1185
BorderWidth =
Unit
.Empty;
1201
if (_borderColor != Color.Empty || _borderStyle != BorderStyle.NotSet || _borderWidth !=
Unit
.Empty) {
UI\WebParts\WebZone.cs (5)
218
DefaultValue(typeof(
Unit
), "5px"),
222
public
Unit
PartChromePadding {
225
return (obj == null) ?
Unit
.Pixel(5) : (
Unit
)obj;
573
(!ControlStyleCreated || ControlStyle.Height ==
Unit
.Empty)) {
System.Web.DataVisualization (12)
Common\Utilities\XmlSerializer.cs (7)
1782
if(obj is
Unit
)
1784
Unit
unit = (
Unit
)obj;
2172
else if(pi.PropertyType == typeof(
Unit
))
2697
else if(obj is
Unit
)
2699
writer.Write(((
Unit
)obj).Value);
3109
else if(pi.PropertyType == typeof(
Unit
))
WebForm\ChartWebControl.cs (5)
2347
DefaultValue(typeof(
Unit
), "300"),
2351
public override
Unit
Width
2445
DefaultValue(typeof(
Unit
), "300"),
2449
public override
Unit
Height
2652
public override
Unit
BorderWidth
System.Web.Extensions (3)
UI\WebControls\ListView.cs (3)
191
public override
Unit
BorderWidth {
596
public override
Unit
Height {
973
public override
Unit
Width {