Custom Template

2 posts, 0 answers
  1. mariusz piatek
    mariusz piatek avatar
    16 posts
    Member since:
    Mar 2010

    Posted 05 Jul 2011 Link to this post

    Hello,
    I creted custom template for input control. But it doesn't work properly
    <Style TargetType="telerik:RadMaskedNumericInput">
           <Setter Property="Margin" Value="2 2 2 2"/>
           <Setter Property="IsClearButtonVisible" Value="False"/>
           <Setter Property="TextMode" Value="PlainText"/>
           <Setter Property="KeyboardNavigation.TabNavigation" Value="Local"/>
           <Setter Property="Validation.ErrorTemplate">
               <Setter.Value>
                   <ControlTemplate>
                   </ControlTemplate>
               </Setter.Value>
           </Setter>
           <Style.Triggers>
               <Trigger Property="Validation.HasError" Value="true">
                   <Setter Property="ToolTip" Value="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors)[0].ErrorContent}"/>
                   <Setter Property="BorderBrush" Value="Red"/>
               </Trigger>
           </Style.Triggers>
       </Style>

    First of all ClearButton is still visible.

    BorderBrush changed to red after validation error, but only after I focus and unfocus control.
    ValidationError don't appear in ToolTip.
    I use newest compilation.
  2. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 07 Jul 2011 Link to this post

    Hi Mariusz Piatek,

    I wasn't able to reproduce the issue on our side. Can you please have a look at the attached sample and let me know if it works for you or if I am missing something?

    All the best,
    Tina Stancheva
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

  3. UI for WPF is Visual Studio 2017 Ready
Back to Top