PersonPicture Klasse

Definition

Stellt ein Steuerelement dar, das das Avatarbild für eine Person anzeigt, sofern ein solches Bild verfügbar ist. Andernfalls werden die Initialen der Person oder eine allgemeine Glyphe angezeigt.

Diese Dokumentation gilt für WinUI 2 für UWP (für WinUI im Windows App SDK siehe Windows App SDK Namespaces).

/// [Microsoft.UI.Xaml.MUXContractProperty(version=5)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Version(1)]
class PersonPicture : Control
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Version(1)]
/// [Microsoft.UI.Xaml.CustomAttributes.MUXContractProperty(version=5)]
/// [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
/// [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallbackMethodName(value="OnPropertyChanged")]
class PersonPicture : Control
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
/// [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallbackMethodName(value="OnPropertyChanged")]
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.UI.Xaml.XamlContract, 65536)]
class PersonPicture : Control
[Microsoft.UI.Xaml.MUXContractProperty(version=5)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Version(1)]
public class PersonPicture : Control
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Version(1)]
[Microsoft.UI.Xaml.CustomAttributes.MUXContractProperty(version=5)]
[Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
[Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallbackMethodName(value="OnPropertyChanged")]
public class PersonPicture : Control
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
[Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallbackMethodName(value="OnPropertyChanged")]
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.UI.Xaml.XamlContract), 65536)]
public class PersonPicture : Control
Public Class PersonPicture
Inherits Control
<PersonPicture/>
Vererbung
PersonPicture
Attribute
Microsoft.UI.Xaml.MUXContractPropertyAttribute MarshalingBehaviorAttribute ThreadingAttribute VersionAttribute Microsoft.UI.Xaml.CustomAttributes.MUXContractPropertyAttribute Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallbackAttribute Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallbackMethodNameAttribute ContractVersionAttribute

Beispiele

Tipp

Weitere Informationen, Entwurfsanleitungen und Codebeispiele finden Sie unter Personenbild.

Die App WinUI 2-Katalog umfasst interaktive Beispiele für die meisten WinUI 2-Steuerelemente, -Features und -Funktionen. Rufen Sie die App aus dem Microsoft Store oder den Quellcode auf GitHub ab.

Hinweise

Steuerelementstil und -vorlage

Sie können den Standardstil und die ControlTemplate ändern, um dem Steuerelement ein eindeutiges Erscheinungsbild zu verleihen. Informationen zum Ändern des Stils und der Vorlage eines Steuerelements finden Sie unter XAML-Formatvorlagen. Der Standardstil, die Vorlage und die Ressourcen, die das Erscheinungsbild des Steuerelements definieren, sind in der generic.xaml Datei enthalten. Zu Entwurfszwecken generic.xaml wird mit dem NuGet-Paket WinUI (Microsoft.UI.Xaml) installiert. Standardmäßig ist der Speicherort \Users\<username>\.nuget\packages\microsoft.ui.xaml\<version>\lib\uap10.0\Microsoft.UI.Xaml\Themes\generic.xaml. Stile und Ressourcen aus verschiedenen WinUI-Versionen können unterschiedliche Werte aufweisen.

XAML enthält auch Ressourcen, mit denen Sie die Farben eines Steuerelements in verschiedenen visuellen Zuständen ändern können, ohne die Steuerelementvorlage zu ändern. Das Ändern dieser Ressourcen wird bevorzugt, um Eigenschaften wie Hintergrund und Vordergrund festzulegen. Weitere Informationen finden Sie im Abschnitt Leichtes Formatieren des Artikels XAML-Formatvorlagen .

Konstruktoren

PersonPicture()

Initialisiert eine neue instance der PersonPicture-Klasse.

Diese Dokumentation gilt für WinUI 2 für UWP (für WinUI im Windows App SDK siehe Windows App SDK Namespaces).

Eigenschaften

BadgeGlyph

Ruft eine Segoe MDL2 Assets-Schriftart ab, die auf dem Badge angezeigt werden soll, oder legt diese fest.

Diese Dokumentation gilt für WinUI 2 für UWP (für WinUI im Windows App SDK siehe Windows App SDK Namespaces).

BadgeGlyphProperty

Identifiziert die BadgeGlyph-Abhängigkeitseigenschaft.

Diese Dokumentation gilt für WinUI 2 für UWP (für WinUI im Windows App SDK siehe Windows App SDK Namespaces).

BadgeImageSource

Ruft die Quelle eines Bilds ab, das auf dem Badge angezeigt werden soll, oder legt diese fest.

Diese Dokumentation gilt für WinUI 2 für UWP (für WinUI im Windows App SDK siehe Windows App SDK Namespaces).

BadgeImageSourceProperty

Identifiziert die BadgeImageSource-Abhängigkeitseigenschaft.

Diese Dokumentation gilt für WinUI 2 für UWP (für WinUI im Windows App SDK siehe Windows App SDK Namespaces).

BadgeNumber

Ruft die Kontaktnummer ab, die auf dem Badge angezeigt werden soll, oder legt diese fest.

Diese Dokumentation gilt für WinUI 2 für UWP (für WinUI im Windows App SDK siehe Windows App SDK Namespaces).

BadgeNumberProperty

Gibt die BadgeNumber-Abhängigkeitseigenschaft an.

Diese Dokumentation gilt für WinUI 2 für UWP (für WinUI im Windows App SDK siehe Windows App SDK Namespaces).

BadgeText

Ruft den Kontakttext ab, der auf dem Badge angezeigt werden soll, oder legt diesen fest.

Diese Dokumentation gilt für WinUI 2 für UWP (für WinUI im Windows App SDK siehe Windows App SDK Namespaces).

BadgeTextProperty

Identifiziert die BadgeText-Abhängigkeitseigenschaft.

Diese Dokumentation gilt für WinUI 2 für UWP (für WinUI im Windows App SDK siehe Windows App SDK Namespaces).

Contact

Ruft ein Contact-Objekt ab, das Informationen zur Person enthält, oder legt es fest.

Diese Dokumentation gilt für WinUI 2 für UWP (für WinUI im Windows App SDK siehe Windows App SDK Namespaces).

ContactProperty

Identifiziert die Contact-Abhängigkeitseigenschaft.

Diese Dokumentation gilt für WinUI 2 für UWP (für WinUI im Windows App SDK siehe Windows App SDK Namespaces).

DisplayName

Ruft den Anzeigenamen des Kontakts ab oder legt diese fest.

Diese Dokumentation gilt für WinUI 2 für UWP (für WinUI im Windows App SDK siehe Windows App SDK Namespaces).

DisplayNameProperty

Identifiziert die DisplayName-Abhängigkeitseigenschaft.

Diese Dokumentation gilt für WinUI 2 für UWP (für WinUI im Windows App SDK siehe Windows App SDK Namespaces).

Initials

Ruft die Initialen des Kontakts ab oder legt sie fest.

Diese Dokumentation gilt für WinUI 2 für UWP (für WinUI im Windows App SDK siehe Windows App SDK Namespaces).

InitialsProperty

Identifiziert die Initials-Abhängigkeitseigenschaft.

Diese Dokumentation gilt für WinUI 2 für UWP (für WinUI im Windows App SDK siehe Windows App SDK Namespaces).

IsGroup

Ruft einen Wert ab, der angibt, ob personPicture eine Gruppe oder eine Einzelperson darstellt, oder legt diesen fest.

Diese Dokumentation gilt für WinUI 2 für UWP (für WinUI im Windows App SDK siehe Windows App SDK Namespaces).

IsGroupProperty

Identifiziert die IsGroup-Abhängigkeitseigenschaft.

Diese Dokumentation gilt für WinUI 2 für UWP (für WinUI im Windows App SDK siehe Windows App SDK Namespaces).

PreferSmallImage

Ruft einen Wert ab, der angibt, ob ein kleines Bild anstelle eines großen Bilds angezeigt wird, wenn beide verfügbar sind, oder legt diesen fest.

Diese Dokumentation gilt für WinUI 2 für UWP (für WinUI im Windows App SDK siehe Windows App SDK Namespaces).

PreferSmallImageProperty

Identifiziert die Abhängigkeitseigenschaft PreferSmallImage.

Diese Dokumentation gilt für WinUI 2 für UWP (für WinUI im Windows App SDK siehe Windows App SDK Namespaces).

ProfilePicture

Ruft die Quelle des Profilbilds des Kontakts ab oder legt diese fest.

Diese Dokumentation gilt für WinUI 2 für UWP (für WinUI im Windows App SDK siehe Windows App SDK Namespaces).

ProfilePictureProperty

Identifiziert die ProfilePicture-Abhängigkeitseigenschaft.

Diese Dokumentation gilt für WinUI 2 für UWP (für WinUI im Windows App SDK siehe Windows App SDK Namespaces).

TemplateSettings

Stellt berechnete Werte bereit, auf die beim Definieren von Vorlagen für eine PersonPicture als TemplatedParent-Quellen verwiesen werden können. Nicht für den allgemeinen Gebrauch vorgesehen.

Diese Dokumentation gilt für WinUI 2 für UWP (für WinUI im Windows App SDK siehe Windows App SDK Namespaces).

Gilt für:

Weitere Informationen