Skip to content

NumberInput zh CN

末城via edited this page Jun 17, 2023 · 2 revisions

NumberInput 数字输入框

返回目录

适用于:   v1.1.8 或更新的版本

概述

此文档待补充。


示例

示例1


<pu:NumberInput Height="30"
                Width="180"
                Minimum="0"
                Maximum="100"
                Interval="0.5"
                Value="50"
                Watermark="Input number"
                ValueChanged="NumberInput_ValueChanged" />

示例2

xmlns:pu="https://opensource.panuon.com/wpf-ui"
xmlns:purs="clr-namespace:Panuon.WPF.UI.Resources;assembly=Panuon.WPF.UI"
...

<pu:NumberInput Height="30"
                Width="180"
                Minimum="0"
                Maximum="100"
                Value="50"
                Watermark="数字"
                UpDownButtonsOrientation="Horizontal"
                ValueChanged="NumberInput_ValueChanged">
    <pu:NumberInput.UpDownButtonStyle>
        <Style TargetType="RepeatButton"
               BasedOn="{StaticResource {x:Static pu:NumberInput.UpDownButtonStyleKey}}">
            <Style.Triggers>
                <Trigger Property="Tag"
                         Value="Up">
                    <Setter Property="Content"
                            Value="&#xe934;" />
                </Trigger>
                <Trigger Property="Tag"
                         Value="Down">
                    <Setter Property="Content"
                            Value="&#xe935;" />
                </Trigger>
            </Style.Triggers>
        </Style>
    </pu:NumberInput.UpDownButtonStyle>
</pu:NumberInput>

Language

WPF 简体中文

Clone this wiki locally