dotnet / dotnet/wpf

[API Proposal]: Add Tag to Visual3D class

Open
#8,404 1 comment 2 reactions 0 assignees View on GitHub
API suggestion
Dominant language
C#
Stars
7.7k
Forks
1.3k
Avg merge
1d 11h
Merged PRs (30d)
61

Description

### Background and motivation

Is there any specific reason for not having a object Tag in Visual3D class?
It would be really helpful for interfaces.

### API Proposal

```csharp
namespace System.Windows.Media.Media3D
{
public abstract partial class Visual3D : DependencyObject, DUCE.IResource, IVisual3DContainer
{
public object Tag {get; set;}
}
}
```

### API Usage

```csharp
// Setting Tag to get it somewhere else.
var c = new ModelVisual3D();
c.Tag = "interface";

```

### Alternative Designs

_No response_

### Risks

- Potential issues with binary serialization
- Memory consumption increase by intptr size per Visual3D object.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.