Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adorners in WPF
Message
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Titre:
Divers
Thread ID:
01283198
Message ID:
01285443
Vues:
20
These are just placement reasons: adorners are usually placed at the corners of an element and therefore you have to know the width and height of it. As it's possible that the element is not completely drawn at this time you have to use the DesiredSize properties in order to get the correct size of the adorned element.

Example: Assume the elements width = 100 and the adorners width = 8. You usually want to place the left upper adorner with its center on the corner. Therefore you have to place it at Element.Left - 4 (=Adorner.Width / 2):

topLeft.Arrange(new Rect(-adornerWidth / 2, -adornerHeight / 2, adornerWidth, adornerHeight));

Gerhard
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform