Code:
/ 4.0 / 4.0 / untmp / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SemanticBasicElement.cs
- WebServiceClientProxyGenerator.cs
- CachedPathData.cs
- LogicalChannel.cs
- TargetControlTypeAttribute.cs
- PeerCollaboration.cs
- _AutoWebProxyScriptWrapper.cs
- EntityStoreSchemaGenerator.cs
- AutomationPropertyInfo.cs
- MeasureItemEvent.cs
- InlineObject.cs
- ApplicationTrust.cs
- DataBinder.cs
- CompositeScriptReference.cs
- CacheHelper.cs
- ListMarkerLine.cs
- COM2IDispatchConverter.cs
- InputScope.cs
- EntityDataSourceDesigner.cs
- GZipDecoder.cs
- ServiceContractViewControl.Designer.cs
- ZipIOExtraFieldElement.cs
- EnlistmentTraceIdentifier.cs
- ObjectDataSourceMethodEventArgs.cs
- ErrorStyle.cs
- ApplicationTrust.cs
- FragmentQuery.cs
- InputScopeConverter.cs
- NativeMethods.cs
- DataGridViewAutoSizeColumnsModeEventArgs.cs
- Filter.cs
- FastEncoder.cs
- DbProviderConfigurationHandler.cs
- ScriptResourceInfo.cs
- BroadcastEventHelper.cs
- BuildTopDownAttribute.cs
- EnumBuilder.cs
- XmlSchemaNotation.cs
- ListBoxItemAutomationPeer.cs
- SemaphoreSecurity.cs
- GrammarBuilderDictation.cs
- SQLResource.cs
- CodeSubDirectory.cs
- NameObjectCollectionBase.cs
- XPathLexer.cs
- RadioButtonStandardAdapter.cs
- XsltCompileContext.cs
- CommandBinding.cs
- ExceptionCollection.cs
- DBPropSet.cs
- PositiveTimeSpanValidatorAttribute.cs
- WindowsBrush.cs
- SerializerWriterEventHandlers.cs
- linebase.cs
- TextParagraphProperties.cs
- ListBoxItemWrapperAutomationPeer.cs
- ConnectionProviderAttribute.cs
- FileUpload.cs
- SpeechAudioFormatInfo.cs
- CqlQuery.cs
- XmlNodeWriter.cs
- DataGridCheckBoxColumn.cs
- SortQueryOperator.cs
- SectionUpdates.cs
- ColorAnimationUsingKeyFrames.cs
- ExtendedPropertyDescriptor.cs
- FormatConvertedBitmap.cs
- ValueProviderWrapper.cs
- UInt32Converter.cs
- TextTreeInsertElementUndoUnit.cs
- PropertiesTab.cs
- CodeAssignStatement.cs
- XmlDocumentFragment.cs
- MailAddressCollection.cs
- Button.cs
- SerializableAttribute.cs
- TextServicesDisplayAttribute.cs
- CompositeActivityCodeGenerator.cs
- ComponentManagerBroker.cs
- Line.cs
- SQLBinaryStorage.cs
- RepeatInfo.cs
- RepeaterItemCollection.cs
- InvalidCommandTreeException.cs
- TreeNodeCollectionEditor.cs
- User.cs
- Semaphore.cs
- SecurityTokenProvider.cs
- WebControlParameterProxy.cs
- IpcClientManager.cs
- AutomationTextAttribute.cs
- NavigatorInput.cs
- WebControlParameterProxy.cs
- LogRecordSequence.cs
- OleDbFactory.cs
- XmlNamedNodeMap.cs
- CellCreator.cs
- PathGradientBrush.cs
- DataFieldCollectionEditor.cs
- TimeSpanConverter.cs