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
- ModelServiceImpl.cs
- LongTypeConverter.cs
- BaseServiceProvider.cs
- SharedConnectionListener.cs
- DataControlFieldHeaderCell.cs
- ProfilePropertySettings.cs
- Buffer.cs
- Application.cs
- SizeValueSerializer.cs
- OdbcConnectionFactory.cs
- LineBreak.cs
- ExpressionBuilder.cs
- ConnectionStringSettings.cs
- SplineQuaternionKeyFrame.cs
- WebColorConverter.cs
- SessionParameter.cs
- HGlobalSafeHandle.cs
- EntitySqlQueryState.cs
- HorizontalAlignConverter.cs
- TextDecorationUnitValidation.cs
- ConfigDefinitionUpdates.cs
- BulletedListDesigner.cs
- CryptoApi.cs
- InstanceData.cs
- xmlglyphRunInfo.cs
- ContextDataSource.cs
- DocumentXmlWriter.cs
- PackageDigitalSignature.cs
- SoapElementAttribute.cs
- MultilineStringConverter.cs
- CroppedBitmap.cs
- CodeGroup.cs
- MediaElementAutomationPeer.cs
- _AcceptOverlappedAsyncResult.cs
- PublisherMembershipCondition.cs
- CustomError.cs
- StorageComplexPropertyMapping.cs
- HashCryptoHandle.cs
- ResourceSet.cs
- Stroke.cs
- DurableServiceAttribute.cs
- BaseTemplateCodeDomTreeGenerator.cs
- lengthconverter.cs
- TimeSpanValidatorAttribute.cs
- Matrix3DConverter.cs
- FormViewModeEventArgs.cs
- TextMarkerSource.cs
- MarginsConverter.cs
- ComplexTypeEmitter.cs
- BindingContext.cs
- ObjectQueryState.cs
- ToolboxCategoryItems.cs
- EventManager.cs
- TreeNodeSelectionProcessor.cs
- ECDiffieHellman.cs
- Padding.cs
- SessionChannels.cs
- CodeCompiler.cs
- QuaternionAnimationBase.cs
- ChannelParameterCollection.cs
- WpfPayload.cs
- _CommandStream.cs
- LambdaReference.cs
- DynamicEndpointElement.cs
- UnknownBitmapDecoder.cs
- DependencyObjectPropertyDescriptor.cs
- ClientType.cs
- GatewayIPAddressInformationCollection.cs
- WinInetCache.cs
- MD5.cs
- Monitor.cs
- AnimationException.cs
- CachedResourceDictionaryExtension.cs
- PropertyDescriptorComparer.cs
- _emptywebproxy.cs
- PropertyIdentifier.cs
- MobileUserControl.cs
- EventPrivateKey.cs
- DetailsViewModeEventArgs.cs
- VirtualizingStackPanel.cs
- ToolTip.cs
- OutOfProcStateClientManager.cs
- ConfigXmlText.cs
- Normalizer.cs
- GridViewColumnCollectionChangedEventArgs.cs
- PersonalizationStateInfoCollection.cs
- ScriptResourceAttribute.cs
- CodePageEncoding.cs
- ExpressionVisitorHelpers.cs
- QueryCacheKey.cs
- TransformPatternIdentifiers.cs
- RequestCache.cs
- SEHException.cs
- ValidationPropertyAttribute.cs
- SelectionRange.cs
- MULTI_QI.cs
- FormatSettings.cs
- ComplexTypeEmitter.cs
- FirstQueryOperator.cs
- ProfileService.cs