Version

Configuring Data Point Markers

Purpose

This topic explains how to configure the data point markers in the XamScatterSurface3D™ control.

Required background

The following topics are prerequisites to understanding this topic:

Topic Purpose

This topic provides detailed instructions to help you get up and running as soon as possible with the xamScatterSurface3D™ control.

This topic explains the features supported by the control from developer perspective.

This topic provides an overview of the visual elements of the control.

The following table lists the external articles required as a prerequisite to understanding this topic.

Defining Material

Article Purpose

This articles describes how to use the abstract Material class in WPF.

This articles describes how to define and use the DiffuseMaterial class in WPF.

Defining 3D Mesh Geometry

Article Purpose

This articles describes how to create a triangle primitive for building a 3-D shape.

Showing Data Point Markers

Overview

Use the XamScatterSurface3D ShowPointMarkers property to show/hide data point markers in the xamScatterSurface3D control.

By default, data point markers are not visible and this property value is False.

Note
Note

Displaying the data point markers may influence the xamScatterSurface3D control performance.

Property settings

The following table maps the desired configuration to the property settings that manage it.

In order to: Use this property: And set it to:

Show/hide data point markers

True/False

Example

The screenshot below demonstrates how the xamScatterSurface3D control looks as a result of the following settings:

Property Value

True

Configuring Data Point Markers 1.png

Following is the code that implements this example.

In XAML:

<ig:XamScatterSurface3D Name="SurfaceChart"
 ItemsSource="{Binding Path=DataCollection}"
 XMemberPath="X" YMemberPath="Y" ZMemberPath="Z"
 ShowPointMarkers="True"/>

In C#:

…
SurfaceChart.ShowPointMarkers = true;

In Visual Basic:

…
SurfaceChart.ShowPointMarkers = True

Configuring Data Point Marker Material

Overview

Use the XamScatterSurface3D PointMarkerMaterial property to configure the material of the xamScatterSurface3D control markers.

Property settings

The following table maps the desired configuration to the property settings that manage it.

In order to: Use this property: And set it to:

Configure the marker material

Material

Example

The screenshot below demonstrates how the markers looks as a result of the following settings:

Property Value

<DiffuseMaterial Brush="Red" />

Configuring Data Point Markers 2.png

Following is the code that implements this example.

In XAML:

<ig:XamScatterSurface3D Name="SurfaceChart"
 ItemsSource="{Binding Path=DataCollection}"
 XMemberPath="X" YMemberPath="Y" ZMemberPath="Z"
 ShowPointMarkers="True">
    <ig:XamScatterSurface3D.PointMarkerMaterial>
        <DiffuseMaterial Brush="Red" />
    </ig:XamScatterSurface3D.PointMarkerMaterial>
</ig:XamScatterSurface3D>

In C#:

…
var diffuseMaterial = new DiffuseMaterial();
diffuseMaterial.Brush = new SolidColorBrush(Colors.Red);
SurfaceChart.ShowPointMarkers = true;
SurfaceChart.PointMarkerMaterial = diffuseMaterial;

In Visual Basic:

…
Dim diffuseMaterial = New DiffuseMaterial()
diffuseMaterial.Brush = New SolidColorBrush(Colors.Red)
SurfaceChart.ShowPointMarkers = True
SurfaceChart.PointMarkerMaterial = diffuseMaterial

Configuring Data Point Marker Mesh

Overview

Use the XamScatterSurface3D PointMarkerMesh property to configure the 3D marker shape.

Property settings

The following table maps the desired configuration to the property settings that manage it.

In order to: Use this property: And set it to:

Create a 3D marker mesh

MeshGeometry3D

Example

The screenshot below demonstrates how the markers looks as a result of the following code:

Configuring Data Point Markers 3.png

Following is the code that implements this example.

In XAML:

<ig:XamScatterSurface3D Name="SurfaceChart"
 ItemsSource="{Binding Path=DataCollection}"
 XMemberPath="X" YMemberPath="Y" ZMemberPath="Z"
 ShowPointMarkers="True">
    <ig:XamScatterSurface3D.PointMarkerMaterial>
        <DiffuseMaterial Brush="Red" />
    </ig:XamScatterSurface3D.PointMarkerMaterial>
    <ig:XamScatterSurface3D.PointMarkerMesh>
        <MeshGeometry3D Positions="-0.01 0.01 0.01, -0.01 -0.01 0.01,
                                    0.01 0.01 0.01, 0.01 -0.01 0.01,
                                    0.01 0.01 -0.01, 0.01 -0.01 -0.01,
                                   -0.01 0.01 -0.01, -0.01 -0.01 -0.01"
                        TextureCoordinates="0 0, 0 1, 1 0, 1 1,
                                            0 0, 0 1, 1 0, 1 1"
                        TriangleIndices="0  1  2,  1  3  2,
                                         6  7  0,  7  1  0,
                                         4  6  2,  6  0  2,
                                         2  3  4,  3  5  4,
                                         3  1  5,  1  7  5,
                                         4  5  6,  5  7  6" />
    </ig:XamScatterSurface3D.PointMarkerMesh>
</ig:XamScatterSurface3D>

Configuring Data Point Marker Template

Overview

Use the XamScatterSurface3D PointMarkerTemplate property to use a DataTemplate for xamScatterSurface3D control markers.

Note
Note

In order for the DataTemplate to be visible, the PointMarkerMaterial should have the Viewport2DVisual3D.IsVisualHostMaterial attached property set to True.

Property settings

The following table maps the desired configuration to the property settings that manage it.

In order to: Use this property: And set it to:

Set a DataTemplate for each marker

DataTemplate

Example

The screenshot below demonstrates how the xamScatterSurface3D control looks as a result of the following code:

Configuring Data Point Markers 4.png

Following is the code that implements this example.

In XAML:

<ig:XamScatterSurface3D Name="SurfaceChart"
 ItemsSource="{Binding Path=DataCollection}"
 XMemberPath="X" YMemberPath="Y" ZMemberPath="Z"
 ShowPointMarkers="True">
    <ig:XamScatterSurface3D.PointMarkerMaterial>
        <DiffuseMaterial Viewport2DVisual3D.IsVisualHostMaterial="True" />
    </ig:XamScatterSurface3D.PointMarkerMaterial>
    <ig:XamScatterSurface3D.PointMarkerTemplate>
        <DataTemplate>
            <Rectangle Height="100" Width="100" Fill="Red" />
        </DataTemplate>
    </ig:XamScatterSurface3D.PointMarkerTemplate>
</ig:XamScatterSurface3D>

Related Content

Topics

The following topic provides additional information related to this topic.

Topic Purpose

This topic summarizes the data point marker mouse events in the xamScatterSurface3D control.