StylusPointDescription.GetCommonDescription(StylusPointDescription, StylusPointDescription) Método

Definição

Retorna a interseção dos objetos StylusPointDescription especificados.Returns the intersection of the specified StylusPointDescription objects.

public:
 static System::Windows::Input::StylusPointDescription ^ GetCommonDescription(System::Windows::Input::StylusPointDescription ^ stylusPointDescription, System::Windows::Input::StylusPointDescription ^ stylusPointDescriptionPreserveInfo);
public static System.Windows.Input.StylusPointDescription GetCommonDescription (System.Windows.Input.StylusPointDescription stylusPointDescription, System.Windows.Input.StylusPointDescription stylusPointDescriptionPreserveInfo);
static member GetCommonDescription : System.Windows.Input.StylusPointDescription * System.Windows.Input.StylusPointDescription -> System.Windows.Input.StylusPointDescription

Parâmetros

stylusPointDescription
StylusPointDescription

O primeiro StylusPointDescription a ser interseccionado.The first StylusPointDescription to intersect.

stylusPointDescriptionPreserveInfo
StylusPointDescription

O segundo StylusPointDescription a ser interseccionado.The second StylusPointDescription to intersect.

Retornos

Um StylusPointDescription que contém as propriedades presentes se ambos os objetos StylusPointDescription especificados estiverem presentes.A StylusPointDescription that contains the properties that are present if both of the specified StylusPointDescription objects.

Exemplos

O exemplo a seguir demonstra como localizar o comum StylusPointDescription de dois objetos StylusPointDescription diferentes.The following example demonstrates how to find the common StylusPointDescription from two different StylusPointDescription objects.

StylusDevice currentStylus = Stylus.CurrentStylusDevice;
StylusPointDescription description1 =
      new StylusPointDescription(new StylusPointPropertyInfo[]
                    {
                        new StylusPointPropertyInfo(StylusPointProperties.X),
                        new StylusPointPropertyInfo(StylusPointProperties.Y),
                        new StylusPointPropertyInfo(StylusPointProperties.NormalPressure),
                        new StylusPointPropertyInfo(StylusPointProperties.XTiltOrientation),
                        new StylusPointPropertyInfo(StylusPointProperties.YTiltOrientation),
                        new StylusPointPropertyInfo(StylusPointProperties.BarrelButton)
                    });

StylusPointDescription description2 = currentStylus.GetStylusPoints(inkCanvas1).Description;

StylusPointDescription description3 = 
    StylusPointDescription.GetCommonDescription(description1, description2);

StylusPointCollection points = currentStylus.GetStylusPoints(inkCanvas1, description3);
Dim currentStylus As StylusDevice = Stylus.CurrentStylusDevice

Dim description1 As New StylusPointDescription(New StylusPointPropertyInfo() _
    {New StylusPointPropertyInfo(StylusPointProperties.X), _
     New StylusPointPropertyInfo(StylusPointProperties.Y), _
     New StylusPointPropertyInfo(StylusPointProperties.NormalPressure), _
     New StylusPointPropertyInfo(StylusPointProperties.XTiltOrientation), _
     New StylusPointPropertyInfo(StylusPointProperties.YTiltOrientation), _
     New StylusPointPropertyInfo(StylusPointProperties.BarrelButton)})

Dim description2 As StylusPointDescription = currentStylus.GetStylusPoints(inkCanvas1).Description

Dim description3 As StylusPointDescription = _
                        StylusPointDescription.GetCommonDescription(description1, description2)

Dim points As StylusPointCollection = currentStylus.GetStylusPoints(inkCanvas1, description3)

Comentários

StylusPointDescription1e stylusPointDescriptionPreserveInfo pode ter uma propriedade comum, mas as restrições especificadas em seus respectivos StylusPointPropertyInfo objetos diferem.StylusPointDescription1 and stylusPointDescriptionPreserveInfo may have a common property, yet the constraints specified in their respective StylusPointPropertyInfo objects differ. Se as restrições forem diferentes, GetCommonDescription o método usará stylusPointDescriptionPreserveInfoo StylusPointPropertyInfo de.If the constraints differ, the GetCommonDescription method uses the StylusPointPropertyInfo from stylusPointDescriptionPreserveInfo.

Aplica-se a