Language
Edit

DataSourceThemeProvider Class

Definition

A helper class that simplifies providing a theme that is organized as a ScriptableObject. Simply place this higher in the scene hierarchy than any UX element that you wish to inherit this theme and it will be found automatically.

To have one theme profile be used for all application theming as well as UXComponents themes, this can be accomplished by deriving from the UXComponentsThemeProfile, or by offering all the same keypaths as well as any keypaths unique to the application.

If more comprehensive support for theme data sources is needed, consider using DataSourceProviderSingletion.

[UnityEngine.AddComponentMenu("MRTK/Data Binding/Sources/Data Source Theme Provider")]
[System.Serializable]
public class DataSourceThemeProvider : MixedReality.Toolkit.Data.DataSourceGOBase
[<UnityEngine.AddComponentMenu("MRTK/Data Binding/Sources/Data Source Theme Provider")>]
[<System.Serializable>]
type DataSourceThemeProvider = class
    inherit DataSourceGOBase
Public Class DataSourceThemeProvider
Inherits DataSourceGOBase
Inheritance
UnityEngine.MonoBehaviour
DataSourceThemeProvider
Attributes
UnityEngine.AddComponentMenuAttribute SerializableAttribute

Constructors

Name Description
DataSourceThemeProvider()

Fields

Name Description
dataSourceType (Inherited from DataSourceGOBase)
keyPathMapper (Inherited from DataSourceGOBase)

Properties

Name Description
DataController

An optional data controller.

(Inherited from DataSourceGOBase)
DataSource (Inherited from DataSourceGOBase)
DataSourceType

Get the data source type

(Inherited from DataSourceGOBase)
ThemeProfile

Currently set theme profile.

Methods

Name Description
AddDataConsumerListener(String, IDataConsumer)

Add a new data consumer listener for the specified key path

(Inherited from DataSourceGOBase)
AllocateDataSource()
DataChangeSetBegin()

Begin a data change set.

(Inherited from DataSourceGOBase)
DataChangeSetEnd()

End a data change set.

(Inherited from DataSourceGOBase)
GetCollectionCount(String)

If a key path represents a collection, return the number of items in that collection.

(Inherited from DataSourceGOBase)
GetCollectionKeyPathRange(String, Int32, Int32)

Get an enumerable collection of key path strings for the specified collection index range.

(Inherited from DataSourceGOBase)
GetDataSource(String)

IDataSourceProvider method to get this data source.

(Inherited from DataSourceGOBase)
GetDataSourceTypes()

Get an array of data source types that can be provided by this provider

(Inherited from DataSourceGOBase)
GetNthCollectionKeyPathAt(String, Int32)

If a key path represents a collection, return a collection key path for the entry at index n.

(Inherited from DataSourceGOBase)
GetValue(String)

Get the value associated with the specified key path and prefix

(Inherited from DataSourceGOBase)
InitializeDataSource()
IsCollectionAtKeyPath(String)

Determine if key path represents a data collection

(Inherited from DataSourceGOBase)
IsDataAvailable()

Is data available in the data source.

(Inherited from DataSourceGOBase)
NotifyAllChanged(DataChangeType, IDataConsumer)

Notify all listeners that data has changed.

(Inherited from DataSourceGOBase)
NotifyDataChanged(String, Object, DataChangeType, Boolean)

Inform data source that its data has changed.

(Inherited from DataSourceGOBase)
RemoveDataConsumerListener(String, IDataConsumer)

Remove a data consumer listener for the specified key path

(Inherited from DataSourceGOBase)
ResolveKeyPath(String, String)

Resolve a key path using a given prefix and local path.

(Inherited from DataSourceGOBase)
SetDataKeyPathMapper(IDataKeyPathMapper)

Set a key path mapper.

(Inherited from DataSourceGOBase)
SetTheme(ScriptableObject)
SetValue(String, Object, Boolean)

Set the value associated with the specified key path

(Inherited from DataSourceGOBase)

Applies to