Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6897911
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:13:44+00:00 2026-05-27T07:13:44+00:00

I have created custom ctextbox with the following code. But I am not able

  • 0

I have created custom ctextbox with the following code. But I am not able provide the roundcorner border for this.

public class FilteredTextBox : TextBox
{


    public FilteredTextBox()
        : base()
    {
        IsNumeric = false;
        IsRegex = false;
        IsRequired = false;
        ErrorMsg = "";
        RegexText = "";
        HorizontalAlignment = HorizontalAlignment.Stretch;
        Margin = new Thickness(0);
        BorderThickness = new Thickness(1);
        var border = new Border {CornerRadius = new CornerRadius(4)};
     }
   }

Please guide me on this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T07:13:45+00:00Added an answer on May 27, 2026 at 7:13 am

    You can do this with a style for your custom TextBox:

    <Page
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
      <Grid>
    
        <Grid.Resources>
          <Style x:Key="CustomTextBoxStyle" TargetType="{x:Type TextBox}">
            <Setter Property="Template">
              <Setter.Value>
                <ControlTemplate TargetType="{x:Type TextBoxBase}">
                  <Border
                    CornerRadius="4"
                    Padding="2"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="1" >
                    <ScrollViewer Margin="0" x:Name="PART_ContentHost"/>
                  </Border>
                </ControlTemplate>
              </Setter.Value>
            </Setter>
          </Style>
        </Grid.Resources>
    
        <Grid VerticalAlignment="Center" HorizontalAlignment="Center">
          <CustomTextBox Style="{StaticResource CustomTextBoxStyle}" Text="TextBox with CornerRadius" BorderBrush="Black" />
        </Grid>
    
      </Grid>
    </Page>
    

    hope this helps

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

friends, i have created custom title bar using following titlebar.xml file with code <?xml
i have created a custom dialog class public class NewPost extends Dialog { //
I have created custom exception class public class Web2PDFException : Exception { public Web2PDFException(string
I have created a Custom preference which has the following constructor public CoordinatesPreference(Context context,
I have created custom aplication resource: class Custom_Entitymanager extends Zend_Application_Resource_ResourceAbstract{ //... public function init
I have created a custom class from a tutorial online. It works fine, but
I have created custom controller by following http://code.google.com/apis/maps/documentation/javascript/controls.html Is there any way to remove
I have created a custom form class and template for my form by following
I have created a custom tag that looks like this: def textField = {
I have created custom result class to serialize json data to xml. I want

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.