Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
65
Rounded Text Box
posted

Hi

 

How to create Rounded Text Box In WPF using Infrsgistics Tool?

Parents
No Data
Reply
  • 7305
    Verified Answer
    posted

    Hello,

    You can use one of our Editor controls. The closest to TextBox would be the xamMaskedInput. You would still need to template the control, just like you would do with TextBox in order to give it a rounded border look.

    Here is an example of one way of doing it with ControlTemplate:

    XAML Namespaces:

       xmlns:igEditors="http://infragistics.com/Editors"

       xmlns:igPrim="http://schemas.infragistics.com/xaml/primitives"

    XAML Code:

    <ControlTemplate x:Key="maskedEditor" TargetType="ig:XamMaskedInput">
            <Border x:Name="MainBorder" CornerRadius="5" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
                   <Grid>
                         <igPrim:MaskedInputTextBox x:Name="PART_InputTextBox" Foreground="{TemplateBinding Foreground}"  TextAlignment="Center"/>
                   </Grid>
            </Border>
    </ControlTemplate>
    
    . . .
    <ig:XamMaskedInput Text="xamMaskedEditor"
                                   Height="30" Width="200" Margin="5" PromptChar=""
                                   Template="{StaticResource maskedEditor}" >
    </ig:XamMaskedInput>
    

     

    Hopefully this works for you. Let me know if you have any questions.

    Sam

Children