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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:34:16+00:00 2026-05-24T23:34:16+00:00

i have this code: <Window x:Class=WpfApplication8.MainWindow xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml Title=MainWindow Height=350 Width=525> <Grid> <ScrollViewer Background=#FFADB9CD

  • 0

i have this code:

    <Window x:Class="WpfApplication8.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
        <ScrollViewer Background="#FFADB9CD"  >
            <Grid>
                <Border Name="mask" Height="{Binding ElementName=cnvsEtikett, Path=Height}" Width="{Binding ElementName=cnvsEtikett, Path=Width}" Background="White" CornerRadius="6"/>
                <Canvas Height="100" Name="cnvsEtikett" Width="200" Background="White" ClipToBounds="True">
                    <Canvas.OpacityMask>
                        <VisualBrush Visual="{Binding ElementName=mask}" />
                    </Canvas.OpacityMask>
                    <TextBlock Height="23.2"  Text="TextBlock" Canvas.Left="63" Canvas.Top="41" />
                </Canvas>
            </Grid>
        </ScrollViewer>
    </Grid>
</Window>

I want the canvas to have rounded corners, which works until i drag the textblock to either side. then the corners dissappear. this is a simple recreation of the window in my programm, there i use drag and drop operations to move the textblock. I really need those rounded corners, but i am absolutely clueless of how i could solve this problem!

any ideas??

edit: it seems as if the canvas is stretched as the textblock is moved to the edge ( because the corner radius changes too!)

  • 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-24T23:34:17+00:00Added an answer on May 24, 2026 at 11:34 pm

    Just thought of another solution..

    <Border ClipToBounds="True" CornerRadius="6" Background="White" Name="brdEtikett" Height="200" Width="200" >
        <Canvas Name="cnvsEtikett" Background="Transparent"  />
    </Border>
    

    set the background of the border to the color you want on the canvas and make the canvas transparent!!

    this way you don’t have to put padding or margin on the elements!

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

Sidebar

Related Questions

In a wpf project I have this XAML code <Window 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
This is the code to reproduce this issue: xaml: <Window x:Class=WpfApplication1.MainWindow xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml Title=MainWindow
I have this code for my very very basic WPF Project. <Window x:Class=WpfApplication1.Window1 xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation
I have this code: public class Window extends JFrame { public Window(){ ... JButton
I have the following simple code: <Window x:Class=WpfApplication3.MainWindow x:Name=WindowInst …> <local:UserControl1/> </Window> <UserControl x:Class=WpfApplication3.UserControl1
I have this code: <div class=window-compl> <div class=window showincatalog showing> <h2>Text1</h2> </div> <div class=window>
I have this form submit code: Event.observe(window, 'load', init, false); function init() { Event.observe('addressForm',
I have a greasemonkey user script with this single line of code... window.close(); but
In my application (WPF) i have this window: public partial class Window1 : Window
I'm a beginner in Android. Here I have this code: public class GPS extends

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.