Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / FontStyles.cs / 1305600 / 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
- remotingproxy.cs
- StringPropertyBuilder.cs
- Paragraph.cs
- Thumb.cs
- ErrorWrapper.cs
- DesignerCalendarAdapter.cs
- AdCreatedEventArgs.cs
- ColorPalette.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- NativeMethods.cs
- TextDecorationCollection.cs
- ControlValuePropertyAttribute.cs
- ReferencedCollectionType.cs
- ConstNode.cs
- XPathScanner.cs
- CredentialSelector.cs
- NameSpaceExtractor.cs
- BaseCodePageEncoding.cs
- XmlAttributeProperties.cs
- OdbcCommand.cs
- AssertFilter.cs
- MessageDecoder.cs
- WsdlBuildProvider.cs
- MemberHolder.cs
- FontFamilyConverter.cs
- BindableAttribute.cs
- AllMembershipCondition.cs
- ManipulationStartedEventArgs.cs
- AssociatedControlConverter.cs
- StatusCommandUI.cs
- RuleInfoComparer.cs
- __Error.cs
- CallbackValidator.cs
- WebPartConnectionsCancelVerb.cs
- TextControl.cs
- NavigationPropertyEmitter.cs
- HyperLink.cs
- IDReferencePropertyAttribute.cs
- RegexTree.cs
- MarkupCompilePass2.cs
- LinqToSqlWrapper.cs
- Privilege.cs
- TableCellAutomationPeer.cs
- SqlCacheDependency.cs
- FontSourceCollection.cs
- SoapSchemaExporter.cs
- HttpResponse.cs
- OlePropertyStructs.cs
- ServiceOperationWrapper.cs
- BitVec.cs
- WebPartZoneDesigner.cs
- Errors.cs
- SemaphoreFullException.cs
- SubtreeProcessor.cs
- OneOfElement.cs
- IgnoreDeviceFilterElementCollection.cs
- GradientStop.cs
- SchemaElementDecl.cs
- EventMap.cs
- FontSizeConverter.cs
- InvalidDataException.cs
- PathGradientBrush.cs
- DataGridToolTip.cs
- PerformanceCounterScope.cs
- IndexedString.cs
- AssociationTypeEmitter.cs
- TaskFileService.cs
- TextSelection.cs
- UpDownEvent.cs
- ObjectItemAssemblyLoader.cs
- XmlBinaryWriterSession.cs
- ServiceChannelManager.cs
- EntityDataSourceView.cs
- WsatProxy.cs
- BinaryConverter.cs
- Context.cs
- NativeObjectSecurity.cs
- DataSourceSelectArguments.cs
- COM2FontConverter.cs
- ThemeConfigurationDialog.cs
- ContentPathSegment.cs
- FrameworkRichTextComposition.cs
- DataObject.cs
- DSACryptoServiceProvider.cs
- ScrollContentPresenter.cs
- FragmentQuery.cs
- DynamicValueConverter.cs
- StylusCaptureWithinProperty.cs
- SqlInfoMessageEvent.cs
- SystemIcmpV4Statistics.cs
- SelectedDatesCollection.cs
- InternalPermissions.cs
- Int16AnimationUsingKeyFrames.cs
- VectorAnimationUsingKeyFrames.cs
- GlyphTypeface.cs
- HotSpot.cs
- FormsAuthenticationCredentials.cs
- PropertyMetadata.cs
- StringPropertyBuilder.cs
- TableTextElementCollectionInternal.cs