Table of Contents
- Getting Started
- EO.Pdf
- EO.Web
- EO.WebBrowser
- EO.Wpf
- Common Topics
- Reference
- .NET API Reference
- EO.Base
- EO.Base.UI
- EO.Extensions
- EO.Pdf
- EO.Pdf.Acm
- EO.Pdf.Contents
- EO.Pdf.Drawing
- EO.Pdf.Mvc
- EO.Web
- EO.WebBrowser
- EO.WebBrowser.DOM
- EO.WebEngine
- EO.WinForm
- EO.Wpf
- EO.Wpf
- Classes
- BareButton Class
- Bitmap Class
- BitmapButton Class
- BooleanDependencyPropertyRoutedEventArgs Class
- Button Class
- Calendar Class
- CalendarDayButton Class
- CalendarMonth Class
- CancelEventArgs Class
- CheckBox Class
- ChoiceMaskedEditSegment Class
- ComboBox Class
- ComboBoxItem Class
- DatePicker Class
- DateRangeCollection Class
- DateRangeCollectionConverter Class
- DockContainer Class
- DockItem Class
- DockItemClosingEventArgs Class
- DockItemCollection Class
- DockItemEventArgs Class
- DockItemNeededEventArgs Class
- DockView Class
- DockViewCollection Class
- DockViewCommands Class
- DockViewEventArgs Class
- DockViewNeededEventArgs Class
- DocumentItem Class
- DropDown Class
- DropDownButton Class
- DropDownService Class
- EditItemEventArgs Class
- Effect Class
- EffectManager Class
- Expander Class
- ItemDragEventArgs Class
- ItemDragOverEventArgs Class
- ItemDropEventArgs Class
- ItemsControlHelper Class
- LinkButton Class
- ListBox Class
- ListBoxItem Class
- MaskedEdit Class
- MaskedEditSegment Class
- MaskMaskedEditSegment Class
- Menu Class
- MenuBase Class
- MenuItem Class
- MonthPicker Class
- MultiplyConverter Class
- NamedResourceKey Class
- NegationConverter Class
- NewItemRequestedEventArgs Class
- NumericMaskedEditSegment Class
- OpacityConverter Class
- PatternMaskedEditSegment Class
- PdfViewer Class
- ProgressBar Class
- RadialPanel Class
- RadioButton Class
- RangeSlider Class
- RegexMaskedEditSegment Class
- RingDefinition Class
- RingDefinitionCollection Class
- Runtime Class
- SkinStyleInfo Class
- Slider Class
- SliderBase Class
- SpinEdit Class
- SpinEdit Class
- SpinEdit Members
- SpinEdit Constructor
- Fields
- Properties
- Properties
- AllowEmpty Property
- DecimalDigits Property
- DecreaseLarge Property
- DecreaseSmall Property
- Delay Property
- IncreaseLarge Property
- IncreaseSmall Property
- Interval Property
- IsEmpty Property
- IsInteger Property
- IsReadOnly Property
- MaximizeValue Property
- MinimizeValue Property
- NumberFormatInfo Property
- RangeIndicatorStyle Property
- ShowRangeIndicator Property
- SpinButtonsOrientation Property
- SpinDownButtonStyle Property
- SpinUpButtonStyle Property
- Text Property
- ValueFormat Property
- ValueFormatString Property
- Methods
- SplitButton Class
- SplitLineHeightConverter Class
- SplitView Class
- StaticMaskedEditSegment Class
- TabControl Class
- TabItem Class
- TabItemCloseEventArgs Class
- TabItemEventArgs Class
- TemplatePresenter Class
- ThemeManager Class
- ThemeNames Class
- ThemeStyleInfo Class
- TreeView Class
- TreeViewItem Class
- UIElementHelper Class
- UnitConverter Class
- WebControl Class
- WebView Class
- WebViewHost Class
- WeekDaysCollection Class
- WindowChrome Class
- WindowCommands Class
- YearPicker Class
- Structures
- Enumerations
- Delegates
- EO.Wpf.Gauge
- EO.Wpf.Gauge.Shapes
- EO.Wpf.Primitives
- EO.Wpf.Themes.Aero
- EO.Wpf.Themes.Classic
- EO.Wpf.Themes.Luna
- EO.Wpf.Themes.Metro
- EO.Wpf.Themes.Royale
- JavaScript API Reference
- .NET API Reference
NumberFormatInfo Property |
Gets or sets the NumberFormatInfo object used to format the value of the SpinEdit. This is a dependency property.
Property Value
The default value is null
.
The SpinEdit control provides ValueFormat and DecimalDigits that offers basic formating, if advanced formatting is required an instance of the NumberFormatInfo class can be used.
Note that the NumberFormatInfo
property is used together with ValueFormat to format the Value; for example, if you want to change the way currencies are formatted, make sure that the ValueFormat property is set to Currency.
The following example uses an instance of the NumberFormatInfo to override the default currency symbol and also use the minus sign (-) instead of the parenthesis for negative format:
<Window x:Class="Test.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:eo="http://schemas.essentialobjects.com/wpf/" xmlns:g="clr-namespace:System.Globalization;assembly=mscorlib" Title="MainWindow" Height="250" Width="350"> <Window.Resources> <g:NumberFormatInfo x:Key="CustomValueFormat" CurrencyNegativePattern="1" CurrencySymbol="£"></g:NumberFormatInfo> </Window.Resources> <StackPanel Margin="10"> <eo:SpinEdit HorizontalAlignment="Left" Minimum="-10" Maximum="10" Value="-1" Width="100" ValueFormat="Currency" NumberFormatInfo="{StaticResource CustomValueFormat}" /> </StackPanel> </Window>
The above code produces the following result: