Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / Framework / System / Windows / Controls / StyleSelector.cs / 1 / 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
- ExpressionNode.cs
- TabControl.cs
- SiteMapNodeCollection.cs
- NoneExcludedImageIndexConverter.cs
- TrackPointCollection.cs
- PartialCachingControl.cs
- ToolStripRendererSwitcher.cs
- TypeInitializationException.cs
- UpdateTracker.cs
- EncoderReplacementFallback.cs
- DataViewSettingCollection.cs
- EventMappingSettings.cs
- Shared.cs
- XmlSchemaExternal.cs
- Preprocessor.cs
- SourceCollection.cs
- TypeToTreeConverter.cs
- HttpCachePolicy.cs
- SystemUnicastIPAddressInformation.cs
- SqlNotificationRequest.cs
- PromptStyle.cs
- ComPlusThreadInitializer.cs
- QueryContinueDragEvent.cs
- BackgroundWorker.cs
- BitmapFrame.cs
- ColumnCollection.cs
- DataGridViewImageCell.cs
- SecurityUtils.cs
- SoapHeader.cs
- DataGridViewTopRowAccessibleObject.cs
- Variable.cs
- DataListDesigner.cs
- LogicalExpr.cs
- TypeUtils.cs
- OleAutBinder.cs
- Converter.cs
- ForeignConstraint.cs
- GuidTagList.cs
- UpdateRecord.cs
- odbcmetadatacollectionnames.cs
- Literal.cs
- ProcessHostMapPath.cs
- DbDataRecord.cs
- XamlTypeMapper.cs
- WindowInteropHelper.cs
- Vector3DKeyFrameCollection.cs
- MetafileHeaderWmf.cs
- PerfCounters.cs
- ObjectRef.cs
- ResourceProperty.cs
- DataViewListener.cs
- Geometry3D.cs
- OrderingInfo.cs
- ReadOnlyHierarchicalDataSource.cs
- TextParagraph.cs
- PointF.cs
- RichTextBoxAutomationPeer.cs
- FindCriteriaCD1.cs
- CallContext.cs
- BufferedGraphics.cs
- ToolStripScrollButton.cs
- ViewSimplifier.cs
- WebPartRestoreVerb.cs
- Flowchart.cs
- cookiecollection.cs
- HuffmanTree.cs
- GetCertificateRequest.cs
- XamlContextStack.cs
- ActionNotSupportedException.cs
- InstanceData.cs
- HttpResponse.cs
- RuntimeCompatibilityAttribute.cs
- DispatcherSynchronizationContext.cs
- sqlcontext.cs
- GlyphCache.cs
- HttpHeaderCollection.cs
- ListViewGroupConverter.cs
- AsymmetricSignatureDeformatter.cs
- OperationBehaviorAttribute.cs
- PtsHelper.cs
- HtmlTernaryTree.cs
- Assembly.cs
- FlowNode.cs
- ViewStateException.cs
- XPathMessageFilterTable.cs
- DocumentPropertiesDialog.cs
- safesecurityhelperavalon.cs
- PostBackOptions.cs
- CollaborationHelperFunctions.cs
- PropertyInfoSet.cs
- SiteMapNodeItemEventArgs.cs
- LockedHandleGlyph.cs
- SyndicationSerializer.cs
- OleDbReferenceCollection.cs
- RelationshipConstraintValidator.cs
- UndoEngine.cs
- AssemblyResourceLoader.cs
- ConvertTextFrag.cs
- CultureSpecificStringDictionary.cs
- ClientConfigPaths.cs