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
- DataService.cs
- Label.cs
- ByteRangeDownloader.cs
- EndGetFileNameFromUserRequest.cs
- _ProxyChain.cs
- HTTPNotFoundHandler.cs
- MailMessage.cs
- ItemCheckedEvent.cs
- SemanticResolver.cs
- RawStylusInputCustomData.cs
- GetPolicyDetailsRequest.cs
- Viewport2DVisual3D.cs
- Parallel.cs
- DEREncoding.cs
- Cloud.cs
- EntityDataSourceChangingEventArgs.cs
- EntitySqlQueryState.cs
- ToolbarAUtomationPeer.cs
- ItemsControl.cs
- ArrayWithOffset.cs
- BehaviorDragDropEventArgs.cs
- BackStopAuthenticationModule.cs
- safex509handles.cs
- QilName.cs
- GenericsInstances.cs
- TPLETWProvider.cs
- DataSvcMapFile.cs
- ScrollContentPresenter.cs
- XmlILOptimizerVisitor.cs
- Expander.cs
- securitycriticaldataClass.cs
- WmlPanelAdapter.cs
- QualificationDataItem.cs
- BasicExpandProvider.cs
- AsyncOperationManager.cs
- PermissionSet.cs
- DesignerSerializerAttribute.cs
- ExcCanonicalXml.cs
- DataServiceRequestOfT.cs
- XmlBoundElement.cs
- WriteLine.cs
- TakeQueryOptionExpression.cs
- SmtpClient.cs
- IApplicationTrustManager.cs
- EnterpriseServicesHelper.cs
- StringWriter.cs
- DiscriminatorMap.cs
- _RegBlobWebProxyDataBuilder.cs
- CompilationRelaxations.cs
- Ray3DHitTestResult.cs
- DataGridViewColumnCollection.cs
- XamlVector3DCollectionSerializer.cs
- DynamicFilter.cs
- MetabaseSettingsIis7.cs
- Byte.cs
- Focus.cs
- MenuAutomationPeer.cs
- ItemAutomationPeer.cs
- SponsorHelper.cs
- XamlSerializerUtil.cs
- DataGridViewTextBoxCell.cs
- _PooledStream.cs
- AutoGeneratedFieldProperties.cs
- LookupNode.cs
- RowToParametersTransformer.cs
- TextProperties.cs
- WebExceptionStatus.cs
- MDIControlStrip.cs
- CmsInterop.cs
- UserControl.cs
- SymbolType.cs
- BaseCodePageEncoding.cs
- ColumnResizeAdorner.cs
- DataBoundControlDesigner.cs
- RoutingTable.cs
- TextCompositionManager.cs
- ScrollEvent.cs
- RectAnimation.cs
- MarginCollapsingState.cs
- FixedDSBuilder.cs
- MenuItem.cs
- MissingMemberException.cs
- InvokeProviderWrapper.cs
- LayoutUtils.cs
- IPipelineRuntime.cs
- Privilege.cs
- XsdSchemaFileEditor.cs
- WebPartDescriptionCollection.cs
- TypefaceCollection.cs
- DiscoveryViaBehavior.cs
- Point3DCollectionConverter.cs
- ArgumentsParser.cs
- OleDbConnectionInternal.cs
- GenericRootAutomationPeer.cs
- SqlServices.cs
- HTMLTextWriter.cs
- MDIControlStrip.cs
- Module.cs
- PrivilegeNotHeldException.cs
- PingReply.cs