This is a migrated thread and some comments may be shown as answers.

Set Minimum Value in Style

1 Answer 149 Views
MaskedInput (Numeric, DateTime, Text, Currency)
This is a migrated thread and some comments may be shown as answers.
Monica
Top achievements
Rank 1
Monica asked on 15 May 2012, 11:43 PM
I have a reference in my xaml as such:
xmlns:maskedInput="clr-namespace:Telerik.Windows.Controls.MaskedInput;assembly=Telerik.Windows.Controls.Input"

I am trying to set the Minimum value in the style as such:
        <Style x:Key="RadMaskedCurrencyInputStyle" TargetType="telerik:RadMaskedCurrencyInput">
            <Setter Property="maskedInput:MaskedInputExtensions.Minimum" Value="0" />
        </Style>

This throws an exception at run time:  
System.Windows.Markup.XamlParseException occurred
  Message='Set property 'System.Windows.Setter.Property' threw an exception.' Line number '10' and line position '14'.
  Source=PresentationFramework
  LineNumber=10
  LinePosition=14
  StackTrace:
       at System.Windows.Markup.XamlReader.RewrapException(Exception e, IXamlLineInfo lineInfo, Uri baseUri)
       at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
       at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri)
       at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream)
       at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
       at TestRadControl.MainWindow.InitializeComponent() in ...\Documents\Visual Studio 2010\Projects\TestRadControl\TestRadControl\MainWindow.xaml:line 1
       at TestRadControl.MainWindow..ctor() in ...2010\Projects\TestRadControl\TestRadControl\MainWindow.xaml.cs:line 25
  InnerException: System.ArgumentNullException
       Message=Value cannot be null.
Parameter name: property
       Source=PresentationFramework
       ParamName=property
       StackTrace:
            at System.Windows.Setter.CheckValidProperty(DependencyProperty property)
            at System.Windows.Baml2006.WpfSharedBamlSchemaContext.<Create_BamlProperty_Setter_Property>b__1c0(Object target, Object value)
            at System.Windows.Baml2006.WpfKnownMemberInvoker.SetValue(Object instance, Object value)
            at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(XamlMember member, Object obj, Object value)
            at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(Object inst, XamlMember property, Object value)
       InnerException: 


Is this a flaw with Telerik's implementation of the Minimum dependency property?  I am using version 2011 SP1.

Thanks,
Monica

1 Answer, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 18 May 2012, 02:21 PM
Hi Monica,

Unfortunately I wasn't able to reproduce this issue on our side using the Q1 2012 SP1 release. This is why I attached the sample project I created to test it. Can you please have a look at it and let me know if it works for you or if I've missed something? Thank you in advance.

Greetings,
Tina Stancheva
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
MaskedInput (Numeric, DateTime, Text, Currency)
Asked by
Monica
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Share this question
or