Archives de
Category: Uncategorized

Blend Behaviors : Expand textbox and add dot dot dot ellipsis

Blend Behaviors : Expand textbox and add dot dot dot ellipsis

Behaviors is one of the nicest feature in WPF and Silverlight. This article will show how to create and use 2 behaviors : Expand a textbox depending on it’s content Add ‘…’ if the textbox content exceed it’s container size. Here is a sample video : [jwplayer config=”GrundgeAdaptSmall” file=”http://www.alphablog.org/TiercePartie/Video/BehaviorSample.mp4″] There is two behaviors and one helper class in my solution : And the graphic stack :   AddDotDotDotToTextboxBehavior This class is binded on the ‘…’ textblock and contains a reference…

Lire la suite Lire la suite