Skip to content

Another form of password box.

cs
[TemplatePart(Name = ElementPanel, Type = typeof(Panel))]
public class PinBox : Control

Attributes

PropertyDescriptionDefault ValueRemarks
PasswordPasswordFor security reasons, cannot bind
PasswordCharMask character
IsSafeEnabled
UnsafePassword
LengthPassword length4The minimum value is 4
SelectionTextBrush
SelectionOpacity
SelectionBrush
CaretBrushProperty
ItemMarginCell Interval
ItemWidthCell width
ItemHeightCell height

Events

NameDescription
CompletedTriggered when input is complete

Case

xml
<StackPanel Margin="32" VerticalAlignment="Center" hc:PinBox.Completed="PinBox_OnCompleted">
    <hc:PinBox Length="4" Password="1234"/>
    <hc:PinBox Length="6" Password="123456" Margin="0,16,0,0" PasswordChar="❤"/>
</StackPanel>

PinBox

Released under the MIT License.