Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- XmlCDATASection.cs
- DynamicValidator.cs
- BitmapEffectState.cs
- DefaultTextStoreTextComposition.cs
- NamedElement.cs
- TextInfo.cs
- TextBoxRenderer.cs
- TrackingMemoryStreamFactory.cs
- ReadOnlyHierarchicalDataSourceView.cs
- BaseDataBoundControl.cs
- XamlContextStack.cs
- StreamMarshaler.cs
- DesignerHierarchicalDataSourceView.cs
- ServiceDescriptionImporter.cs
- SoapEnumAttribute.cs
- Int64Converter.cs
- ProtocolImporter.cs
- BuildProviderAppliesToAttribute.cs
- MissingFieldException.cs
- TaskFormBase.cs
- PropertyItemInternal.cs
- ValidateNames.cs
- SQLGuid.cs
- VisualStateManager.cs
- WindowManager.cs
- TempEnvironment.cs
- Models.cs
- ToolStripDropTargetManager.cs
- COM2IPerPropertyBrowsingHandler.cs
- KnownTypesHelper.cs
- DebuggerService.cs
- SkewTransform.cs
- JournalEntryStack.cs
- DeclarativeCatalogPart.cs
- InstanceData.cs
- EntityTypeBase.cs
- WebPartMenu.cs
- DocumentViewerBaseAutomationPeer.cs
- PortCache.cs
- ProxyGenerator.cs
- XamlToRtfWriter.cs
- RoleService.cs
- RecordConverter.cs
- RoutedEvent.cs
- XmlILConstructAnalyzer.cs
- DataObject.cs
- XPathSelfQuery.cs
- Tile.cs
- UrlPropertyAttribute.cs
- ScrollChangedEventArgs.cs
- AmbiguousMatchException.cs
- XmlNullResolver.cs
- ConnectionConsumerAttribute.cs
- QuaternionAnimation.cs
- ServerIdentity.cs
- basecomparevalidator.cs
- XmlCollation.cs
- EdmType.cs
- ParagraphVisual.cs
- WebRequestModuleElementCollection.cs
- WeakReference.cs
- BoundColumn.cs
- ConnectionProviderAttribute.cs
- SqlDataSourceCustomCommandEditor.cs
- ActivationArguments.cs
- HScrollProperties.cs
- ListViewTableCell.cs
- SmtpNetworkElement.cs
- WriteFileContext.cs
- TextDecorationLocationValidation.cs
- ResourcePermissionBaseEntry.cs
- RangeValuePatternIdentifiers.cs
- AutomationPropertyInfo.cs
- DataGridCommandEventArgs.cs
- WebPartsPersonalization.cs
- WebPartZone.cs
- XmlSchemaImporter.cs
- RectAnimationBase.cs
- DictionaryItemsCollection.cs
- FeatureSupport.cs
- SafeRegistryKey.cs
- XmlArrayAttribute.cs
- ListItemCollection.cs
- EntityCommandDefinition.cs
- StringResourceManager.cs
- ContainerParaClient.cs
- OpenTypeCommon.cs
- WebBrowserHelper.cs
- ParseNumbers.cs
- ErrorWrapper.cs
- EntityClientCacheKey.cs
- DocumentReferenceCollection.cs
- RegionData.cs
- embossbitmapeffect.cs
- XMLUtil.cs
- ConnectionProviderAttribute.cs
- Point.cs
- UpdateCommand.cs
- DataGridViewRow.cs
- FileVersion.cs