Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / WebForms / System / Web / UI / Design / ColorBuilder.cs / 1 / ColorBuilder.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.Design { using System; using System.ComponentModel; using System.Diagnostics; ////// /// Helper class used by designers to 'build' color properties by /// launching a color picker. /// [System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand, Flags=System.Security.Permissions.SecurityPermissionFlag.UnmanagedCode)] public sealed class ColorBuilder { private ColorBuilder() { } ////// /// Launches the Color Picker to build a color. /// public static string BuildColor(IComponent component, System.Windows.Forms.Control owner, string initialColor) { string result = null; ISite componentSite = component.Site; Debug.Assert(componentSite != null, "Component does not have a valid site."); if (componentSite == null) { Debug.Fail("Component does not have a valid site."); return null; } if (componentSite != null) { IWebFormsBuilderUIService builderService = (IWebFormsBuilderUIService)componentSite.GetService(typeof(IWebFormsBuilderUIService)); if (builderService != null) { result = builderService.BuildColor(owner, initialColor); } } return result; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- MutexSecurity.cs
- XamlSerializationHelper.cs
- WrapPanel.cs
- RightNameExpirationInfoPair.cs
- TreeViewItem.cs
- DataGrid.cs
- HtmlShim.cs
- NullableDecimalMinMaxAggregationOperator.cs
- UnmanagedMemoryStream.cs
- PeerApplicationLaunchInfo.cs
- DesignSurfaceCollection.cs
- TimersDescriptionAttribute.cs
- ImageField.cs
- GC.cs
- Shape.cs
- PeerCollaboration.cs
- DoubleUtil.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- RuleCache.cs
- SecureStringHasher.cs
- VirtualPath.cs
- HttpRawResponse.cs
- TreeChangeInfo.cs
- Error.cs
- AuthenticationModuleElementCollection.cs
- TypeContext.cs
- PageThemeParser.cs
- TreeNodeCollection.cs
- GeneralTransform3DTo2D.cs
- HttpHandlerAction.cs
- ParameterElement.cs
- Int64.cs
- SendMessageContent.cs
- ColumnBinding.cs
- ColorConvertedBitmapExtension.cs
- ConfigurationLocationCollection.cs
- HashMembershipCondition.cs
- ProcessHost.cs
- CustomAssemblyResolver.cs
- SpellerError.cs
- TableChangeProcessor.cs
- WhitespaceRule.cs
- LinkLabelLinkClickedEvent.cs
- NetNamedPipeSecurity.cs
- basenumberconverter.cs
- StylusButtonCollection.cs
- SystemUnicastIPAddressInformation.cs
- ConnectorSelectionGlyph.cs
- AVElementHelper.cs
- OciLobLocator.cs
- ObjectTypeMapping.cs
- SecurityTokenInclusionMode.cs
- InputLanguageCollection.cs
- ExpressionBuilderCollection.cs
- FontFamily.cs
- ViewKeyConstraint.cs
- ValidationRuleCollection.cs
- HttpApplication.cs
- TemplateBamlRecordReader.cs
- DataTableMappingCollection.cs
- JournalEntry.cs
- ToolStripDropDownMenu.cs
- StylusSystemGestureEventArgs.cs
- TypeExtensionSerializer.cs
- PropertyValueChangedEvent.cs
- RSACryptoServiceProvider.cs
- Win32Native.cs
- SqlExpressionNullability.cs
- DataTableTypeConverter.cs
- GeneralTransform3DCollection.cs
- OleAutBinder.cs
- RuntimeHandles.cs
- CoreSwitches.cs
- DataListCommandEventArgs.cs
- InstanceNormalEvent.cs
- SafeNativeMethods.cs
- PingReply.cs
- StylusPlugInCollection.cs
- SQLRoleProvider.cs
- DynamicDataRouteHandler.cs
- Message.cs
- DataServiceHostFactory.cs
- FileResponseElement.cs
- ToolboxItemFilterAttribute.cs
- MenuRendererStandards.cs
- NamedPipeConnectionPool.cs
- WebPartConnection.cs
- KnownTypesProvider.cs
- ChannelRequirements.cs
- ListenerElementsCollection.cs
- PrimaryKeyTypeConverter.cs
- ControlIdConverter.cs
- ToolStripGripRenderEventArgs.cs
- HttpWriter.cs
- ItemAutomationPeer.cs
- GlobalDataBindingHandler.cs
- SiteMapDesignerDataSourceView.cs
- UiaCoreApi.cs
- RegexBoyerMoore.cs
- WebScriptEndpointElement.cs