Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx40 / Tools / System.Activities.Presentation / System / Activities / Presentation / Base / Core / PropertyEditing / categoryentry.cs / 1305376 / categoryentry.cs
namespace System.Activities.Presentation.PropertyEditing { using System.ComponentModel; using System.Diagnostics; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Activities.Presentation; using System; ////// The CategoryEntry class is a part of the property editing object model. It models a /// Category which has a localized name along with a collection of properties. /// public abstract class CategoryEntry : INotifyPropertyChanged, IPropertyFilterTarget { private string _name; private bool _matchesFilter; ////// Creates a new CategoryEntry. For host Infrastructure use /// /// The localized name of the corresponding Category as defined by the /// CategoryAttribute ///When name is either empty or null. protected CategoryEntry(string name) { if (string.IsNullOrEmpty(name)) throw FxTrace.Exception.ArgumentNull("name"); _name = name; } ////// Returns the localized Category name /// public string CategoryName { get { return _name; } } ////// Returns an IEnumerable collection of all of the properties in the category. /// public abstract IEnumerableProperties { get; } /// /// Indexer that returns a Property instance given the property name. /// /// The string property name to return a Property instance for. ///Property corresponding to the passed in propertyName if it exists, otherwise null public abstract PropertyEntry this[string propertyName] { get; } // INotifyPropertyChanged Members ////// INotifyPropertyChanged event /// public event PropertyChangedEventHandler PropertyChanged; ////// Raises the INotifyPropertyChanged.PropertyChanged event /// /// the name of the property that is changing ///When propertyName is null protected virtual void OnPropertyChanged(string propertyName) { if (propertyName == null) throw FxTrace.Exception.ArgumentNull("propertyName"); if (PropertyChanged != null) { PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); } } // IPropertyFilterTarget Members ////// IPropertyFilterTarget event /// public event EventHandlerFilterApplied; /// /// Raises the IPropertyFilterTarget.FilterApplied event /// /// The PropertyFilter being applied protected virtual void OnFilterApplied(PropertyFilter filter) { if (FilterApplied != null) { FilterApplied(this, new PropertyFilterAppliedEventArgs(filter)); } } ////// IPropertyFilterTarget method /// /// public virtual void ApplyFilter(PropertyFilter filter) { this.MatchesFilter = filter == null ? true : filter.Match(this); OnFilterApplied(filter); } ////// IPropertyFilterTarget property /// public virtual bool MatchesFilter { get { return _matchesFilter; } protected set { if (_matchesFilter != value) { _matchesFilter = value; this.OnPropertyChanged("MatchesFilter"); } } } ////// IPropertyFilterTarget method /// /// The PropertyFilterPredicate to match against ///true if there is a match, otherwise false public abstract bool MatchesPredicate(PropertyFilterPredicate predicate); } } // 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
- Codec.cs
- ReflectionTypeLoadException.cs
- WorkflowInstanceAbortedRecord.cs
- _Semaphore.cs
- Material.cs
- COM2ExtendedUITypeEditor.cs
- ReadOnlyState.cs
- LinkedResourceCollection.cs
- ContextMarshalException.cs
- httpserverutility.cs
- Visual.cs
- SettingsSection.cs
- Scene3D.cs
- ObjectDataSourceMethodEventArgs.cs
- Volatile.cs
- DoubleCollectionConverter.cs
- TrustLevelCollection.cs
- StringFreezingAttribute.cs
- SubMenuStyleCollectionEditor.cs
- NullableFloatAverageAggregationOperator.cs
- SqlErrorCollection.cs
- UIElementPropertyUndoUnit.cs
- CatalogPart.cs
- OdbcDataReader.cs
- SelfIssuedAuthRSAPKCS1SignatureFormatter.cs
- ASCIIEncoding.cs
- ReferencedType.cs
- Pair.cs
- ListChunk.cs
- CodeBlockBuilder.cs
- Geometry3D.cs
- ExpressionBindingCollection.cs
- PageClientProxyGenerator.cs
- ValidationErrorEventArgs.cs
- ListViewSelectEventArgs.cs
- UIAgentAsyncEndRequest.cs
- GenericTypeParameterBuilder.cs
- ConfigurationStrings.cs
- WindowsComboBox.cs
- EntityDesignerDataSourceView.cs
- ListMarkerSourceInfo.cs
- HwndSource.cs
- AnchorEditor.cs
- ColorTranslator.cs
- FilteredAttributeCollection.cs
- LocalizabilityAttribute.cs
- SpinWait.cs
- SplitContainer.cs
- Utils.cs
- HtmlShim.cs
- XPathDescendantIterator.cs
- UmAlQuraCalendar.cs
- GenericTypeParameterBuilder.cs
- SQLInt64.cs
- InfoCardCryptoHelper.cs
- TextBoxBase.cs
- LogLogRecordEnumerator.cs
- NumericUpDownAccelerationCollection.cs
- PropertyIDSet.cs
- GroupByExpressionRewriter.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- Scene3D.cs
- SystemPens.cs
- BinaryParser.cs
- CssTextWriter.cs
- Flowchart.cs
- CodeValidator.cs
- FilteredAttributeCollection.cs
- Vector3dCollection.cs
- EncryptedData.cs
- _NegoState.cs
- XmlEventCache.cs
- addressfiltermode.cs
- HwndSourceKeyboardInputSite.cs
- TextSpan.cs
- _UriTypeConverter.cs
- ListArgumentProvider.cs
- UniqueID.cs
- SqlConnectionPoolProviderInfo.cs
- SqlOuterApplyReducer.cs
- XmlMembersMapping.cs
- InitialServerConnectionReader.cs
- DefinitionProperties.cs
- VersionPair.cs
- BufferedReadStream.cs
- XmlWrappingReader.cs
- Message.cs
- Cursor.cs
- StorageComplexPropertyMapping.cs
- Quad.cs
- DataGridGeneralPage.cs
- ObjectManager.cs
- AlternateViewCollection.cs
- PropertyInfo.cs
- ContentPlaceHolder.cs
- Site.cs
- AutoResizedEvent.cs
- RadioButtonRenderer.cs
- TimeoutException.cs
- CurrencyWrapper.cs