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
- CodeDirectiveCollection.cs
- EventMappingSettings.cs
- ManipulationPivot.cs
- LocalBuilder.cs
- ImageListStreamer.cs
- AssemblyNameProxy.cs
- PasswordTextContainer.cs
- DataPagerField.cs
- XmlResolver.cs
- ConnectionManagementElementCollection.cs
- XamlValidatingReader.cs
- XsltContext.cs
- UnknownWrapper.cs
- CharacterMetrics.cs
- XmlSchemaAttributeGroupRef.cs
- ItemType.cs
- HtmlProps.cs
- ILGenerator.cs
- OLEDB_Enum.cs
- EntityUtil.cs
- RenamedEventArgs.cs
- ListViewTableRow.cs
- CategoriesDocumentFormatter.cs
- DropShadowBitmapEffect.cs
- TimeStampChecker.cs
- SoapExtensionReflector.cs
- BitConverter.cs
- TaiwanLunisolarCalendar.cs
- CancellationToken.cs
- OciHandle.cs
- SerialPort.cs
- SafeTokenHandle.cs
- DocumentOrderComparer.cs
- SQLBytesStorage.cs
- StringFreezingAttribute.cs
- Query.cs
- newinstructionaction.cs
- Ray3DHitTestResult.cs
- FilterableAttribute.cs
- WindowsListViewScroll.cs
- InputBindingCollection.cs
- SqlNode.cs
- InstalledFontCollection.cs
- HtmlUtf8RawTextWriter.cs
- BitmapEffectGroup.cs
- FileLogRecord.cs
- HwndKeyboardInputProvider.cs
- FixedHyperLink.cs
- Quaternion.cs
- ConfigurationCollectionAttribute.cs
- SiteMapNodeCollection.cs
- NameValueCollection.cs
- MediaCommands.cs
- WindowsRichEdit.cs
- FlowDocumentView.cs
- DateTimeOffset.cs
- ExpressionBuilder.cs
- EntityKeyElement.cs
- DataFormats.cs
- Viewport2DVisual3D.cs
- ObjectStateEntryDbUpdatableDataRecord.cs
- GridItemCollection.cs
- PagePropertiesChangingEventArgs.cs
- FontFamilyConverter.cs
- EncryptedXml.cs
- SessionParameter.cs
- EnumValAlphaComparer.cs
- WebPartEventArgs.cs
- ObjectListTitleAttribute.cs
- CatalogPartChrome.cs
- CodeSpit.cs
- CqlQuery.cs
- Shape.cs
- EventManager.cs
- LZCodec.cs
- ScriptMethodAttribute.cs
- SqlXml.cs
- FilteredSchemaElementLookUpTable.cs
- FileCodeGroup.cs
- WebControlParameterProxy.cs
- ZipIOExtraFieldPaddingElement.cs
- ProfilePropertySettingsCollection.cs
- UntypedNullExpression.cs
- DataBindEngine.cs
- SortDescription.cs
- LicFileLicenseProvider.cs
- List.cs
- PcmConverter.cs
- FileReservationCollection.cs
- ViewPort3D.cs
- HyperLinkColumn.cs
- NonBatchDirectoryCompiler.cs
- AdapterDictionary.cs
- ListChunk.cs
- HorizontalAlignConverter.cs
- entityreference_tresulttype.cs
- AutomationEvent.cs
- ResourcePermissionBaseEntry.cs
- View.cs
- PointHitTestParameters.cs