StylusPointDescription.GetCommonDescription Metodo
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Restituisce l'intersezione degli oggetti StylusPointDescription specificati.
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
Public Shared Function GetCommonDescription (stylusPointDescription As StylusPointDescription, stylusPointDescriptionPreserveInfo As StylusPointDescription) As StylusPointDescription
Parametri
- stylusPointDescription
- StylusPointDescription
Primo oggetto StylusPointDescription da intersecare.
- stylusPointDescriptionPreserveInfo
- StylusPointDescription
Secondo oggetto StylusPointDescription da intersecare.
Restituisce
Oggetto StylusPointDescription contenente le proprietà presenti in entrambi gli oggetti specificati StylusPointDescription .
Esempio
Nell'esempio seguente viene illustrato come trovare il comune StylusPointDescription da due oggetti diversi StylusPointDescription .
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)
Commenti
StylusPointDescription1
e stylusPointDescriptionPreserveInfo
possono avere una proprietà comune, ma i vincoli specificati nei rispettivi StylusPointPropertyInfo oggetti differiscono. Se i vincoli sono diversi, il GetCommonDescription metodo usa da StylusPointPropertyInfostylusPointDescriptionPreserveInfo
.