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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T07:45:16+00:00 2026-06-10T07:45:16+00:00

Windows 8 Style Apps (ex. Metro), Visual Studio 2012, XAML. I have a UserControl

  • 0

Windows 8 Style Apps (ex. “Metro”), Visual Studio 2012, XAML.

I have a UserControl derived from Canvas. It has one child element – a Polygon with its Data bound to a property (with INotifyPropertyChanged implemented):

<Canvas x:Name="MyPolygon">
    <Polygon Points="{Binding ElementName=MyPolygon,Path=MyPoints}" ... />
</Canvas>

The property is set and the Polygon is correctly rendered, both at design-time and run-time, if I instantiate that control elsewhere in XAML, passing in a string:

<local:MyPolygon MyPoints="..." />

However, changing the values in that string is tedious. A designer would prefer to have a collection of some UI knots (like Ellipses) visible at design-time but invisible at run-time, so that they could drag them in the designer and have the Polygon reconstruct its geometry on the fly:

<local:MyPolygon>
    <Ellipse Canvas.Left="204" Canvas.Top="57" ... />
    <Ellipse Canvas.Left="166" Canvas.Top="30" ... />
    ...
</local:MyPolygon>

Basically I want to keep the geometry information in (extended) .Children. Is this possible?

(There could be some event/constructor where the control could examine its .Children (after those Ellipses are inserted), retrieve their coordinates, and build MyPoints. The designer would have to trigger that event for the geometry to be visible at design time)

  • 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-10T07:45:17+00:00Added an answer on June 10, 2026 at 7:45 am

    So, I ended up creating a Polygon on the same level where I have the Ellipses.

    <Polygon Points="{Binding ElementName=MyPoints,Converter={StaticResource PolygonConverter}}" ... />
    <Canvas x:Name="MyPoins">
        <Ellipse Canvas.Left="228" Canvas.Top="69" ... />
        <Ellipse Canvas.Left="166" Canvas.Top="30" ... />
        ...
    </Canvas>
    

    The binding converter converts coordinates of all .Children of the object to a string.

    This works at both design time and run time.

    Unfortunately, one must rebuild the project after moving the Ellipses around in order for VS designer to refresh the view and pick up the changes, which makes the design process much less intuitive than it could have been. :/

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

Sidebar

Related Questions

I have installed Windows 8 and Visual Studio 11 to develop metro style apps.
I have a problem understanding one style definition in Windows 8 metro apps. When
I decided to have a go at building Windows Metro style apps with the
Demos and articles I see online talk about Windows Runtime with Metro-style apps. Is
As windows 8 metro style javascript/html5 apps cannot communicate directly with database, I want
I found that, WebView control (For Windows 8 Metro style app) is the one
So, since one cannot build metro style apps with F# and it isn’t possible
I have made one windows phone based application. i want some designing ideas from
I have been experimenting a lot lately with Windows 8, writing C# XAML Metro
I have just finished a metro style App in Windows Developer Preview (for the

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.