Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / MIT / System / Web / UI / MobileControls / Adapters / HtmlLabelAdapter.cs / 1305376 / HtmlLabelAdapter.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- using System; using System.IO; using System.Web; using System.Web.UI; using System.Web.UI.MobileControls; using System.Drawing; using System.Security.Permissions; #if COMPILING_FOR_SHIPPED_SOURCE namespace System.Web.UI.MobileControls.ShippedAdapterSource #else namespace System.Web.UI.MobileControls.Adapters #endif { /* * HtmlLabelAdapter class. * * Copyright (c) 2000 Microsoft Corporation */ ///[AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] [AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)] [Obsolete("The System.Web.Mobile.dll assembly has been deprecated and should no longer be used. For information about how to develop ASP.NET mobile applications, see http://go.microsoft.com/fwlink/?LinkId=157231.")] public class HtmlLabelAdapter : HtmlControlAdapter { /// protected new TextControl Control { get { return (TextControl)base.Control; } } /// protected internal bool WhiteSpace(String s) { if (s == null) { return true; } int length = s.Length; for(int i = 0; i < length; i++) { char c = s[i]; if(!Char.IsWhiteSpace(c)) { return false; } } return true; } /// public override void Render(HtmlMobileTextWriter writer) { writer.EnterStyle(Style); if( (writer.BeforeFirstControlWritten) && (Device.RequiresLeadingPageBreak) && (String.IsNullOrEmpty(Control.Text) || WhiteSpace(Control.Text) ) ) { writer.WriteBreak(); } else { writer.WriteText(Control.Text, true); } writer.ExitStyle(Style, Control.BreakAfter); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ // // Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- using System; using System.IO; using System.Web; using System.Web.UI; using System.Web.UI.MobileControls; using System.Drawing; using System.Security.Permissions; #if COMPILING_FOR_SHIPPED_SOURCE namespace System.Web.UI.MobileControls.ShippedAdapterSource #else namespace System.Web.UI.MobileControls.Adapters #endif { /* * HtmlLabelAdapter class. * * Copyright (c) 2000 Microsoft Corporation */ ///[AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] [AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)] [Obsolete("The System.Web.Mobile.dll assembly has been deprecated and should no longer be used. For information about how to develop ASP.NET mobile applications, see http://go.microsoft.com/fwlink/?LinkId=157231.")] public class HtmlLabelAdapter : HtmlControlAdapter { /// protected new TextControl Control { get { return (TextControl)base.Control; } } /// protected internal bool WhiteSpace(String s) { if (s == null) { return true; } int length = s.Length; for(int i = 0; i < length; i++) { char c = s[i]; if(!Char.IsWhiteSpace(c)) { return false; } } return true; } /// public override void Render(HtmlMobileTextWriter writer) { writer.EnterStyle(Style); if( (writer.BeforeFirstControlWritten) && (Device.RequiresLeadingPageBreak) && (String.IsNullOrEmpty(Control.Text) || WhiteSpace(Control.Text) ) ) { writer.WriteBreak(); } else { writer.WriteText(Control.Text, true); } writer.ExitStyle(Style, Control.BreakAfter); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- XpsFontSubsetter.cs
- SynchronizationFilter.cs
- DispatcherExceptionEventArgs.cs
- WaitHandleCannotBeOpenedException.cs
- PerformanceCounterPermissionEntry.cs
- BrowserCapabilitiesCodeGenerator.cs
- PropertyInfoSet.cs
- CodeObjectCreateExpression.cs
- CodeCompiler.cs
- QueueProcessor.cs
- RegexStringValidator.cs
- ConfigurationElement.cs
- XmlSiteMapProvider.cs
- HttpWebResponse.cs
- XmlMembersMapping.cs
- Win32MouseDevice.cs
- ObjectIDGenerator.cs
- EventItfInfo.cs
- DocumentScope.cs
- PermissionSetTriple.cs
- X509SecurityTokenAuthenticator.cs
- EntityClassGenerator.cs
- _HeaderInfoTable.cs
- SystemIPGlobalProperties.cs
- CfgArc.cs
- EndOfStreamException.cs
- CheckBox.cs
- storepermissionattribute.cs
- ScriptResourceInfo.cs
- HttpHeaderCollection.cs
- RemotingAttributes.cs
- XmlElementList.cs
- CultureMapper.cs
- CounterSample.cs
- ColorMatrix.cs
- TextSerializer.cs
- OutputCacheProfile.cs
- MenuItemCollection.cs
- ConversionContext.cs
- AppDomain.cs
- WindowsFormsSynchronizationContext.cs
- Exceptions.cs
- CredentialCache.cs
- PrivacyNoticeBindingElementImporter.cs
- AssertUtility.cs
- LiteralControl.cs
- DbTransaction.cs
- NodeFunctions.cs
- SoapFormatterSinks.cs
- XmlCountingReader.cs
- CatalogPartChrome.cs
- CompensationDesigner.cs
- DATA_BLOB.cs
- FamilyMap.cs
- VirtualizingPanel.cs
- ToolboxControl.cs
- CompiledIdentityConstraint.cs
- TablePattern.cs
- CodeAttributeArgumentCollection.cs
- UInt64Converter.cs
- PassportAuthenticationModule.cs
- ResolvedKeyFrameEntry.cs
- KnownTypesProvider.cs
- XmlDocumentType.cs
- ScriptHandlerFactory.cs
- SerializableAttribute.cs
- Point3DValueSerializer.cs
- TextRangeBase.cs
- AttachmentService.cs
- SpeechUI.cs
- _AutoWebProxyScriptEngine.cs
- FormParameter.cs
- DataGridDefaultColumnWidthTypeConverter.cs
- AssemblySettingAttributes.cs
- EntityCommandExecutionException.cs
- SectionXmlInfo.cs
- followingsibling.cs
- CompModSwitches.cs
- ResourcesBuildProvider.cs
- Positioning.cs
- XmlQueryRuntime.cs
- RegexCapture.cs
- XPathDocumentIterator.cs
- InputLanguageProfileNotifySink.cs
- ValidatedMobileControlConverter.cs
- BindingContext.cs
- FeatureSupport.cs
- ACE.cs
- EditorPartDesigner.cs
- SiteIdentityPermission.cs
- Vector3D.cs
- EventMappingSettingsCollection.cs
- TextSegment.cs
- PageAction.cs
- TrustManagerMoreInformation.cs
- RepeatInfo.cs
- XmlElementList.cs
- ControlCollection.cs
- WebPartVerb.cs
- Inline.cs