Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx40 / Tools / System.Activities.Presentation / System / Activities / Presentation / View / FilterableData.cs / 1305376 / FilterableData.cs
//---------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. //--------------------------------------------------------------- namespace System.Activities.Presentation.View { using System.Windows; using System.Globalization; using System.Runtime; class FilterableData : DependencyObject { public static readonly DependencyProperty DataProperty = DependencyProperty.Register("Data", typeof(object), typeof(FilterableData), new UIPropertyMetadata(null)); public static readonly DependencyProperty IsSelectedProperty = DependencyProperty.Register("IsSelected", typeof(bool), typeof(FilterableData), new UIPropertyMetadata(false)); public static readonly DependencyProperty VisibilityProperty = DependencyProperty.Register("Visibility", typeof(Visibility), typeof(FilterableData), new UIPropertyMetadata(Visibility.Visible)); public object Data { get { return (object)GetValue(DataProperty); } set { SetValue(DataProperty, value); } } public bool IsSelected { get { return (bool)GetValue(IsSelectedProperty); } set { SetValue(IsSelectedProperty, value); } } public Visibility Visibility { get { return (Visibility)GetValue(VisibilityProperty); } set { SetValue(VisibilityProperty, value); } } internal object Owner { get; set; } public override string ToString() { return null == this.Data ? "" : this.Data.ToString(); } } class FilterableData < TData > : FilterableData { [Fx.Tag.KnownXamlExternal] public TData TypedData { get { return (TData)base.Data; } set { base.Data = value; } } public override string ToString() { return string.Format(CultureInfo.CurrentUICulture, "{0}:({1})", base.ToString(), typeof(TData).Name); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //---------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. //--------------------------------------------------------------- namespace System.Activities.Presentation.View { using System.Windows; using System.Globalization; using System.Runtime; class FilterableData : DependencyObject { public static readonly DependencyProperty DataProperty = DependencyProperty.Register("Data", typeof(object), typeof(FilterableData), new UIPropertyMetadata(null)); public static readonly DependencyProperty IsSelectedProperty = DependencyProperty.Register("IsSelected", typeof(bool), typeof(FilterableData), new UIPropertyMetadata(false)); public static readonly DependencyProperty VisibilityProperty = DependencyProperty.Register("Visibility", typeof(Visibility), typeof(FilterableData), new UIPropertyMetadata(Visibility.Visible)); public object Data { get { return (object)GetValue(DataProperty); } set { SetValue(DataProperty, value); } } public bool IsSelected { get { return (bool)GetValue(IsSelectedProperty); } set { SetValue(IsSelectedProperty, value); } } public Visibility Visibility { get { return (Visibility)GetValue(VisibilityProperty); } set { SetValue(VisibilityProperty, value); } } internal object Owner { get; set; } public override string ToString() { return null == this.Data ? " " : this.Data.ToString(); } } class FilterableData < TData > : FilterableData { [Fx.Tag.KnownXamlExternal] public TData TypedData { get { return (TData)base.Data; } set { base.Data = value; } } public override string ToString() { return string.Format(CultureInfo.CurrentUICulture, "{0}:({1})", base.ToString(), typeof(TData).Name); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- BufferedMessageWriter.cs
- _SslState.cs
- Style.cs
- ProcessThread.cs
- ObjectComplexPropertyMapping.cs
- DbReferenceCollection.cs
- GeneralTransformCollection.cs
- VirtualPathUtility.cs
- connectionpool.cs
- Model3D.cs
- PrintingPermissionAttribute.cs
- XPathNodeIterator.cs
- DependencyPropertyHelper.cs
- ViewBase.cs
- JpegBitmapEncoder.cs
- _FtpDataStream.cs
- ToolBarOverflowPanel.cs
- CodeDOMProvider.cs
- Matrix3D.cs
- Triplet.cs
- FilteredAttributeCollection.cs
- XamlTreeBuilder.cs
- CodeTypeDeclaration.cs
- QuinticEase.cs
- TraceSection.cs
- UnlockInstanceCommand.cs
- DPTypeDescriptorContext.cs
- Trigger.cs
- HwndMouseInputProvider.cs
- DependencyPropertyDescriptor.cs
- IntranetCredentialPolicy.cs
- DataGridViewColumnEventArgs.cs
- RequestCacheEntry.cs
- XPathScanner.cs
- LayoutTable.cs
- GridItemProviderWrapper.cs
- RunClient.cs
- EditorZoneBase.cs
- EffectiveValueEntry.cs
- ResourceDescriptionAttribute.cs
- KnownTypeAttribute.cs
- ParentQuery.cs
- TypeLoadException.cs
- TemplateColumn.cs
- OleDragDropHandler.cs
- StringComparer.cs
- EpmCustomContentSerializer.cs
- QilExpression.cs
- NeutralResourcesLanguageAttribute.cs
- CodeGotoStatement.cs
- SystemIcmpV6Statistics.cs
- WebResourceAttribute.cs
- ContainerUtilities.cs
- SwitchCase.cs
- ModelItemExtensions.cs
- OdbcConnectionHandle.cs
- LinqDataSourceEditData.cs
- ClientProxyGenerator.cs
- ScriptingJsonSerializationSection.cs
- SurrogateEncoder.cs
- SafeMILHandle.cs
- ChildrenQuery.cs
- ProcessHostMapPath.cs
- IndentTextWriter.cs
- IntSecurity.cs
- CodeExporter.cs
- GenericUriParser.cs
- Intellisense.cs
- TextBox.cs
- KeyFrames.cs
- EdmSchemaError.cs
- KeyTimeConverter.cs
- GcHandle.cs
- SerializationSectionGroup.cs
- DESCryptoServiceProvider.cs
- UTF32Encoding.cs
- ImplicitInputBrush.cs
- CompositeCollectionView.cs
- ResourceLoader.cs
- OleDbStruct.cs
- LiteralText.cs
- Geometry3D.cs
- PixelFormat.cs
- Size.cs
- SrgsOneOf.cs
- ColumnCollection.cs
- CalendarTable.cs
- ObjectStateEntryDbUpdatableDataRecord.cs
- SerializationTrace.cs
- Event.cs
- PaperSource.cs
- AlphaSortedEnumConverter.cs
- ToolboxItemAttribute.cs
- CategoryNameCollection.cs
- TextTreeInsertUndoUnit.cs
- SkinBuilder.cs
- DataControlField.cs
- StringArrayConverter.cs
- SqlUtil.cs
- SplineKeyFrames.cs