XAML设置RadNumericUpDown的NumberFormatInfo

来源:互联网 发布:大拿监控软件下载 编辑:程序博客网 时间:2024/05/16 06:33

原文出处:http://www.telerik.com/community/forums/wpf/numeric-up-down/setting-numberformatinfo-in-xaml.aspx

<Window x:Class="NumericUpDown.NumericWindow"     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"     xmlns:globalization="clr-namespace:System.Globalization;assembly=mscorlib"     xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Input"     Title="NumericTestWindow" Height="300" Width="300">     <Window.Resources>           <globalization:NumberFormatInfo x:Key="numberFormatInfo" NumberDecimalDigits="0" />     </Window.Resources>      <Grid x:Name="LayoutRoot" Background="White">         <telerik:RadNumericUpDown x:Name="Numeric1" ValueFormat="Numeric" Height="25" Width="100"             SmallChange="1" NumberFormatInfo="{StaticResource numberFormatInfo}" Maximum="10" Value="5" />     </Grid> </Window> 



原创粉丝点击