Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / Core / CSharp / System / Windows / FontStyles.cs / 1 / FontStyles.cs
//---------------------------------------------------------------------------- // // Copyright (c) Microsoft Corporation. All rights reserved. // // Description: Predefined FontStyle structures that correspond to common font styles. // // History: // 01/25/2005 mleonov - Created constants from FontStyle enum values. // //--------------------------------------------------------------------------- using System; using System.Globalization; namespace System.Windows { ////// FontStyles contains predefined font style structures for common font styles. /// public static class FontStyles { ////// Predefined font style : Normal. /// public static FontStyle Normal { get { return new FontStyle(0); } } ////// Predefined font style : Oblique. /// public static FontStyle Oblique { get { return new FontStyle(1); } } ////// Predefined font style : Italic. /// public static FontStyle Italic { get { return new FontStyle(2); } } internal static bool FontStyleStringToKnownStyle(string s, IFormatProvider provider, ref FontStyle fontStyle) { if (s.Equals("Normal", StringComparison.OrdinalIgnoreCase)) { fontStyle = FontStyles.Normal; return true; } if (s.Equals("Italic", StringComparison.OrdinalIgnoreCase)) { fontStyle = FontStyles.Italic; return true; } if (s.Equals("Oblique", StringComparison.OrdinalIgnoreCase)) { fontStyle = FontStyles.Oblique; return true; } return false; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //---------------------------------------------------------------------------- // // Copyright (c) Microsoft Corporation. All rights reserved. // // Description: Predefined FontStyle structures that correspond to common font styles. // // History: // 01/25/2005 mleonov - Created constants from FontStyle enum values. // //--------------------------------------------------------------------------- using System; using System.Globalization; namespace System.Windows { ////// FontStyles contains predefined font style structures for common font styles. /// public static class FontStyles { ////// Predefined font style : Normal. /// public static FontStyle Normal { get { return new FontStyle(0); } } ////// Predefined font style : Oblique. /// public static FontStyle Oblique { get { return new FontStyle(1); } } ////// Predefined font style : Italic. /// public static FontStyle Italic { get { return new FontStyle(2); } } internal static bool FontStyleStringToKnownStyle(string s, IFormatProvider provider, ref FontStyle fontStyle) { if (s.Equals("Normal", StringComparison.OrdinalIgnoreCase)) { fontStyle = FontStyles.Normal; return true; } if (s.Equals("Italic", StringComparison.OrdinalIgnoreCase)) { fontStyle = FontStyles.Italic; return true; } if (s.Equals("Oblique", StringComparison.OrdinalIgnoreCase)) { fontStyle = FontStyles.Oblique; return true; } return false; } } } // 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
- ListViewAutomationPeer.cs
- AdapterUtil.cs
- HttpCachePolicyElement.cs
- RepeaterDesigner.cs
- RouteCollection.cs
- SqlWorkflowInstanceStoreLock.cs
- DataControlField.cs
- ConfigurationPermission.cs
- DataGridViewRowStateChangedEventArgs.cs
- ApplicationFileParser.cs
- EntityDataSourceMemberPath.cs
- FlowLayoutPanel.cs
- StateBag.cs
- PropertyReferenceExtension.cs
- TimelineCollection.cs
- EventLogInformation.cs
- DataSourceCacheDurationConverter.cs
- BitmapCodecInfoInternal.cs
- AccessorTable.cs
- ElementsClipboardData.cs
- ExpressionPrinter.cs
- PeerResolver.cs
- ISAPIRuntime.cs
- EntityProxyFactory.cs
- OleCmdHelper.cs
- CodeObjectCreateExpression.cs
- InputMethodStateChangeEventArgs.cs
- EntityViewGenerator.cs
- EventRouteFactory.cs
- BoundColumn.cs
- MobileControl.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- BinaryConverter.cs
- CodeNamespaceImportCollection.cs
- Endpoint.cs
- AQNBuilder.cs
- Errors.cs
- AutoGeneratedFieldProperties.cs
- SettingsSection.cs
- LineUtil.cs
- SHA1CryptoServiceProvider.cs
- XPathPatternParser.cs
- DataPager.cs
- ServiceBuildProvider.cs
- EnumerableCollectionView.cs
- TypeRefElement.cs
- PropertyGridCommands.cs
- AlternationConverter.cs
- RegisteredExpandoAttribute.cs
- Brush.cs
- EdmFunction.cs
- SqlTrackingService.cs
- ContentValidator.cs
- FtpWebResponse.cs
- GuidConverter.cs
- DependencyPropertyAttribute.cs
- RecommendedAsConfigurableAttribute.cs
- MediaEntryAttribute.cs
- COM2ComponentEditor.cs
- TableCellCollection.cs
- ClientTarget.cs
- ISAPIRuntime.cs
- WorkflowMarkupSerializationProvider.cs
- Stacktrace.cs
- ObjectComplexPropertyMapping.cs
- DictionarySectionHandler.cs
- SiteMapHierarchicalDataSourceView.cs
- PrintDialog.cs
- WebBrowsableAttribute.cs
- RtType.cs
- ItemDragEvent.cs
- PersonalizationState.cs
- CannotUnloadAppDomainException.cs
- UiaCoreApi.cs
- StylusShape.cs
- XpsFilter.cs
- ButtonChrome.cs
- CompilerInfo.cs
- BindingExpressionUncommonField.cs
- CancellationScope.cs
- SharedPerformanceCounter.cs
- XmlIlVisitor.cs
- InheritedPropertyChangedEventArgs.cs
- SiteMapSection.cs
- TypeForwardedFromAttribute.cs
- QueryExpr.cs
- SelectionProcessor.cs
- SoapReflectionImporter.cs
- DocumentViewerConstants.cs
- TemplateLookupAction.cs
- ImmutableObjectAttribute.cs
- XmlSchemaExporter.cs
- NetTcpSectionData.cs
- selecteditemcollection.cs
- DescendantQuery.cs
- ConfigurationSectionCollection.cs
- OLEDB_Enum.cs
- CallbackValidatorAttribute.cs
- UniqueEventHelper.cs
- AlphabeticalEnumConverter.cs