Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / MIT / System / Web / UI / MobileControls / Design / Adapters / DesignerCalendarAdapter.cs / 1305376 / DesignerCalendarAdapter.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- using System.Diagnostics; using System.Drawing; using System.Web.Mobile; using System.Web.UI.Design.MobileControls; using System.Web.UI.MobileControls; using System.Web.UI.MobileControls.Adapters; namespace System.Web.UI.Design.MobileControls.Adapters { [ System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand, Flags=System.Security.Permissions.SecurityPermissionFlag.UnmanagedCode) ] [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.")] internal class DesignerCalendarAdapter : HtmlCalendarAdapter { public override MobileCapabilities Device { get { return DesignerCapabilities.Instance; } } public override void Render(HtmlMobileTextWriter writer) { writer.WriteBeginTag("div"); String width = DesignerAdapterUtil.GetWidth(Control); writer.WriteAttribute("style", "cellpadding=2px;width:" + width); Alignment alignment = (Alignment)Style[Style.AlignmentKey, true]; if (alignment != Alignment.NotSet) { writer.WriteAttribute("align", Enum.GetName(typeof(Alignment), alignment)); } writer.Write("/>"); ((DesignerTextWriter)writer).EnterZeroFontSizeTag(); //Note: Although this is an internal method of runtime, but it is still // pretty easy to achieve the same goal without using this method. Style.ApplyTo(Control.WebCalendar); base.Render(writer); ((DesignerTextWriter)writer).ExitZeroFontSizeTag(); writer.WriteEndTag("div"); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- using System.Diagnostics; using System.Drawing; using System.Web.Mobile; using System.Web.UI.Design.MobileControls; using System.Web.UI.MobileControls; using System.Web.UI.MobileControls.Adapters; namespace System.Web.UI.Design.MobileControls.Adapters { [ System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand, Flags=System.Security.Permissions.SecurityPermissionFlag.UnmanagedCode) ] [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.")] internal class DesignerCalendarAdapter : HtmlCalendarAdapter { public override MobileCapabilities Device { get { return DesignerCapabilities.Instance; } } public override void Render(HtmlMobileTextWriter writer) { writer.WriteBeginTag("div"); String width = DesignerAdapterUtil.GetWidth(Control); writer.WriteAttribute("style", "cellpadding=2px;width:" + width); Alignment alignment = (Alignment)Style[Style.AlignmentKey, true]; if (alignment != Alignment.NotSet) { writer.WriteAttribute("align", Enum.GetName(typeof(Alignment), alignment)); } writer.Write("/>"); ((DesignerTextWriter)writer).EnterZeroFontSizeTag(); //Note: Although this is an internal method of runtime, but it is still // pretty easy to achieve the same goal without using this method. Style.ApplyTo(Control.WebCalendar); base.Render(writer); ((DesignerTextWriter)writer).ExitZeroFontSizeTag(); writer.WriteEndTag("div"); } } } // 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
- FixedLineResult.cs
- Literal.cs
- TabControl.cs
- DebugManager.cs
- WorkflowIdleBehavior.cs
- wgx_render.cs
- PngBitmapDecoder.cs
- FieldAccessException.cs
- BuildDependencySet.cs
- ChangeInterceptorAttribute.cs
- TypeCodeDomSerializer.cs
- MarkupCompiler.cs
- OracleConnectionFactory.cs
- PopOutPanel.cs
- CloudCollection.cs
- IResourceProvider.cs
- DataGridViewRowHeaderCell.cs
- DropSource.cs
- HtmlCommandAdapter.cs
- DesignTimeTemplateParser.cs
- RegistryKey.cs
- PropertyValueChangedEvent.cs
- DodSequenceMerge.cs
- Activity.cs
- TextFragmentEngine.cs
- SmiXetterAccessMap.cs
- SQLByteStorage.cs
- IPHostEntry.cs
- CachingParameterInspector.cs
- UiaCoreApi.cs
- ObjectView.cs
- RangeValidator.cs
- XmlSchemaAnnotated.cs
- CharKeyFrameCollection.cs
- ContainerVisual.cs
- ColumnWidthChangingEvent.cs
- SetterBase.cs
- DoubleAnimationClockResource.cs
- DataSourceGeneratorException.cs
- WindowsTokenRoleProvider.cs
- SqlDuplicator.cs
- HtmlInputPassword.cs
- ISCIIEncoding.cs
- UnsettableComboBox.cs
- SafeProcessHandle.cs
- EditorPartChrome.cs
- GroupJoinQueryOperator.cs
- InputLanguageEventArgs.cs
- MetadataItem.cs
- NativeCompoundFileAPIs.cs
- Form.cs
- ContainerUIElement3D.cs
- StylusOverProperty.cs
- WebScriptServiceHost.cs
- ServiceRoute.cs
- WebPartCloseVerb.cs
- ShutDownListener.cs
- PersonalizationStateInfo.cs
- DetailsViewUpdatedEventArgs.cs
- TableLayoutRowStyleCollection.cs
- FunctionDetailsReader.cs
- SHA256Managed.cs
- BitmapImage.cs
- SQLByte.cs
- Byte.cs
- Tool.cs
- BuildProviderInstallComponent.cs
- FileInfo.cs
- UTF32Encoding.cs
- invalidudtexception.cs
- TextFormattingConverter.cs
- CultureInfoConverter.cs
- StringFreezingAttribute.cs
- CqlWriter.cs
- MouseActionConverter.cs
- OverlappedAsyncResult.cs
- SR.cs
- ArglessEventHandlerProxy.cs
- XmlSchemaIdentityConstraint.cs
- DataGridViewBand.cs
- HierarchicalDataBoundControl.cs
- SslStream.cs
- DrawingDrawingContext.cs
- UnsafeNativeMethods.cs
- DBSqlParserColumn.cs
- WinFormsComponentEditor.cs
- Delay.cs
- NetSectionGroup.cs
- AnnotationStore.cs
- ToolStripDropTargetManager.cs
- BitmapSourceSafeMILHandle.cs
- SR.cs
- HideDisabledControlAdapter.cs
- ContentElement.cs
- precedingsibling.cs
- Pair.cs
- PolyQuadraticBezierSegment.cs
- ConfigXmlDocument.cs
- DoubleLinkList.cs
- InstancePersistenceContext.cs