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
- NameObjectCollectionBase.cs
- DrawingBrush.cs
- ChildChangedEventArgs.cs
- HwndSource.cs
- SerialErrors.cs
- CheckBoxList.cs
- InternalConfigSettingsFactory.cs
- EventLogEntry.cs
- CssTextWriter.cs
- formatstringdialog.cs
- XsltContext.cs
- WorkflowDesignerColors.cs
- Annotation.cs
- SqlCommandSet.cs
- Repeater.cs
- BufferedGraphics.cs
- FontWeights.cs
- MappedMetaModel.cs
- StickyNoteHelper.cs
- Literal.cs
- EditorPartChrome.cs
- DataGridHeaderBorder.cs
- Style.cs
- SortFieldComparer.cs
- GridViewSelectEventArgs.cs
- WebPartZone.cs
- contentDescriptor.cs
- SQLInt16.cs
- UnsafeNativeMethods.cs
- GradientPanel.cs
- ListBindingConverter.cs
- FormsAuthentication.cs
- FormsIdentity.cs
- EntryIndex.cs
- ReferenceAssemblyAttribute.cs
- IResourceProvider.cs
- ValidationRule.cs
- ContextStaticAttribute.cs
- PlanCompilerUtil.cs
- MultiSelectRootGridEntry.cs
- HostAdapter.cs
- ResourcesBuildProvider.cs
- _CacheStreams.cs
- OleDbStruct.cs
- BindingValueChangedEventArgs.cs
- CodeCommentStatementCollection.cs
- Int32Animation.cs
- VisualStateManager.cs
- WindowPattern.cs
- HtmlMeta.cs
- XhtmlConformanceSection.cs
- ArraySet.cs
- SourceCollection.cs
- TextFormatterImp.cs
- TextDataBindingHandler.cs
- HMACSHA384.cs
- XamlToRtfParser.cs
- ListViewContainer.cs
- ModelFactory.cs
- CodeIdentifier.cs
- PngBitmapEncoder.cs
- CompressionTracing.cs
- XmlTextWriter.cs
- ServiceControllerDesigner.cs
- MediaPlayer.cs
- StringToken.cs
- ComponentChangedEvent.cs
- LabelLiteral.cs
- RegexWriter.cs
- InternalSendMessage.cs
- FileChangesMonitor.cs
- cookieexception.cs
- WebPartHeaderCloseVerb.cs
- IdentityNotMappedException.cs
- RedBlackList.cs
- KeyedQueue.cs
- TypeResolver.cs
- DateTimeFormatInfo.cs
- ColumnResizeAdorner.cs
- VirtualizingStackPanel.cs
- TagPrefixCollection.cs
- DependencySource.cs
- HttpContextWrapper.cs
- DesignTimeVisibleAttribute.cs
- PropertyKey.cs
- IOException.cs
- DebugHandleTracker.cs
- EventLogPermissionEntry.cs
- ControlPropertyNameConverter.cs
- DragCompletedEventArgs.cs
- MenuItemStyleCollectionEditor.cs
- EntityType.cs
- TextPattern.cs
- ColorKeyFrameCollection.cs
- DispatchWrapper.cs
- UICuesEvent.cs
- _HeaderInfo.cs
- ExceptionHelpers.cs
- RegexMatch.cs
- OletxDependentTransaction.cs