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