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
- EdgeModeValidation.cs
- Line.cs
- XPathMultyIterator.cs
- XmlCollation.cs
- ShaperBuffers.cs
- DesignTimeVisibleAttribute.cs
- DataListItemCollection.cs
- SQLInt32.cs
- IpcServerChannel.cs
- ChildDocumentBlock.cs
- GroupLabel.cs
- WebPermission.cs
- GrammarBuilderWildcard.cs
- NavigatorInput.cs
- WebScriptEndpointElement.cs
- DataGridViewImageCell.cs
- LeaseManager.cs
- ThemeDirectoryCompiler.cs
- CommandArguments.cs
- COM2FontConverter.cs
- ResourceSetExpression.cs
- EdmComplexTypeAttribute.cs
- DescendentsWalker.cs
- BezierSegment.cs
- ListViewCancelEventArgs.cs
- RemoteHelper.cs
- OdbcParameter.cs
- AppDomain.cs
- EndPoint.cs
- TabItemWrapperAutomationPeer.cs
- ProxyHelper.cs
- ConnectionPoolManager.cs
- GridItemCollection.cs
- RouteValueDictionary.cs
- Int32Collection.cs
- ActiveXHelper.cs
- ExpressionWriter.cs
- RelationshipConverter.cs
- StringPropertyBuilder.cs
- DrawItemEvent.cs
- AgileSafeNativeMemoryHandle.cs
- UniqueConstraint.cs
- XmlWriter.cs
- InfocardChannelParameter.cs
- CodePageUtils.cs
- SettingsPropertyNotFoundException.cs
- ProtectedProviderSettings.cs
- VectorCollectionValueSerializer.cs
- PrePrepareMethodAttribute.cs
- CookieProtection.cs
- SmiEventSink.cs
- DrawingContext.cs
- WebBrowserContainer.cs
- Encoder.cs
- HostingEnvironment.cs
- SqlCommandSet.cs
- BuildTopDownAttribute.cs
- DialogBaseForm.cs
- CardSpaceShim.cs
- TransactionInterop.cs
- GeometryValueSerializer.cs
- DataSetUtil.cs
- WrapPanel.cs
- InstalledFontCollection.cs
- CriticalHandle.cs
- PartialTrustVisibleAssembly.cs
- FileChangesMonitor.cs
- BitmapFrameDecode.cs
- SiteMapSection.cs
- TiffBitmapEncoder.cs
- JobPageOrder.cs
- ConfigurationStrings.cs
- DocobjHost.cs
- CodeTypeReferenceSerializer.cs
- EnumValAlphaComparer.cs
- FieldBuilder.cs
- BamlVersionHeader.cs
- Exceptions.cs
- GenericTextProperties.cs
- SqlGenericUtil.cs
- ProxyWebPart.cs
- TextEncodedRawTextWriter.cs
- CombinedGeometry.cs
- SafeRightsManagementHandle.cs
- ProtocolViolationException.cs
- AuthenticationModuleElementCollection.cs
- TableCell.cs
- XamlTreeBuilderBamlRecordWriter.cs
- RecordBuilder.cs
- dataSvcMapFileLoader.cs
- HostTimeoutsElement.cs
- FolderBrowserDialog.cs
- UIPropertyMetadata.cs
- ClusterSafeNativeMethods.cs
- HGlobalSafeHandle.cs
- ISessionStateStore.cs
- ObjectDataProvider.cs
- ArcSegment.cs
- Matrix3D.cs
- TrackBar.cs