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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T14:52:05+00:00 2026-05-22T14:52:05+00:00

<Page xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml Background=Black> <!– Rounded yellow border –> <Border BorderThickness=3 BorderBrush=Yellow CornerRadius=10 Padding=2

  • 0
<Page
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  Background="Black">
    <!-- Rounded yellow border -->
    <Border BorderThickness="3" BorderBrush="Yellow" CornerRadius="10" Padding="2"
        HorizontalAlignment="Center" VerticalAlignment="Center">
      <Grid>
         <!-- Rounded mask (stretches to fill Grid) -->
         <Border Name="mask" Background="White" CornerRadius="7"/>
         <!-- Main content container -->
         <StackPanel>
             <!-- Use a VisualBrush of 'mask' as the opacity mask -->
             <StackPanel.OpacityMask>
                 <VisualBrush Visual="{Binding ElementName=mask}"/>
             </StackPanel.OpacityMask>
             <!-- Any content -->
             <Image Source="http://chriscavanagh.files.wordpress.com/2006/12/chriss-blog-banner.jpg"/>
             <Rectangle Height="50" Fill="Red"/>
             <Rectangle Height="50" Fill="White"/>
             <Rectangle Height="50" Fill="Blue"/>
         </StackPanel>
      </Grid>
    </Border>
</Page>

This XAML is from WPF – Easy rounded corners for anything but it doesn’t work form me =(

<Border Canvas.Left="55"
        Canvas.Top="30"
        Width="100"
        Height="Auto"
        Margin="12,12,8,0"
        VerticalAlignment="Top"
        BorderBrush="#FF3B5998"
        BorderThickness=".5"
        CornerRadius="18">
    <Border.Effect>
        <DropShadowEffect BlurRadius="5"
                          Opacity=".5"
                          ShadowDepth="3" />
    </Border.Effect>
    <Border Name="ReceiverColor"
            BorderBrush="#FF96B2E4"
            BorderThickness="6"
            CornerRadius="15">
        <Border Name="Mask"
                BorderBrush="#FF3B5998"
                BorderThickness=".5"
                CornerRadius="13">
                <StackPanel>
                    <StackPanel.OpacityMask>
                        <VisualBrush Visual="{Binding ElementName=Mask}" />
                    </StackPanel.OpacityMask>
                    <Image Name="Receiver" />
                </StackPanel>
        </Border>
    </Border>
</Border>

— EDIT —
I make borders sizes to auto and change source of image to an image from a link
when window loaded border size becomes as image size but image not shown !!!

  • 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-22T14:52:06+00:00Added an answer on May 22, 2026 at 2:52 pm

    You forgot the Grid that makes the mask and the image siblings and nested the image in the mask. and you forgot to set the background of the mask.

    This works:

    <Grid>
        <Border Canvas.Left="55"
                Canvas.Top="30"
                Width="100"
                Height="Auto"
                Margin="12,12,8,0"
                VerticalAlignment="Top"
                BorderBrush="#FF3B5998"
                BorderThickness=".5"
                CornerRadius="18">
            <Border.Effect>
                <DropShadowEffect BlurRadius="5"
                                  Opacity=".5"
                                  ShadowDepth="3" />
            </Border.Effect>
            <Border Name="ReceiverColor"
                    BorderBrush="#FF96B2E4"
                    BorderThickness="6"
                    CornerRadius="15">
                <Grid>
                    <Border Name="Mask"
                            Background="White"
                            BorderBrush="#FF3B5998"
                            BorderThickness=".5"
                            CornerRadius="13">
                    </Border>
                    <StackPanel>
                        <Image Name="Receiver"
                               Source="/Images/test.jpg" />
                        <StackPanel.OpacityMask>
                            <VisualBrush Visual="{Binding ElementName=Mask}" />
                        </StackPanel.OpacityMask>
                    </StackPanel>
                </Grid>
            </Border>
        </Border>
    </Grid>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is my xaml file. <UserControl xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml x:Class=SilverlightApplication1.Page Width=640 Height=480 xmlns:d=http://schemas.microsoft.com/expression/blend/2008 xmlns:mc=http://schemas.openxmlformats.org/markup-compatibility/2006 mc:Ignorable=d
Why does this xaml code not work? <Page xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml> <Grid> <Grid.Resources> <ControlTemplate x:Key=btnTemplate
<Window x:Class=MyWindow xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml xmlns:src=clr-namespace:WpfApplication1 Title=ContactsSelector Height=300 Width=300> <Window.Content> <src:MyPage> <!--MyPage is a page
Can someone explain this WPF behaviour? <Page xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml> <Grid> <!-- Rounded mask -->
MainWindow.xaml <Window x:Class=MainWindow xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml xmlns:my=clr-namespace:MyStuff;assembly=MyStuff Title=MainWindow Height=350 Width=525> <Grid> <TabControl Margin=5> <TabItem Header=Start
I have page like this ... <Page x:Class=WPFTestRig.Page1 xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml Title=Page1> <Grid> <StackPanel> <ComboBox
Here you have a very simple standalone XAML file: <!-- MyListBox.xaml --> <Page xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation
I have the following ItemsControl page... <Page x:Class=Kiosk.View.ItemListView xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml xmlns:mc=http://schemas.openxmlformats.org/markup-compatibility/2006 xmlns:d=http://schemas.microsoft.com/expression/blend/2008 xmlns:Converter=clr-namespace:Kiosk.Converter mc:Ignorable=d
My xaml code is below; <Page x:Class=Ab3d.PowerToys.Samples.Objects3D.Model3DFactorySample xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml xmlns:cameras=clr-namespace:Ab3d.Cameras;assembly=Ab3d.PowerToys xmlns:ab3d=clr-namespace:Ab3d.Controls;assembly=Ab3d.PowerToys xmlns:visuals=clr-namespace:Ab3d.Visuals;assembly=Ab3d.PowerToys Title=AllModelsSample MinWidth=600>
This one is driving me crazy. Here's the XAML: <UserControl x:Class=SilverlightApplication1.Page xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml> <Grid

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.