Content Alignment TextBox & RadComboBox

2 posts, 0 answers
  1. Bob
    Bob avatar
    1 posts
    Member since:
    Apr 2017

    Posted 07 Dec 2017 Link to this post

    Is there a simple way to get the text in a RadComboBox and a TextBox to be aligned?  Both controls are aligned but the text within the controls are slightly misaligned.




    Sample XAML:

    <Window x:Class="AlignmentIssue.MainWindow"
                    Title="MainWindow" Height="350" Width="525">
                <ColumnDefinition />
                <RowDefinition Height="45" />
                <RowDefinition Height="45" />
                <RowDefinition Height="*" />

            <telerik:RadComboBox Grid.Column="0"
                <telerik:RadComboBoxItem Content="Begin Item 1" />
                <telerik:RadComboBoxItem Content="Begin Item 2" />

            <TextBox Grid.Column="0"
                     Text="Begin Alignment Test" />


  2. Sia
    Sia avatar
    713 posts

    Posted 08 Dec 2017 Link to this post


    The easiest way to align the content would be to use the Padding of these two controls. For example you can set Padding="6 0" to the RadComboBox and Padding="5 2" in implicit style targetting all RadComboBoxItems. Or set custom Padding="1 2" to the TextBox. These values work for our default Office Black theme.

    Progress Telerik
    Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Back to Top