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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T04:54:03+00:00 2026-06-01T04:54:03+00:00

In my application I am using a canvas which is dynamically generated at runtime.

  • 0

In my application I am using a canvas which is dynamically generated at runtime. I am placing a textblock on the canvas but it is showing at top left corner of the canvas. How can I change its position. I have search and everyone is showing myCanvas.SetLeft(myTextBlock,10); but I could not find this command in the dropdown list.

Is there any other method to achieve 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-06-01T04:54:04+00:00Added an answer on June 1, 2026 at 4:54 am

    Try just

    myCanvas.Children.Add(myTextBlock);
    

    Canvas.SetLeft(myTextBlock,10);

    This will add your textblock to the children collection of myCanvas and then the Canvas class can allow myCanvas to control the left properties of all its children.

    This is an example of an attached property.

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

Sidebar

Related Questions

i'm using a Grid within my Application which Contain some Canvas Elements which Contain
I am creating a web application using HTML5 canvas to draw images ( like
I have a Flex application where I'm using a Canvas to contain several other
I have a compass application which is using orientation sensor and every time the
As part of an application, I have a canvas object <Canvas Name=canvas/> into which
I am using a Tab Navigator component in which there are three canvas components.
I have a flex 3 application that creates an Image from a canvas which
I have made a snake game using javascript and HTML5 Canvas element. It can
I'm having an application using MVC. It has a canvas and property grid. When
I'm writing a web application using a <canvas> element. For simplicity, I have stripped

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.