Set clear button / search button style

4 posts, 0 answers
  1. jakub
    jakub avatar
    4 posts
    Member since:
    May 2014

    Posted 12 Mar 2015 Link to this post

    Hi there,

    I am trying to personalize my control. I need to change image for search and clear. How to achieve that?

    <telerikInput:RadAutoCompleteBox x:Name="radAutoCompleteBox" TextWrapping="Wrap" Text="RadAutoCompleteBox" VerticalAlignment="Center" ActionButtonVisibility="Visible" ClearButtonVisibility="Visible" InputScope="PersonalFullName" BorderBrush="#FF27221D" Background="#FF27221D" Foreground="#FFD6C3AD" Margin="0,24,0,0" FontSize="18.667" FontFamily="Segoe WP Light"/>


  2. Ivaylo Gergov
    Admin
    Ivaylo Gergov avatar
    661 posts

    Posted 17 Mar 2015 Link to this post

    Hi,

    You can change the appearance of these buttons through the RadAutoCompleteBox.ClearButtonStyle and RadAutoCompleteBox.ActionButtonStyle properties.

    Please, let me know should you need further assistance.

    Regards,
    Ivaylo Gergov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. DevCraft banner
  4. jakub
    jakub avatar
    4 posts
    Member since:
    May 2014

    Posted 26 Mar 2015 in reply to Ivaylo Gergov Link to this post

    Do you have any sample? Ie adding own icon with url
  5. Ivaylo Gergov
    Admin
    Ivaylo Gergov avatar
    661 posts

    Posted 30 Mar 2015 Link to this post

    Hello,

    Here's an example:

    <input:RadAutoCompleteBox.ActionButtonStyle>
        <Style TargetType="telerikTextBox:TextBoxActionButton">
            <Setter Property="PressedStateImageSource" Value="url1" />
            <Setter Property="RestStateImageSource" Value="url2" />
            <Setter Property="DisabledStateImageSource" Value="url3" />
            <Setter Property="ButtonShape" Value="Image" />
            <Setter Property="ButtonType" Value="Custom" />
        </Style>
    </input:RadAutoCompleteBox.ActionButtonStyle>

    The style of the ClearButton can be set in a similar manner.

    Please, let me know how it goes.

    Regards,
    Ivaylo Gergov
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
Back to Top
DevCraft banner