Set Minimum Value in Style

2 posts, 0 answers
  1. Monica
    Monica avatar
    4 posts
    Member since:
    Oct 2010

    Posted 15 May 2012 Link to this post

    I have a reference in my xaml as such:

    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" />

    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'.
           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
                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)

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

  2. Tina Stancheva
    Tina Stancheva avatar
    3299 posts

    Posted 18 May 2012 Link to this post

    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.

    Tina Stancheva
    the Telerik team

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

Back to Top