Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Controls / StyleSelector.cs / 1305600 / StyleSelector.cs
//---------------------------------------------------------------------------- // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // Description: StyleSelector allows the app writer to provide custom style selection logic. // // Specs: http://avalon/connecteddata/M5%20General%20Docs/Data%20Styling.mht // //--------------------------------------------------------------------------- using System.Windows.Shapes; using System.Windows.Media; using System.Windows.Data; using System.ComponentModel; using System; namespace System.Windows.Controls { ////// public class StyleSelector { ////// StyleSelector allows the app writer to provide custom style selection logic. /// For example, with a class Bug as the Content, /// use a particular style for Pri1 bugs and a different style for Pri2 bugs. ///
////// An application writer can override the SelectStyle method in a derived /// selector class and assign an instance of this class to the StyleSelector property on ///
///class. /// /// Override this method to return an app specific /// The data content /// The element to which the style will be applied ///. /// an app-specific style to apply, or null. public virtual Style SelectStyle(object item, DependencyObject container) { return null; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //---------------------------------------------------------------------------- // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // Description: StyleSelector allows the app writer to provide custom style selection logic. // // Specs: http://avalon/connecteddata/M5%20General%20Docs/Data%20Styling.mht // //--------------------------------------------------------------------------- using System.Windows.Shapes; using System.Windows.Media; using System.Windows.Data; using System.ComponentModel; using System; namespace System.Windows.Controls { ////// public class StyleSelector { ////// StyleSelector allows the app writer to provide custom style selection logic. /// For example, with a class Bug as the Content, /// use a particular style for Pri1 bugs and a different style for Pri2 bugs. ///
////// An application writer can override the SelectStyle method in a derived /// selector class and assign an instance of this class to the StyleSelector property on ///
///class. /// /// Override this method to return an app specific /// The data content /// The element to which the style will be applied ///. /// an app-specific style to apply, or null. public virtual Style SelectStyle(object item, DependencyObject container) { return null; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ClientCredentialsSecurityTokenManager.cs
- TableLayoutRowStyleCollection.cs
- TimeSpanMinutesOrInfiniteConverter.cs
- OuterGlowBitmapEffect.cs
- DrawingContextWalker.cs
- GenericPrincipal.cs
- TypeUtil.cs
- ServiceHost.cs
- FrameworkElementFactoryMarkupObject.cs
- XmlTextEncoder.cs
- Volatile.cs
- TextStore.cs
- AccessKeyManager.cs
- ContextStaticAttribute.cs
- EmptyWithCancelationCheckWorkItem.cs
- Base64Encoder.cs
- XmlArrayAttribute.cs
- DataKeyArray.cs
- DataServiceBehavior.cs
- FontUnitConverter.cs
- CodeStatementCollection.cs
- HwndMouseInputProvider.cs
- ListBoxAutomationPeer.cs
- PasswordRecoveryAutoFormat.cs
- EmptyEnumerator.cs
- ApplicationFileParser.cs
- DataListCommandEventArgs.cs
- AsyncPostBackTrigger.cs
- DataContractSet.cs
- InlineUIContainer.cs
- basenumberconverter.cs
- MimeTypeAttribute.cs
- DataGridDesigner.cs
- SqlDependencyUtils.cs
- PerformanceCounterPermission.cs
- PropertyEmitterBase.cs
- EntityAdapter.cs
- SrgsElement.cs
- C14NUtil.cs
- PerspectiveCamera.cs
- SqlAggregateChecker.cs
- EditorBrowsableAttribute.cs
- SequenceDesignerAccessibleObject.cs
- BinaryReader.cs
- WebPartDisplayModeCollection.cs
- HGlobalSafeHandle.cs
- XmlNodeReader.cs
- ServiceElement.cs
- BatchParser.cs
- Splitter.cs
- ScriptControlManager.cs
- HMACMD5.cs
- WindowsToolbarAsMenu.cs
- SR.cs
- Int32Animation.cs
- XmlSchemaObject.cs
- XsltSettings.cs
- XmlDataProvider.cs
- Asn1IntegerConverter.cs
- TrackingMemoryStreamFactory.cs
- XmlQueryCardinality.cs
- ConfigurationPropertyAttribute.cs
- XPathMessageFilterElement.cs
- UserControlBuildProvider.cs
- PagesChangedEventArgs.cs
- WebPartDescription.cs
- FormDesigner.cs
- EnumBuilder.cs
- EventItfInfo.cs
- PolicyManager.cs
- Pool.cs
- Parser.cs
- TreeBuilderXamlTranslator.cs
- InternalControlCollection.cs
- WpfGeneratedKnownTypes.cs
- WebPartTransformerAttribute.cs
- BinaryMethodMessage.cs
- DataGridParentRows.cs
- GrammarBuilderDictation.cs
- ProtocolsSection.cs
- SchemaNamespaceManager.cs
- RegistrySecurity.cs
- EventPrivateKey.cs
- SqlMetaData.cs
- HttpWrapper.cs
- Paragraph.cs
- ScanQueryOperator.cs
- SequenceDesigner.xaml.cs
- Simplifier.cs
- XPathEmptyIterator.cs
- StyleXamlParser.cs
- ManipulationPivot.cs
- GeneralTransformGroup.cs
- ItemCheckEvent.cs
- UnsafeNativeMethodsCLR.cs
- EnterpriseServicesHelper.cs
- KnownIds.cs
- DelimitedListTraceListener.cs
- DataTableMapping.cs
- OleDbDataAdapter.cs