Model3DCollection Model3DCollection Model3DCollection Model3DCollection Class

Definizione

Rappresenta una raccolta ordinata di oggetti Model3D.Represents an ordered collection of Model3D objects.

public ref class Model3DCollection sealed : System::Windows::Media::Animation::Animatable, System::Collections::Generic::ICollection<System::Windows::Media::Media3D::Model3D ^>, System::Collections::Generic::IEnumerable<System::Windows::Media::Media3D::Model3D ^>, System::Collections::Generic::IList<System::Windows::Media::Media3D::Model3D ^>, System::Collections::IList
public sealed class Model3DCollection : System.Windows.Media.Animation.Animatable, System.Collections.Generic.ICollection<System.Windows.Media.Media3D.Model3D>, System.Collections.Generic.IEnumerable<System.Windows.Media.Media3D.Model3D>, System.Collections.Generic.IList<System.Windows.Media.Media3D.Model3D>, System.Collections.IList
type Model3DCollection = class
    inherit Animatable
    interface IList
    interface ICollection
    interface IEnumerable
    interface IList<Model3D>
    interface ICollection<Model3D>
    interface seq<Model3D>
Public NotInheritable Class Model3DCollection
Inherits Animatable
Implements ICollection(Of Model3D), IEnumerable(Of Model3D), IList, IList(Of Model3D)
Ereditarietà
Implementazioni

Esempi

using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using System.Windows.Media.Media3D;

namespace SDKSample
{
    public partial class EmissiveMaterialExample : Page
    {
        public EmissiveMaterialExample()
        {

            // Declare scene objects.
            Viewport3D myViewport3D = new Viewport3D();
            Model3DGroup myModel3DGroup = new Model3DGroup();
            GeometryModel3D myGeometryModel = new GeometryModel3D();
            ModelVisual3D myModelVisual3D = new ModelVisual3D();

            // Defines the camera used to view the 3D object. In order to view the 3D object,
            // the camera must be positioned and pointed such that the object is within view 
            // of the camera.
            PerspectiveCamera myPCamera = new PerspectiveCamera();

            // Specify where in the 3D scene the camera is.
            myPCamera.Position = new Point3D(0, 0, 2);

            // Specify the direction that the camera is pointing.
            myPCamera.LookDirection = new Vector3D(0, 0, -1);

            // Define camera's horizontal field of view in degrees.
            myPCamera.FieldOfView = 60;

            // Asign the camera to the viewport
            myViewport3D.Camera = myPCamera;

            // Define the lights cast in the scene. Without light, the 3D object cannot 
            // be seen. Note: to illuminate an object from additional directions, create 
            // additional lights.
            DirectionalLight myDirectionalLight = new DirectionalLight();
            myDirectionalLight.Color = Colors.White;
            myDirectionalLight.Direction = new Vector3D(-0.61, -0.5, -0.61);

            myModel3DGroup.Children.Add(myDirectionalLight);

            // The geometry specifes the shape of the 3D plane. In this sample, a flat sheet 
            // is created.
            MeshGeometry3D myMeshGeometry3D = new MeshGeometry3D();

            // Create a collection of normal vectors for the MeshGeometry3D.
            Vector3DCollection myNormalCollection = new Vector3DCollection();
            myNormalCollection.Add(new Vector3D(0,0,1));
            myNormalCollection.Add(new Vector3D(0,0,1));
            myNormalCollection.Add(new Vector3D(0,0,1));
            myNormalCollection.Add(new Vector3D(0,0,1));
            myNormalCollection.Add(new Vector3D(0,0,1));
            myNormalCollection.Add(new Vector3D(0,0,1));
            myMeshGeometry3D.Normals = myNormalCollection;

            // Create a collection of vertex positions for the MeshGeometry3D. 
            Point3DCollection myPositionCollection = new Point3DCollection();
            myPositionCollection.Add(new Point3D(-0.5, -0.5, 0.5));
            myPositionCollection.Add(new Point3D(0.5, -0.5, 0.5));
            myPositionCollection.Add(new Point3D(0.5, 0.5, 0.5));
            myPositionCollection.Add(new Point3D(0.5, 0.5, 0.5));
            myPositionCollection.Add(new Point3D(-0.5, 0.5, 0.5));
            myPositionCollection.Add(new Point3D(-0.5, -0.5, 0.5));
            myMeshGeometry3D.Positions = myPositionCollection;

            // Create a collection of texture coordinates for the MeshGeometry3D.
            PointCollection myTextureCoordinatesCollection = new PointCollection();
            myTextureCoordinatesCollection.Add(new Point(0, 0));
            myTextureCoordinatesCollection.Add(new Point(1, 0));
            myTextureCoordinatesCollection.Add(new Point(1, 1));
            myTextureCoordinatesCollection.Add(new Point(1, 1));
            myTextureCoordinatesCollection.Add(new Point(0, 1));
            myTextureCoordinatesCollection.Add(new Point(0, 0));
            myMeshGeometry3D.TextureCoordinates = myTextureCoordinatesCollection;

            // Create a collection of triangle indices for the MeshGeometry3D.
            Int32Collection myTriangleIndicesCollection = new Int32Collection();
            myTriangleIndicesCollection.Add(0);
            myTriangleIndicesCollection.Add(1);
            myTriangleIndicesCollection.Add(2);
            myTriangleIndicesCollection.Add(3);
            myTriangleIndicesCollection.Add(4);
            myTriangleIndicesCollection.Add(5);
            myMeshGeometry3D.TriangleIndices = myTriangleIndicesCollection;

            // Apply the mesh to the geometry model.
            myGeometryModel.Geometry = myMeshGeometry3D;
            // The material property of GeometryModel3D specifies the material applied to the 3D object.  
            // In this sample the material applied to the 3D object is made up of two materials layered  
            // on top of each other - a DiffuseMaterial (gradient brush) with an EmissiveMaterial 
            // layered on top (blue SolidColorBrush). The EmmisiveMaterial alters the appearance of  
            // the gradient toward blue.

            // Create a horizontal linear gradient with four stops.   
            LinearGradientBrush myHorizontalGradient = new LinearGradientBrush();
            myHorizontalGradient.StartPoint = new Point(0, 0.5);
            myHorizontalGradient.EndPoint = new Point(1, 0.5);
            myHorizontalGradient.GradientStops.Add(new GradientStop(Colors.Yellow, 0.0));
            myHorizontalGradient.GradientStops.Add(new GradientStop(Colors.Red, 0.25));
            myHorizontalGradient.GradientStops.Add(new GradientStop(Colors.Blue, 0.75));
            myHorizontalGradient.GradientStops.Add(new GradientStop(Colors.LimeGreen, 1.0));

            // Define material that will use the gradient.
            DiffuseMaterial myDiffuseMaterial = new DiffuseMaterial(myHorizontalGradient);

            // Add this gradient to a MaterialGroup.
            MaterialGroup myMaterialGroup = new MaterialGroup();
            myMaterialGroup.Children.Add(myDiffuseMaterial);

            // Define an Emissive Material with a blue brush.
            Color c = new Color();
            c.ScA = 1;
            c.ScB = 255;
            c.ScR = 0;
            c.ScG = 0;
            EmissiveMaterial myEmissiveMaterial = new EmissiveMaterial(new SolidColorBrush(c));

            // Add the Emmisive Material to the Material Group.
            myMaterialGroup.Children.Add(myEmissiveMaterial);

            // Add the composite material to the 3D model.
            myGeometryModel.Material = myMaterialGroup;
            // Apply a transform to the object. In this sample, a rotation transform is applied,  
            // rendering the 3D object rotated.
            RotateTransform3D myRotateTransform3D = new RotateTransform3D();
            AxisAngleRotation3D myAxisAngleRotation3d = new AxisAngleRotation3D();
            myAxisAngleRotation3d.Axis = new Vector3D(0,3,0);
            myAxisAngleRotation3d.Angle = 40;
            myRotateTransform3D.Rotation = myAxisAngleRotation3d;
            myGeometryModel.Transform = myRotateTransform3D;

            // Add the geometry model to the model group.
            myModel3DGroup.Children.Add(myGeometryModel);

            // Add the group of models to the ModelVisual3d.
            myModelVisual3D.Content = myModel3DGroup; 
            myViewport3D.Children.Add(myModelVisual3D);

            // Apply the viewport to the page so it will be rendered.
            this.Content = myViewport3D;
        }
    }
}

Imports System.Windows
Imports System.Windows.Controls
Imports System.Windows.Media
Imports System.Windows.Media.Media3D

Namespace SDKSample
	Partial Public Class EmissiveMaterialExample
		Inherits Page
		Public Sub New()

			' Declare scene objects.
			Dim myViewport3D As New Viewport3D()
			Dim myModel3DGroup As New Model3DGroup()
			Dim myGeometryModel As New GeometryModel3D()
			Dim myModelVisual3D As New ModelVisual3D()

			' Defines the camera used to view the 3D object. In order to view the 3D object,
			' the camera must be positioned and pointed such that the object is within view 
			' of the camera.
			Dim myPCamera As New PerspectiveCamera()

			' Specify where in the 3D scene the camera is.
			myPCamera.Position = New Point3D(0, 0, 2)

			' Specify the direction that the camera is pointing.
			myPCamera.LookDirection = New Vector3D(0, 0, -1)

			' Define camera's horizontal field of view in degrees.
			myPCamera.FieldOfView = 60

			' Asign the camera to the viewport
			myViewport3D.Camera = myPCamera

			' Define the lights cast in the scene. Without light, the 3D object cannot 
            ' be seen. Note: to illuminate an object from additional directions, create 
            ' additional lights.
            Dim myDirectionalLight As New DirectionalLight()
			myDirectionalLight.Color = Colors.White
			myDirectionalLight.Direction = New Vector3D(-0.61, -0.5, -0.61)

			myModel3DGroup.Children.Add(myDirectionalLight)

			' The geometry specifes the shape of the 3D plane. In this sample, a flat sheet 
			' is created.
			Dim myMeshGeometry3D As New MeshGeometry3D()

			' Create a collection of normal vectors for the MeshGeometry3D.
			Dim myNormalCollection As New Vector3DCollection()
			myNormalCollection.Add(New Vector3D(0,0,1))
			myNormalCollection.Add(New Vector3D(0,0,1))
			myNormalCollection.Add(New Vector3D(0,0,1))
			myNormalCollection.Add(New Vector3D(0,0,1))
			myNormalCollection.Add(New Vector3D(0,0,1))
			myNormalCollection.Add(New Vector3D(0,0,1))
			myMeshGeometry3D.Normals = myNormalCollection

			' Create a collection of vertex positions for the MeshGeometry3D. 
			Dim myPositionCollection As New Point3DCollection()
			myPositionCollection.Add(New Point3D(-0.5, -0.5, 0.5))
			myPositionCollection.Add(New Point3D(0.5, -0.5, 0.5))
			myPositionCollection.Add(New Point3D(0.5, 0.5, 0.5))
			myPositionCollection.Add(New Point3D(0.5, 0.5, 0.5))
			myPositionCollection.Add(New Point3D(-0.5, 0.5, 0.5))
			myPositionCollection.Add(New Point3D(-0.5, -0.5, 0.5))
			myMeshGeometry3D.Positions = myPositionCollection

			' Create a collection of texture coordinates for the MeshGeometry3D.
			Dim myTextureCoordinatesCollection As New PointCollection()
			myTextureCoordinatesCollection.Add(New Point(0, 0))
			myTextureCoordinatesCollection.Add(New Point(1, 0))
			myTextureCoordinatesCollection.Add(New Point(1, 1))
			myTextureCoordinatesCollection.Add(New Point(1, 1))
			myTextureCoordinatesCollection.Add(New Point(0, 1))
			myTextureCoordinatesCollection.Add(New Point(0, 0))
			myMeshGeometry3D.TextureCoordinates = myTextureCoordinatesCollection

			' Create a collection of triangle indices for the MeshGeometry3D.
			Dim myTriangleIndicesCollection As New Int32Collection()
			myTriangleIndicesCollection.Add(0)
			myTriangleIndicesCollection.Add(1)
			myTriangleIndicesCollection.Add(2)
			myTriangleIndicesCollection.Add(3)
			myTriangleIndicesCollection.Add(4)
			myTriangleIndicesCollection.Add(5)
			myMeshGeometry3D.TriangleIndices = myTriangleIndicesCollection

			' Apply the mesh to the geometry model.
			myGeometryModel.Geometry = myMeshGeometry3D
			' The material property of GeometryModel3D specifies the material applied to the 3D object.  
			' In this sample the material applied to the 3D object is made up of two materials layered  
			' on top of each other - a DiffuseMaterial (gradient brush) with an EmissiveMaterial 
			' layered on top (blue SolidColorBrush). The EmmisiveMaterial alters the appearance of  
			' the gradient toward blue.

			' Create a horizontal linear gradient with four stops.   
			Dim myHorizontalGradient As New LinearGradientBrush()
			myHorizontalGradient.StartPoint = New Point(0, 0.5)
			myHorizontalGradient.EndPoint = New Point(1, 0.5)
			myHorizontalGradient.GradientStops.Add(New GradientStop(Colors.Yellow, 0.0))
			myHorizontalGradient.GradientStops.Add(New GradientStop(Colors.Red, 0.25))
			myHorizontalGradient.GradientStops.Add(New GradientStop(Colors.Blue, 0.75))
			myHorizontalGradient.GradientStops.Add(New GradientStop(Colors.LimeGreen, 1.0))

			' Define material that will use the gradient.
			Dim myDiffuseMaterial As New DiffuseMaterial(myHorizontalGradient)

			' Add this gradient to a MaterialGroup.
			Dim myMaterialGroup As New MaterialGroup()
			myMaterialGroup.Children.Add(myDiffuseMaterial)

			' Define an Emissive Material with a blue brush.
			Dim c As New Color()
			c.ScA = 1
			c.ScB = 255
			c.ScR = 0
			c.ScG = 0
			Dim myEmissiveMaterial As New EmissiveMaterial(New SolidColorBrush(c))

			' Add the Emmisive Material to the Material Group.
			myMaterialGroup.Children.Add(myEmissiveMaterial)

			' Add the composite material to the 3D model.
			myGeometryModel.Material = myMaterialGroup
			' Apply a transform to the object. In this sample, a rotation transform is applied,  
			' rendering the 3D object rotated.
			Dim myRotateTransform3D As New RotateTransform3D()
			Dim myAxisAngleRotation3d As New AxisAngleRotation3D()
			myAxisAngleRotation3d.Axis = New Vector3D(0,3,0)
			myAxisAngleRotation3d.Angle = 40
			myRotateTransform3D.Rotation = myAxisAngleRotation3d
			myGeometryModel.Transform = myRotateTransform3D

			' Add the geometry model to the model group.
			myModel3DGroup.Children.Add(myGeometryModel)

			' Add the group of models to the ModelVisual3d.
			myModelVisual3D.Content = myModel3DGroup
			myViewport3D.Children.Add(myModelVisual3D)

			' Apply the viewport to the page so it will be rendered.
			Me.Content = myViewport3D
		End Sub
	End Class
End Namespace

Commenti

La Children proprietà di Model3DGroup è un Model3DCollectionoggetto.The Children property of Model3DGroup is a Model3DCollection.

Costruttori

Model3DCollection() Model3DCollection() Model3DCollection() Model3DCollection()

Inizializza una nuova istanza della classe Model3DCollection.Initializes a new instance of the Model3DCollection class.

Model3DCollection(IEnumerable<Model3D>) Model3DCollection(IEnumerable<Model3D>) Model3DCollection(IEnumerable<Model3D>) Model3DCollection(IEnumerable<Model3D>)

Inizializza una nuova istanza della classe Model3DCollection utilizzando l’insieme specificato.Initializes a new instance of the Model3DCollection class using the specified collection.

Model3DCollection(Int32) Model3DCollection(Int32) Model3DCollection(Int32) Model3DCollection(Int32)

Inizializza una nuova istanza della classe Model3DCollection con la capacità specificata.Initializes a new instance of the Model3DCollection class with the specified capacity.

Proprietà

CanFreeze CanFreeze CanFreeze CanFreeze

Ottiene un valore che indica se l'oggetto può essere impostato come non modificabile.Gets a value that indicates whether the object can be made unmodifiable.

(Inherited from Freezable)
Count Count Count Count

Ottiene il numero di oggetti Model3D contenuti nell'oggetto Model3DCollection.Gets the number of Model3D objects contained in the Model3DCollection.

DependencyObjectType DependencyObjectType DependencyObjectType DependencyObjectType

Ottiene la classe DependencyObjectType che include il tipo CLRCLR di questa istanza.Gets the DependencyObjectType that wraps the CLRCLR type of this instance.

(Inherited from DependencyObject)
Dispatcher Dispatcher Dispatcher Dispatcher

Ottiene l'oggetto Dispatcher associato a DispatcherObject.Gets the Dispatcher this DispatcherObject is associated with.

(Inherited from DispatcherObject)
HasAnimatedProperties HasAnimatedProperties HasAnimatedProperties HasAnimatedProperties

Ottiene un valore che indica se uno o più oggetti AnimationClock sono associati a una qualsiasi delle proprietà di dipendenza di questo oggetto.Gets a value that indicates whether one or more AnimationClock objects is associated with any of this object's dependency properties.

(Inherited from Animatable)
IsFrozen IsFrozen IsFrozen IsFrozen

Ottiene un valore che indica se l'oggetto è attualmente modificabile.Gets a value that indicates whether the object is currently modifiable.

(Inherited from Freezable)
IsSealed IsSealed IsSealed IsSealed

Ottiene un valore che indica se l'istanza è attualmente sealed (di sola lettura).Gets a value that indicates whether this instance is currently sealed (read-only).

(Inherited from DependencyObject)
Item[Int32] Item[Int32] Item[Int32] Item[Int32]

Ottiene o imposta l’oggetto Model3D in corrispondenza dell'indice in base zero specificato.Gets or sets the Model3D at the specified zero-based index.

Metodi

Add(Model3D) Add(Model3D) Add(Model3D) Add(Model3D)

Aggiunge un oggetto Model3D alla fine di Model3DCollection.Adds a Model3D object to the end of the Model3DCollection.

ApplyAnimationClock(DependencyProperty, AnimationClock) ApplyAnimationClock(DependencyProperty, AnimationClock) ApplyAnimationClock(DependencyProperty, AnimationClock) ApplyAnimationClock(DependencyProperty, AnimationClock)

Applica un oggetto AnimationClock all'oggetto DependencyProperty specificato.Applies an AnimationClock to the specified DependencyProperty. Se la proprietà è già animata, viene usato il comportamento di continuità di SnapshotAndReplace.If the property is already animated, the SnapshotAndReplace handoff behavior is used.

(Inherited from Animatable)
ApplyAnimationClock(DependencyProperty, AnimationClock, HandoffBehavior) ApplyAnimationClock(DependencyProperty, AnimationClock, HandoffBehavior) ApplyAnimationClock(DependencyProperty, AnimationClock, HandoffBehavior) ApplyAnimationClock(DependencyProperty, AnimationClock, HandoffBehavior)

Applica un oggetto AnimationClock all'oggetto DependencyProperty specificato.Applies an AnimationClock to the specified DependencyProperty. Se alla proprietà è già stata aggiunta un'animazione, viene utilizzato l'oggetto HandoffBehavior specificato.If the property is already animated, the specified HandoffBehavior is used.

(Inherited from Animatable)
BeginAnimation(DependencyProperty, AnimationTimeline) BeginAnimation(DependencyProperty, AnimationTimeline) BeginAnimation(DependencyProperty, AnimationTimeline) BeginAnimation(DependencyProperty, AnimationTimeline)

Applica un'animazione all'oggetto DependencyProperty specificato.Applies an animation to the specified DependencyProperty. L'animazione viene avviata quando viene eseguito il rendering del fotogramma successivo.The animation is started when the next frame is rendered. Se alla proprietà specificata è già applicata un'animazione, viene usato il comportamento di continuità di SnapshotAndReplace.If the specified property is already animated, the SnapshotAndReplace handoff behavior is used.

(Inherited from Animatable)
BeginAnimation(DependencyProperty, AnimationTimeline, HandoffBehavior) BeginAnimation(DependencyProperty, AnimationTimeline, HandoffBehavior) BeginAnimation(DependencyProperty, AnimationTimeline, HandoffBehavior) BeginAnimation(DependencyProperty, AnimationTimeline, HandoffBehavior)

Applica un'animazione all'oggetto DependencyProperty specificato.Applies an animation to the specified DependencyProperty. L'animazione viene avviata quando viene eseguito il rendering del fotogramma successivo.The animation is started when the next frame is rendered. Se alla proprietà specificata è già stata aggiunta un'animazione, viene utilizzato l'oggetto HandoffBehavior specificato.If the specified property is already animated, the specified HandoffBehavior is used.

(Inherited from Animatable)
CheckAccess() CheckAccess() CheckAccess() CheckAccess()

Determina se il thread chiamante ha accesso a DispatcherObject.Determines whether the calling thread has access to this DispatcherObject.

(Inherited from DispatcherObject)
Clear() Clear() Clear() Clear()

Rimuove tutti gli elementi dall'oggetto Model3DCollection.Removes all the items from this Model3DCollection.

ClearValue(DependencyProperty) ClearValue(DependencyProperty) ClearValue(DependencyProperty) ClearValue(DependencyProperty)

Cancella il valore locale di una proprietà.Clears the local value of a property. La proprietà da cancellare è specificata da un identificatore DependencyProperty.The property to be cleared is specified by a DependencyProperty identifier.

(Inherited from DependencyObject)
ClearValue(DependencyPropertyKey) ClearValue(DependencyPropertyKey) ClearValue(DependencyPropertyKey) ClearValue(DependencyPropertyKey)

Cancella il valore locale di una proprietà di sola lettura.Clears the local value of a read-only property. La proprietà da cancellare è specificata da un oggetto DependencyPropertyKey.The property to be cleared is specified by a DependencyPropertyKey.

(Inherited from DependencyObject)
Clone() Clone() Clone() Clone()

Crea un clone modificabile di questo oggetto Model3DCollection, eseguendo copie complete dei valori dell'oggetto.Creates a modifiable clone of this Model3DCollection, making deep copies of this object's values. Durante la copia delle proprietà di dipendenza, questo metodo copia i riferimenti alle risorse e i data binding (che potrebbero non essere più risolti), ma non le animazioni né i relativi valori correnti.When copying dependency properties, this method copies resource references and data bindings (but they might no longer resolve) but not animations or their current values.

CloneCore(Freezable) CloneCore(Freezable) CloneCore(Freezable) CloneCore(Freezable)

Rende l'istanza un clone (copia completa) dell'oggetto Freezable specificato usando i valori di proprietà di base (non animati).Makes the instance a clone (deep copy) of the specified Freezable using base (non-animated) property values.

(Inherited from Freezable)
CloneCurrentValue() CloneCurrentValue() CloneCurrentValue() CloneCurrentValue()

Crea un clone modificabile dell'oggetto Model3DCollection, eseguendo copie complete dei valori correnti di tale oggetto.Creates a modifiable clone of this Model3DCollection object, making deep copies of this object's current values. I riferimenti alle risorse, i data binding e le animazioni non vengono copiati, ma vengono copiati i relativi valori correnti.Resource references, data bindings, and animations are not copied, but their current values are.

CloneCurrentValueCore(Freezable) CloneCurrentValueCore(Freezable) CloneCurrentValueCore(Freezable) CloneCurrentValueCore(Freezable)

Rende l'istanza un clone (copia completa) modificabile dell'oggetto Freezable specificato usando i valori di proprietà correnti.Makes the instance a modifiable clone (deep copy) of the specified Freezable using current property values.

(Inherited from Freezable)
CoerceValue(DependencyProperty) CoerceValue(DependencyProperty) CoerceValue(DependencyProperty) CoerceValue(DependencyProperty)

Assegna forzatamente il valore della proprietà di dipendenza specificata.Coerces the value of the specified dependency property. Questa operazione viene eseguita richiamando qualsiasi funzione CoerceValueCallback specificata nei metadati della proprietà di dipendenza esistente nell'oggetto DependencyObject chiamante.This is accomplished by invoking any CoerceValueCallback function specified in property metadata for the dependency property as it exists on the calling DependencyObject.

(Inherited from DependencyObject)
Contains(Model3D) Contains(Model3D) Contains(Model3D) Contains(Model3D)

Determina se l'oggetto Model3D specificato è contenuto in Model3DCollection.Determines whether the specified Model3D is in this Model3DCollection.

CopyTo(Model3D[], Int32) CopyTo(Model3D[], Int32) CopyTo(Model3D[], Int32) CopyTo(Model3D[], Int32)

Copia gli elementi di Model3DCollection partendo dal valore di indice specificato in una matrice di oggetti Model3D.Copies the items of this Model3DCollection, starting with the specified index value, into an array of Model3D objects.

CreateInstance() CreateInstance() CreateInstance() CreateInstance()

Inizializza una nuova istanza della classe Freezable.Initializes a new instance of the Freezable class.

(Inherited from Freezable)
CreateInstanceCore() CreateInstanceCore() CreateInstanceCore() CreateInstanceCore()

Quando è implementato in una classe derivata, crea una nuova istanza della classe derivata Freezable.When implemented in a derived class, creates a new instance of the Freezable derived class.

(Inherited from Freezable)
Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determina se l'oggetto DependencyObject specificato equivale all'oggetto DependencyObject corrente.Determines whether a provided DependencyObject is equivalent to the current DependencyObject.

(Inherited from DependencyObject)
Freeze() Freeze() Freeze() Freeze()

Rende non modificabile l'oggetto corrente e ne imposta la proprietà IsFrozen su true.Makes the current object unmodifiable and sets its IsFrozen property to true.

(Inherited from Freezable)
FreezeCore(Boolean) FreezeCore(Boolean) FreezeCore(Boolean) FreezeCore(Boolean)

Rende immodificabile questo oggetto Animatable o determina se l'oggetto può essere reso immodificabile.Makes this Animatable object unmodifiable or determines whether it can be made unmodifiable.

(Inherited from Animatable)
GetAnimationBaseValue(DependencyProperty) GetAnimationBaseValue(DependencyProperty) GetAnimationBaseValue(DependencyProperty) GetAnimationBaseValue(DependencyProperty)

Restituisce il valore non animato dell'oggetto DependencyProperty specificato.Returns the non-animated value of the specified DependencyProperty.

(Inherited from Animatable)
GetAsFrozen() GetAsFrozen() GetAsFrozen() GetAsFrozen()

Crea una copia bloccata di Freezable, utilizzando valori delle proprietà di base (non-animati).Creates a frozen copy of the Freezable, using base (non-animated) property values. Dato che la copia è bloccata, gli oggetti secondari bloccati sono copiati dal riferimento.Because the copy is frozen, any frozen sub-objects are copied by reference.

(Inherited from Freezable)
GetAsFrozenCore(Freezable) GetAsFrozenCore(Freezable) GetAsFrozenCore(Freezable) GetAsFrozenCore(Freezable)

Si prenda ad esempio una copia bloccata di Freezable specificato utilizzando valori della proprietà di base (non-animati).Makes the instance a frozen clone of the specified Freezable using base (non-animated) property values.

(Inherited from Freezable)
GetCurrentValueAsFrozen() GetCurrentValueAsFrozen() GetCurrentValueAsFrozen() GetCurrentValueAsFrozen()

Crea una copia bloccata di Freezable utilizzando valori della proprietà correnti.Creates a frozen copy of the Freezable using current property values. Dato che la copia è bloccata, gli oggetti secondari bloccati sono copiati dal riferimento.Because the copy is frozen, any frozen sub-objects are copied by reference.

(Inherited from Freezable)
GetCurrentValueAsFrozenCore(Freezable) GetCurrentValueAsFrozenCore(Freezable) GetCurrentValueAsFrozenCore(Freezable) GetCurrentValueAsFrozenCore(Freezable)

Rende l’istanza corrente una copia bloccata di Freezablespecificato.Makes the current instance a frozen clone of the specified Freezable. Se l'oggetto dispone di proprietà di dipendenza animate, i valori animati correnti vengono copiati.If the object has animated dependency properties, their current animated values are copied.

(Inherited from Freezable)
GetEnumerator() GetEnumerator() GetEnumerator() GetEnumerator()

Restituisce un enumeratore in grado di scorrere la raccolta.Returns an enumerator that can iterate through the collection.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Ottiene un codice hash per DependencyObject.Gets a hash code for this DependencyObject.

(Inherited from DependencyObject)
GetLocalValueEnumerator() GetLocalValueEnumerator() GetLocalValueEnumerator() GetLocalValueEnumerator()

Crea un enumeratore specializzato per determinare le proprietà di dipendenza che presentano valori impostati localmente nell'oggetto DependencyObject.Creates a specialized enumerator for determining which dependency properties have locally set values on this DependencyObject.

(Inherited from DependencyObject)
GetType() GetType() GetType() GetType()

Ottiene l'oggetto Type dell'istanza corrente.Gets the Type of the current instance.

(Inherited from Object)
GetValue(DependencyProperty) GetValue(DependencyProperty) GetValue(DependencyProperty) GetValue(DependencyProperty)

Restituisce il valore effettivo corrente di una proprietà di dipendenza in questa istanza di DependencyObject.Returns the current effective value of a dependency property on this instance of a DependencyObject.

(Inherited from DependencyObject)
IndexOf(Model3D) IndexOf(Model3D) IndexOf(Model3D) IndexOf(Model3D)

Ottiene la posizione di indice della prima occorrenza dell'oggetto Model3D specificato.Gets the index position of the first occurrence of the specified Model3D.

Insert(Int32, Model3D) Insert(Int32, Model3D) Insert(Int32, Model3D) Insert(Int32, Model3D)

Inserisce un oggetto Model3D in Model3DCollection in corrispondenza della posizione di indice specificata.Inserts a Model3D into this Model3DCollection at the specified index position.

InvalidateProperty(DependencyProperty) InvalidateProperty(DependencyProperty) InvalidateProperty(DependencyProperty) InvalidateProperty(DependencyProperty)

Valuta di nuovo il valore effettivo della proprietà di dipendenza specificata.Re-evaluates the effective value for the specified dependency property

(Inherited from DependencyObject)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Crea una copia superficiale dell'oggetto Object corrente.Creates a shallow copy of the current Object.

(Inherited from Object)
OnChanged() OnChanged() OnChanged() OnChanged()

Chiamato quando viene modificato l'oggetto Freezable corrente.Called when the current Freezable object is modified.

(Inherited from Freezable)
OnFreezablePropertyChanged(DependencyObject, DependencyObject) OnFreezablePropertyChanged(DependencyObject, DependencyObject) OnFreezablePropertyChanged(DependencyObject, DependencyObject) OnFreezablePropertyChanged(DependencyObject, DependencyObject)

Assicura che adatti puntatori del contesto siano stabiliti per un membro dati DependencyObjectType che è appena stato impostato.Ensures that appropriate context pointers are established for a DependencyObjectType data member that has just been set.

(Inherited from Freezable)
OnFreezablePropertyChanged(DependencyObject, DependencyObject, DependencyProperty) OnFreezablePropertyChanged(DependencyObject, DependencyObject, DependencyProperty) OnFreezablePropertyChanged(DependencyObject, DependencyObject, DependencyProperty) OnFreezablePropertyChanged(DependencyObject, DependencyObject, DependencyProperty)

Questo membro supporta l'infrastruttura di Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF) e non deve essere usato direttamente dal codice.This member supports the Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF) infrastructure and is not intended to be used directly from your code.

(Inherited from Freezable)
OnPropertyChanged(DependencyPropertyChangedEventArgs) OnPropertyChanged(DependencyPropertyChangedEventArgs) OnPropertyChanged(DependencyPropertyChangedEventArgs) OnPropertyChanged(DependencyPropertyChangedEventArgs)

Esegue l'override dell'implementazione di DependencyObject di OnPropertyChanged(DependencyPropertyChangedEventArgs) per richiamare anche eventuali gestori Changed in risposta alla modifica di una proprietà di dipendenza di tipo Freezable.Overrides the DependencyObject implementation of OnPropertyChanged(DependencyPropertyChangedEventArgs) to also invoke any Changed handlers in response to a changing dependency property of type Freezable.

(Inherited from Freezable)
ReadLocalValue(DependencyProperty) ReadLocalValue(DependencyProperty) ReadLocalValue(DependencyProperty) ReadLocalValue(DependencyProperty)

Restituisce il valore locale di una proprietà di dipendenza, se esistente.Returns the local value of a dependency property, if it exists.

(Inherited from DependencyObject)
ReadPreamble() ReadPreamble() ReadPreamble() ReadPreamble()

Assicura che l’accesso di Freezable sia stato eseguito da un thread valido.Ensures that the Freezable is being accessed from a valid thread. Gli eredi di Freezable devono chiamare questo metodo all'inizio di qualsiasi APIAPI che legge i membri dei dati che non sono proprietà della dipendenza.Inheritors of Freezable must call this method at the beginning of any APIAPI that reads data members that are not dependency properties.

(Inherited from Freezable)
Remove(Model3D) Remove(Model3D) Remove(Model3D) Remove(Model3D)

Rimuove la prima occorrenza dell'oggetto Model3D specificato da Model3DCollection.Removes the first occurrence of the specified Model3D from the Model3DCollection.

RemoveAt(Int32) RemoveAt(Int32) RemoveAt(Int32) RemoveAt(Int32)

Rimuove Model3D da Model3DCollection in corrispondenza della posizione di indice specificata.Removes the Model3D at the specified index position from the Model3DCollection.

SetCurrentValue(DependencyProperty, Object) SetCurrentValue(DependencyProperty, Object) SetCurrentValue(DependencyProperty, Object) SetCurrentValue(DependencyProperty, Object)

Imposta il valore di una proprietà di dipendenza senza modificare l'origine del valore.Sets the value of a dependency property without changing its value source.

(Inherited from DependencyObject)
SetValue(DependencyProperty, Object) SetValue(DependencyProperty, Object) SetValue(DependencyProperty, Object) SetValue(DependencyProperty, Object)

Imposta il valore locale di una proprietà di dipendenza, specificato dal relativo identificatore della proprietà di dipendenza.Sets the local value of a dependency property, specified by its dependency property identifier.

(Inherited from DependencyObject)
SetValue(DependencyPropertyKey, Object) SetValue(DependencyPropertyKey, Object) SetValue(DependencyPropertyKey, Object) SetValue(DependencyPropertyKey, Object)

Imposta il valore locale di una proprietà di dipendenza di sola lettura, specificato dall'identificatore DependencyPropertyKey della proprietà di dipendenza.Sets the local value of a read-only dependency property, specified by the DependencyPropertyKey identifier of the dependency property.

(Inherited from DependencyObject)
ShouldSerializeProperty(DependencyProperty) ShouldSerializeProperty(DependencyProperty) ShouldSerializeProperty(DependencyProperty) ShouldSerializeProperty(DependencyProperty)

Restituisce un valore che indica se i processi di serializzazione devono serializzare il valore della proprietà di dipendenza specificata.Returns a value that indicates whether serialization processes should serialize the value for the provided dependency property.

(Inherited from DependencyObject)
ToString() ToString() ToString() ToString()

Restituisce una stringa che rappresenta l'oggetto corrente.Returns a string that represents the current object.

(Inherited from Object)
VerifyAccess() VerifyAccess() VerifyAccess() VerifyAccess()

Impone che il thread chiamante abbia accesso a DispatcherObject.Enforces that the calling thread has access to this DispatcherObject.

(Inherited from DispatcherObject)
WritePostscript() WritePostscript() WritePostscript() WritePostscript()

Genera l'evento Changed per Freezable e richiama il metodo OnChanged().Raises the Changed event for the Freezable and invokes its OnChanged() method. Le classi che derivano da Freezable devono chiamare questo metodo alla fine di qualsiasi API che modifica i membri di classe che non sono archiviati come proprietà di dipendenza.Classes that derive from Freezable should call this method at the end of any API that modifies class members that are not stored as dependency properties.

(Inherited from Freezable)
WritePreamble() WritePreamble() WritePreamble() WritePreamble()

Verifica che l'oggetto Freezable non sia bloccato e che l'accesso sia eseguito da un contesto di threading valido.Verifies that the Freezable is not frozen and that it is being accessed from a valid threading context. Gli eredi di Freezable devono chiamare questo metodo all'inizio di qualsiasi APIAPI che scrive sui membri dei dati che non sono proprietà della dipendenza.Freezable inheritors should call this method at the beginning of any APIAPI that writes to data members that are not dependency properties.

(Inherited from Freezable)

Implementazioni dell'interfaccia esplicita

ICollection.CopyTo(Array, Int32) ICollection.CopyTo(Array, Int32) ICollection.CopyTo(Array, Int32) ICollection.CopyTo(Array, Int32)

Per una descrizione di questo membro, vedere CopyTo(Array, Int32).For a description of this member, see CopyTo(Array, Int32).

ICollection.IsSynchronized ICollection.IsSynchronized ICollection.IsSynchronized ICollection.IsSynchronized

Per una descrizione di questo membro, vedere IsSynchronized.For a description of this member, see IsSynchronized.

ICollection.SyncRoot ICollection.SyncRoot ICollection.SyncRoot ICollection.SyncRoot

Per una descrizione di questo membro, vedere SyncRoot.For a description of this member, see SyncRoot.

ICollection<Model3D>.IsReadOnly ICollection<Model3D>.IsReadOnly ICollection<Model3D>.IsReadOnly ICollection<Model3D>.IsReadOnly

Per una descrizione di questo membro, vedere IsReadOnly.For a description of this member, see IsReadOnly.

IEnumerable.GetEnumerator() IEnumerable.GetEnumerator() IEnumerable.GetEnumerator() IEnumerable.GetEnumerator()

Per una descrizione di questo membro, vedere GetEnumerator().For a description of this member, see GetEnumerator().

IEnumerable<Model3D>.GetEnumerator() IEnumerable<Model3D>.GetEnumerator() IEnumerable<Model3D>.GetEnumerator() IEnumerable<Model3D>.GetEnumerator()

Per una descrizione di questo membro, vedere GetEnumerator().For a description of this member, see GetEnumerator().

IList.Add(Object) IList.Add(Object) IList.Add(Object) IList.Add(Object)

Per una descrizione di questo membro, vedere Add(Object).For a description of this member, see Add(Object).

IList.Contains(Object) IList.Contains(Object) IList.Contains(Object) IList.Contains(Object)

Per una descrizione di questo membro, vedere Contains(Object).For a description of this member, see Contains(Object).

IList.IndexOf(Object) IList.IndexOf(Object) IList.IndexOf(Object) IList.IndexOf(Object)

Per una descrizione di questo membro, vedere IndexOf(Object).For a description of this member, see IndexOf(Object).

IList.Insert(Int32, Object) IList.Insert(Int32, Object) IList.Insert(Int32, Object) IList.Insert(Int32, Object)

Per una descrizione di questo membro, vedere Insert(Int32, Object).For a description of this member, see Insert(Int32, Object).

IList.IsFixedSize IList.IsFixedSize IList.IsFixedSize IList.IsFixedSize

Per una descrizione di questo membro, vedere IsFixedSize.For a description of this member, see IsFixedSize.

IList.IsReadOnly IList.IsReadOnly IList.IsReadOnly IList.IsReadOnly

Per una descrizione di questo membro, vedere IsReadOnly.For a description of this member, see IsReadOnly.

IList.Item[Int32] IList.Item[Int32] IList.Item[Int32] IList.Item[Int32]

Per una descrizione di questo membro, vedere Item[Int32].For a description of this member, see Item[Int32].

IList.Remove(Object) IList.Remove(Object) IList.Remove(Object) IList.Remove(Object)

Per una descrizione di questo membro, vedere Remove(Object).For a description of this member, see Remove(Object).

Eventi

Changed Changed Changed Changed

Si verifica quando Freezable o un oggetto che contiene è modificato.Occurs when the Freezable or an object it contains is modified.

(Inherited from Freezable)

Metodi di estensione

CopyToDataTable<T>(IEnumerable<T>) CopyToDataTable<T>(IEnumerable<T>) CopyToDataTable<T>(IEnumerable<T>) CopyToDataTable<T>(IEnumerable<T>)

Restituisce un oggetto DataTable che contiene copie degli oggetti DataRow, dato un oggetto IEnumerable<T> di input dove il parametro generico DataRow è T.Returns a DataTable that contains copies of the DataRow objects, given an input IEnumerable<T> object where the generic parameter T is DataRow.

CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption)

Copia gli oggetti DataRow nell'oggetto DataTable specificato, dato un oggetto IEnumerable<T> di input dove il parametro generico T è DataRow.Copies DataRow objects to the specified DataTable, given an input IEnumerable<T> object where the generic parameter T is DataRow.

CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler)

Copia gli oggetti DataRow nell'oggetto DataTable specificato, dato un oggetto IEnumerable<T> di input dove il parametro generico T è DataRow.Copies DataRow objects to the specified DataTable, given an input IEnumerable<T> object where the generic parameter T is DataRow.

Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable)

Esegue il cast degli elementi di un oggetto IEnumerable nel tipo specificato.Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable)

Filtra gli elementi di un oggetto IEnumerable in base a un tipo specificato.Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable)

Consente la parallelizzazione di una query.Enables parallelization of a query.

AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable)

Converte un oggetto IEnumerable in un oggetto IQueryable.Converts an IEnumerable to an IQueryable.

Ancestors<T>(IEnumerable<T>) Ancestors<T>(IEnumerable<T>) Ancestors<T>(IEnumerable<T>) Ancestors<T>(IEnumerable<T>)

Restituisce una raccolta di elementi che contiene i predecessori di ciascun nodo nella raccolta di origine.Returns a collection of elements that contains the ancestors of every node in the source collection.

Ancestors<T>(IEnumerable<T>, XName) Ancestors<T>(IEnumerable<T>, XName) Ancestors<T>(IEnumerable<T>, XName) Ancestors<T>(IEnumerable<T>, XName)

Restituisce una raccolta di elementi filtrati che contiene i predecessori di ciascun nodo nella raccolta di origine.Returns a filtered collection of elements that contains the ancestors of every node in the source collection. Solo gli elementi che hanno un oggetto XName corrispondente vengono inclusi nella raccolta.Only elements that have a matching XName are included in the collection.

DescendantNodes<T>(IEnumerable<T>) DescendantNodes<T>(IEnumerable<T>) DescendantNodes<T>(IEnumerable<T>) DescendantNodes<T>(IEnumerable<T>)

Restituisce una raccolta di nodi discendenti di ciascun documento ed elemento nella raccolta di origine.Returns a collection of the descendant nodes of every document and element in the source collection.

Descendants<T>(IEnumerable<T>) Descendants<T>(IEnumerable<T>) Descendants<T>(IEnumerable<T>) Descendants<T>(IEnumerable<T>)

Restituisce una raccolta di elementi che contiene gli elementi discendenti di ciascun elemento e documento nella raccolta di origine.Returns a collection of elements that contains the descendant elements of every element and document in the source collection.

Descendants<T>(IEnumerable<T>, XName) Descendants<T>(IEnumerable<T>, XName) Descendants<T>(IEnumerable<T>, XName) Descendants<T>(IEnumerable<T>, XName)

Restituisce una raccolta filtrata di elementi che contiene gli elementi discendenti di ciascun elemento e documento nella raccolta di origine.Returns a filtered collection of elements that contains the descendant elements of every element and document in the source collection. Solo gli elementi che hanno un oggetto XName corrispondente vengono inclusi nella raccolta.Only elements that have a matching XName are included in the collection.

Elements<T>(IEnumerable<T>) Elements<T>(IEnumerable<T>) Elements<T>(IEnumerable<T>) Elements<T>(IEnumerable<T>)

Restituisce una raccolta di elementi figlio di ciascun elemento e documento nella raccolta di origine.Returns a collection of the child elements of every element and document in the source collection.

Elements<T>(IEnumerable<T>, XName) Elements<T>(IEnumerable<T>, XName) Elements<T>(IEnumerable<T>, XName) Elements<T>(IEnumerable<T>, XName)

Restituisce una raccolta filtrata degli elementi figlio di ciascun elemento e documento nella raccolta di origine.Returns a filtered collection of the child elements of every element and document in the source collection. Solo gli elementi che hanno un oggetto XName corrispondente vengono inclusi nella raccolta.Only elements that have a matching XName are included in the collection.

InDocumentOrder<T>(IEnumerable<T>) InDocumentOrder<T>(IEnumerable<T>) InDocumentOrder<T>(IEnumerable<T>) InDocumentOrder<T>(IEnumerable<T>)

Restituisce una raccolta di nodi che contiene tutti i nodi nella raccolta di origine ordinati in base all'ordine con cui sono riportati nel documento.Returns a collection of nodes that contains all nodes in the source collection, sorted in document order.

Nodes<T>(IEnumerable<T>) Nodes<T>(IEnumerable<T>) Nodes<T>(IEnumerable<T>) Nodes<T>(IEnumerable<T>)

Restituisce una raccolta di nodi figlio di ciascun documento ed elemento nella raccolta di origine.Returns a collection of the child nodes of every document and element in the source collection.

Remove<T>(IEnumerable<T>) Remove<T>(IEnumerable<T>) Remove<T>(IEnumerable<T>) Remove<T>(IEnumerable<T>)

Rimuove ciascun nodo nella raccolta di origine dal nodo padre.Removes every node in the source collection from its parent node.

Si applica a

Vedi anche