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
- SendKeys.cs
- Deserializer.cs
- TextEvent.cs
- CheckedPointers.cs
- CryptoApi.cs
- ChangesetResponse.cs
- BamlRecords.cs
- TempFiles.cs
- hresults.cs
- DbProviderSpecificTypePropertyAttribute.cs
- SemanticResolver.cs
- TdsParserSessionPool.cs
- FacetDescriptionElement.cs
- CodeTypeMember.cs
- ProfileBuildProvider.cs
- ComponentEditorForm.cs
- ColumnMapCopier.cs
- File.cs
- ServiceChannelProxy.cs
- CallContext.cs
- DiscreteKeyFrames.cs
- HighContrastHelper.cs
- IList.cs
- SmiRequestExecutor.cs
- PropertyTabChangedEvent.cs
- SoapConverter.cs
- SystemColors.cs
- DataColumnMapping.cs
- XmlExtensionFunction.cs
- StylusCaptureWithinProperty.cs
- XmlSerializer.cs
- XmlSchemaObjectCollection.cs
- WpfKnownType.cs
- AtomServiceDocumentSerializer.cs
- QueryStringParameter.cs
- MenuItemStyle.cs
- DataBoundControlParameterTarget.cs
- APCustomTypeDescriptor.cs
- UriTemplateDispatchFormatter.cs
- DmlSqlGenerator.cs
- SubclassTypeValidator.cs
- ComboBoxItem.cs
- FormsAuthenticationCredentials.cs
- InvalidAsynchronousStateException.cs
- KeysConverter.cs
- OneOfElement.cs
- LinqDataSourceValidationException.cs
- Part.cs
- DesignerDataTableBase.cs
- Faults.cs
- ClaimSet.cs
- MultidimensionalArrayItemReference.cs
- Window.cs
- BindingsCollection.cs
- DefaultPropertyAttribute.cs
- CommonGetThemePartSize.cs
- WindowsHyperlink.cs
- UidManager.cs
- TextElementEnumerator.cs
- AudioFormatConverter.cs
- TypedServiceChannelBuilder.cs
- XmlSignificantWhitespace.cs
- basevalidator.cs
- BypassElementCollection.cs
- OdbcInfoMessageEvent.cs
- StickyNoteAnnotations.cs
- ApplicationDirectory.cs
- DataBinder.cs
- TextDataBindingHandler.cs
- ZoneIdentityPermission.cs
- TreeNodeCollection.cs
- ApplicationCommands.cs
- Enum.cs
- SchemaDeclBase.cs
- ListView.cs
- BindableAttribute.cs
- XmlSchemaSimpleContentExtension.cs
- StylusButton.cs
- ContentFilePart.cs
- BitmapEffectDrawingContent.cs
- _ConnectStream.cs
- X509CertificateValidator.cs
- EditCommandColumn.cs
- DataContext.cs
- VideoDrawing.cs
- PropertyHelper.cs
- TextEditorCharacters.cs
- EllipseGeometry.cs
- FontUnitConverter.cs
- ResourceDictionaryCollection.cs
- SQLChars.cs
- TextBoxRenderer.cs
- PointLight.cs
- ContravarianceAdapter.cs
- HtmlInputControl.cs
- StylusPlugInCollection.cs
- RoutedEventArgs.cs
- AutomationProperties.cs
- ToolTip.cs
- ClickablePoint.cs