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 6696825
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:23:13+00:00 2026-05-26T06:23:13+00:00

I have a Grid with various child elements like Grid, Stackpanel, Image …Is it

  • 0

I have a Grid with various child elements like Grid, Stackpanel, Image…Is it possible to round the corners of the grid in a way that crops ALL of the contents? Additionally, the root Grid can vary in size so that cannot be hard coded.

Edit: After a great deal of searching I found that the best solution for this problem is using ClippingBehavior as susggested by @wdavo, thanks! The real problem is not knowing the dimensions of the image. If you know the dimensions then there are many simple out of the box solutions out there.

  • 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-26T06:23:14+00:00Added an answer on May 26, 2026 at 6:23 am

    You can use this clipping behavior

    http://expressionblend.codeplex.com/SourceControl/changeset/view/61176#494852

    You’ll need the Expression Blend SDK installed

    <UserControl
    x:Class="RoundedCorners.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:behaviors="clr-namespace:Expression.Samples.Interactivity"
    xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
    mc:Ignorable="d"
    d:DesignHeight="800"
    d:DesignWidth="800">
    <Grid
        x:Name="LayoutRoot"
        Background="White"
        Margin="50">
        <Grid
            Background="LightGreen">
            <Grid.RowDefinitions>
                <RowDefinition />
                <RowDefinition
                    Height="Auto" />
            </Grid.RowDefinitions>
            <i:Interaction.Behaviors>
                <behaviors:ClippingBehavior
                    CornerRadius="30" />
            </i:Interaction.Behaviors>
            <Image
                Grid.Row="0"
                Stretch="Fill"
                Source="Image.JPG" />
            <StackPanel
                Grid.Row="1">
                <TextBlock
                    Text="Hello" />
                <TextBlock
                    Text="World" />
            </StackPanel>
        </Grid>
    </Grid>
    

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

Sidebar

Related Questions

I have a grid laid out like so; +---------+---------+ | Image | Details |
We have a form that contains various elements and a datagrid. When the list
We have a set of ~10-15 windows desktops that we use for various grid
I have a grid and I need to dynamically replace a control that resides
I have a grid that has multiple rows. I want to hide/show one of
I have a Grid inside a Canvas defined like this: <Canvas x:Name=outerCanvas> <Grid Grid.Row=1
I have a grid of data that I want to export to RTF, PDF
I have a grid of various UIButtons (5 x 5)... Now I have a
I have a concept for a framework of controls that I would like to
I have a database with a table that records data coming from various sources.

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.