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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T09:03:13+00:00 2026-05-21T09:03:13+00:00

I have my own control which derives from StackPanel. This control contains two other

  • 0

I have my own control which derives from StackPanel. This control contains two other controls, first Border (with TextBlock inside) and StackPanel (able to containes other StackPanels).
Now, when I new StackPanel is added to the internal StackPanel I would like to draw a Line which could connect Border with a new added StackPanel.
I guess this can be handle in code, so when I need StackPanel is added I could determine his and Border locations, and base on this I could draw a line. So my question is: can you see any other ways to achieve the same result? how can keep the link between Border and StackPanel when one of the items it is dragging the layout ?
Thank you for your help
BR Jarek

  • 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-21T09:03:13+00:00Added an answer on May 21, 2026 at 9:03 am

    You can do this the super-easy way by doing something like this:

    <Grid x:Name="LayoutRoot" Background="White">
        <StackPanel>
            <Border Margin="10 0 0 0" BorderBrush="Black" BorderThickness="5 0 0 0" >
                <TextBlock Text="MyText" Margin="5 0 0 0 " />
            </Border>
            <StackPanel Margin="10 0 0 0" Orientation="Vertical">
                <Border  BorderBrush="Black" BorderThickness="5 0 0 0">
                    <TextBlock Text="Sub-Item 1" Margin="15 0 0 0" />
                </Border>
                <Border  BorderBrush="Pink" BorderThickness="5 0 0 0">
                    <TextBlock Text="Sub-Item 2" Margin="15 0 0 0" />
                </Border>
                <Border  BorderBrush="Black" BorderThickness="5 0 0 0">
                    <TextBlock Text="Sub-Item 3" Margin="25 0 0 0" />
                </Border>
            </StackPanel>
        </StackPanel>
    </Grid>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created my own control which contains TextBox control as a child control.
I have my own custom control derived from System.Windows.Forms.TreeView which is present on the
I have a custom control of class DottedCanvas inherited from Canvas, which contains some
I have my own custom Content Provider that loads a database which contains the
I have an ASP.NET Page that contains a User control called ReportCtrl (my own
So the problem is the following : i do have own user control. which
Currently using System.Web.UI.WebControls.FileUpload wrapped in our own control. We have licenses for Telerik. I
I am trying to make my own user control and have almost finished it,
I'm trying to hide window after its startup. I have own window-class which is
I have my own simple equal heights code in jQuery to make two columns

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.