Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / MIT / System / Web / UI / MobileControls / Design / Util / HeaderLabel.cs / 1305376 / HeaderLabel.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.Design.MobileControls.Util { using System; using System.Diagnostics; using System.Drawing; using System.Windows.Forms; [ 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 HeaderLabel : RichTextBox { private String _text; internal HeaderLabel() { BackColor = SystemColors.Control; BorderStyle = BorderStyle.None; WordWrap = true; ReadOnly = true; TabStop = false; ScrollBars = RichTextBoxScrollBars.None; VisibleChanged += new EventHandler(OnVisibleChanged); } protected override void OnContentsResized(ContentsResizedEventArgs e) { HeaderPanel headerPanel = Parent as HeaderPanel; Debug.Assert(headerPanel != null, "HeaderLabel should be placed inside of a HeaderPanel."); headerPanel.RequestNewHeight(this, e.NewRectangle.Height); base.OnContentsResized(e); } public override String Text { get { return _text; } set { _text = value; } } private void OnVisibleChanged(Object sender, EventArgs e) { if(Visible && _text != base.Text) { base.Text = _text; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.Design.MobileControls.Util { using System; using System.Diagnostics; using System.Drawing; using System.Windows.Forms; [ 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 HeaderLabel : RichTextBox { private String _text; internal HeaderLabel() { BackColor = SystemColors.Control; BorderStyle = BorderStyle.None; WordWrap = true; ReadOnly = true; TabStop = false; ScrollBars = RichTextBoxScrollBars.None; VisibleChanged += new EventHandler(OnVisibleChanged); } protected override void OnContentsResized(ContentsResizedEventArgs e) { HeaderPanel headerPanel = Parent as HeaderPanel; Debug.Assert(headerPanel != null, "HeaderLabel should be placed inside of a HeaderPanel."); headerPanel.RequestNewHeight(this, e.NewRectangle.Height); base.OnContentsResized(e); } public override String Text { get { return _text; } set { _text = value; } } private void OnVisibleChanged(Object sender, EventArgs e) { if(Visible && _text != base.Text) { base.Text = _text; } } } } // 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
- WindowsStatusBar.cs
- TrustLevelCollection.cs
- CollectionView.cs
- MailMessage.cs
- StrongName.cs
- RtfFormatStack.cs
- EmptyReadOnlyDictionaryInternal.cs
- recordstatefactory.cs
- Query.cs
- ZoneIdentityPermission.cs
- CellParaClient.cs
- FastPropertyAccessor.cs
- WindowsBrush.cs
- peernodeimplementation.cs
- OuterGlowBitmapEffect.cs
- Constraint.cs
- ValidationErrorCollection.cs
- SqlComparer.cs
- AmbientValueAttribute.cs
- CompiledELinqQueryState.cs
- ZoomPercentageConverter.cs
- MessageQueuePermission.cs
- ExpandSegmentCollection.cs
- Matrix3D.cs
- ListItemParagraph.cs
- GestureRecognizer.cs
- ReachDocumentPageSerializer.cs
- XmlIncludeAttribute.cs
- WorkflowHostingEndpoint.cs
- DiagnosticTraceRecords.cs
- IfElseDesigner.xaml.cs
- IgnoreFileBuildProvider.cs
- XmlSchemaRedefine.cs
- ControlPropertyNameConverter.cs
- SqlInternalConnectionTds.cs
- ProvideValueServiceProvider.cs
- SQLString.cs
- WeakReferenceList.cs
- Control.cs
- ScrollBar.cs
- BlockCollection.cs
- ErrorInfoXmlDocument.cs
- FixedSOMElement.cs
- PopupControlService.cs
- BinaryWriter.cs
- WebPartVerbsEventArgs.cs
- MobileTemplatedControlDesigner.cs
- ChannelReliableSession.cs
- ErrorProvider.cs
- UriParserTemplates.cs
- XmlQueryContext.cs
- FixedSOMFixedBlock.cs
- CompiledIdentityConstraint.cs
- StyleXamlParser.cs
- UserPreferenceChangingEventArgs.cs
- DoubleAverageAggregationOperator.cs
- UniqueIdentifierService.cs
- TcpHostedTransportConfiguration.cs
- TextWriterTraceListener.cs
- WinEventQueueItem.cs
- DataBoundControl.cs
- ContentPosition.cs
- Point3DValueSerializer.cs
- OleDbCommand.cs
- SspiSecurityTokenParameters.cs
- PersonalizationStateInfoCollection.cs
- LocatorManager.cs
- MatrixAnimationBase.cs
- XmlSchemaSimpleContent.cs
- WmlImageAdapter.cs
- XmlDeclaration.cs
- SiteMap.cs
- XsltContext.cs
- PropertyChangedEventArgs.cs
- CssClassPropertyAttribute.cs
- ObjectCache.cs
- SqlMethodTransformer.cs
- FunctionMappingTranslator.cs
- DataGridViewMethods.cs
- UnsafeNativeMethods.cs
- RealProxy.cs
- LocatorPartList.cs
- PointValueSerializer.cs
- PtsCache.cs
- _FtpDataStream.cs
- MenuStrip.cs
- EditableTreeList.cs
- VolatileResourceManager.cs
- TableRowCollection.cs
- WebConfigurationManager.cs
- DataGridPageChangedEventArgs.cs
- CallSiteHelpers.cs
- AssociationSetEnd.cs
- SqlCaseSimplifier.cs
- WpfXamlLoader.cs
- ServiceDescription.cs
- FileLogRecordStream.cs
- HiddenFieldDesigner.cs
- ClientUrlResolverWrapper.cs
- ByteRangeDownloader.cs