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
- ReflectionTypeLoadException.cs
- SchemaSetCompiler.cs
- Size3DConverter.cs
- DbDataRecord.cs
- HttpWebResponse.cs
- WindowsTokenRoleProvider.cs
- SchemaName.cs
- ResourceDisplayNameAttribute.cs
- HwndHost.cs
- TrackingMemoryStream.cs
- SyndicationDeserializer.cs
- ResourceLoader.cs
- TextParentUndoUnit.cs
- formatter.cs
- Nullable.cs
- HyperlinkAutomationPeer.cs
- RoutingUtilities.cs
- SynchronizingStream.cs
- Attributes.cs
- SqlDataSourceQueryEditorForm.cs
- BoundingRectTracker.cs
- CellParagraph.cs
- BooleanToVisibilityConverter.cs
- WorkflowCreationContext.cs
- NameTable.cs
- ValueTypeFixupInfo.cs
- Hyperlink.cs
- DispatcherExceptionFilterEventArgs.cs
- DateBoldEvent.cs
- DelegateSerializationHolder.cs
- StackOverflowException.cs
- XmlSchemaSequence.cs
- ComPlusSynchronizationContext.cs
- Compiler.cs
- ConfigurationSectionGroup.cs
- ScriptingRoleServiceSection.cs
- SqlProvider.cs
- NameTable.cs
- ApplicationSecurityInfo.cs
- PartitionResolver.cs
- AlternateViewCollection.cs
- RelationshipConverter.cs
- XmlSchemaComplexContentRestriction.cs
- ReadOnlyDataSourceView.cs
- String.cs
- JsonDataContract.cs
- ProcessHost.cs
- PlainXmlSerializer.cs
- XslUrlEditor.cs
- BindingUtils.cs
- BezierSegment.cs
- Label.cs
- CompilerError.cs
- TypeConverter.cs
- ContainerActivationHelper.cs
- DependentList.cs
- WindowsTooltip.cs
- CheckBoxPopupAdapter.cs
- DecimalConverter.cs
- SQLSingle.cs
- OleDbPermission.cs
- ContainerFilterService.cs
- HeaderCollection.cs
- ListDataBindEventArgs.cs
- WebResourceAttribute.cs
- TraceListeners.cs
- ProcessingInstructionAction.cs
- ContractValidationHelper.cs
- ListViewDesigner.cs
- ContextMenu.cs
- PageClientProxyGenerator.cs
- Constraint.cs
- OutputCacheSection.cs
- DesignerActionTextItem.cs
- DataControlImageButton.cs
- LayoutEvent.cs
- BitStack.cs
- LongTypeConverter.cs
- PeerToPeerException.cs
- Clause.cs
- ListenerElementsCollection.cs
- ListBox.cs
- lengthconverter.cs
- WebColorConverter.cs
- UndoManager.cs
- QueryRewriter.cs
- SelectionWordBreaker.cs
- XmlNamedNodeMap.cs
- SafeNativeMethodsOther.cs
- __ConsoleStream.cs
- SqlClientFactory.cs
- XsltLibrary.cs
- LineBreakRecord.cs
- SocketInformation.cs
- PropertyPathConverter.cs
- ArrayList.cs
- WebException.cs
- XmlSchemaComplexContentRestriction.cs
- StopRoutingHandler.cs
- ErrorTableItemStyle.cs