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

  • Home
  • SEARCH
  • 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 889407
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T13:33:44+00:00 2026-05-15T13:33:44+00:00

I have the following XAML: <Border x:Name=ClippingBorder VerticalAlignment=Stretch BorderThickness=0> <Border.Clip> <RectangleGeometry RadiusX=4.4 RadiusY=4.4 Rect={Binding

  • 0

I have the following XAML:

<Border x:Name="ClippingBorder" VerticalAlignment="Stretch" BorderThickness="0">
    <Border.Clip>
        <RectangleGeometry RadiusX="4.4" RadiusY="4.4" Rect="{Binding ClippingRectangle}"/>
    </Border.Clip>
</Border>

And the following codebehind:

    private Rect clippingRectangle;
    public Rect ClippingRectangle
    {
        get
        {
            return clippingRectangle;
        }
        set
        {
            clippingRectangle = value;
            NotifyPropertyChanged("ClippingRectangle");

        }
    }


    public MainPage()
    {
        InitializeComponent();

        //Get the actual height of the content frame
        ClippingBorder.DataContext = this;
        ContentFrame.SizeChanged += new SizeChangedEventHandler(ContentFrame_SizeChanged);
    }

    void ContentFrame_SizeChanged(object sender, SizeChangedEventArgs e)
    {
        MessageBox.Show(e.NewSize.Height.ToString());
        ClippingRectangle = new Rect(0,0,798,e.NewSize.Height);
    }

The resize works, but unfortunately the clipping is not working in that the rounded corners are not rounded. If I substitute the ClippingRectangle binding for static values it works. But when I use the binding it does not. Is there a solution for 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-15T13:33:45+00:00Added an answer on May 15, 2026 at 1:33 pm

    It turns out that setting the Border.Clip property in the codebehind resolves the issue.

        void ContentFrame_SizeChanged(object sender, SizeChangedEventArgs e)
        {
            RectangleGeometry clipRect = new RectangleGeometry();
            clipRect.Rect = new Rect(0,0,798,e.NewSize.Height);
            clipRect.RadiusX = 4.4;
            clipRect.RadiusY = 4.4;
            ClippingBorder.Clip = clipRect;
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following xaml-Code: <Border x:Name=border> <Border.Style> <Style TargetType={x:Type Border}> <Style.Triggers> <DataTrigger Binding={Binding
I have following XAML: <TextBlock HorizontalAlignment=Center VerticalAlignment=Center FontSize=10 FontFamily=Arial Foreground=#414141> <Run Text={Binding LoadsCount} />
I have the following xaml: <Border BorderBrush=Black BorderThickness=1.5 CornerRadius=5> <Grid ShowGridLines=True> <Grid.ColumnDefinitions> <ColumnDefinition Width=Auto/>
I have the following XAML code : <Image Source="a.jpg" HorizontalAlignment="Center" VerticalAlignment="Center" Stretch="Uniform"/> and I,
I have the following XAML: <StackPanel> <StackPanel Orientation=Horizontal> <Border Name=B1 Width=Auto> <DataGrid /> </Border>
I have the following XAML: <ListBox HorizontalAlignment=Left Margin=0,6,0,10 Name=listBox1 Width=468 ItemsSource={Binding} Grid.ColumnSpan=1> <ItemsControl.ItemTemplate> <DataTemplate>
I have the following xaml in my window: <Border Height=100 BorderBrush=Black BorderThickness=2 CornerRadius=10 Background=PaleVioletRed
I have the following XAML code: <phone:PhoneApplicationPage.ApplicationBar> <shell:ApplicationBar IsVisible=True IsMenuEnabled=False x:Name=PageBar> <shell:ApplicationBarIconButton IconUri=/Assets/Icons/appbar.questionmark.rest.png Text=Help
I have the following in my XAML: <Grid x:Name=LayoutRoot Background=White> <Grid.RowDefinitions> <RowDefinition Height=20/> <RowDefinition
I have the following XAML markup in a WPF DataGrid: <DataGrid ItemsSource={Binding ResultList} Grid.ColumnSpan=4

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.