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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T12:44:36+00:00 2026-06-04T12:44:36+00:00

I am just started learning WPF, and trying to learn the correct way to

  • 0

I am just started learning WPF, and trying to learn the correct way to do things. I am using a ItemsControl to bind to an Observable Collection consisting of Points. Each point represents the center of an ellipse. However I am unsure how to bind to the current item, to the center property of the Ellipse Geometry.

<EllipseGeometry Center="{Binding Path=????}" RadiusX="10" RadiusY="10"/>

However I know it is more or less working, since this gives me the expected output. I just can’t figure out how to say the current object.

<EllipseGeometry Center="10,10" RadiusX="{Binding Path=X}" RadiusY="{Binding Path=Y}"/>

C# Code:

public class ViewModel
{
    public ObservableCollection<Point> PointList { get; private set; }

    public ViewModel()
    {
        PointList = new ObservableCollection<Point>();
        AddPoint(new Point(10, 10));
        AddPoint(new Point(200, 200));
        AddPoint(new Point(500, 500));
    }

    public void AddPoint(Point p)
    {
        PointList.Add(p);
    }

}

XAML Code:

<ItemsControl Grid.Row="0" ItemsSource="{Binding Path=PointList}">
    <ItemsControl.ItemsPanel>
    <ItemsPanelTemplate>
        <Canvas />
    </ItemsPanelTemplate>
    </ItemsControl.ItemsPanel>
    <ItemsControl.ItemTemplate>
    <DataTemplate>
        <Path Fill="Gold" Stroke="Black" StrokeThickness="1" Tag="Hi" >
        <Path.Data>
            <EllipseGeometry Center="{Binding Path=????}" RadiusX="10" RadiusY="10"/>
        </Path.Data>
        </Path>
        <!--<Rectangle Fill="Red" Width="25" Height="25"/>-->
    </DataTemplate>
    </ItemsControl.ItemTemplate>
    <ItemsControl.ItemContainerStyle>
    <Style>
        <!--<Setter Property="Canvas.Left" Value="{Binding Path=X}"/>
        <Setter Property="Canvas.Top" Value="{Binding Path=Y}"/>-->
    </Style>
    </ItemsControl.ItemContainerStyle>
</ItemsControl>
  • 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-04T12:44:37+00:00Added an answer on June 4, 2026 at 12:44 pm

    If you leave out the path entirely, it refers to the current object. Alternatively, you can specify a period. Thus, all these are equivalent:

    Center="{Binding}"
    Center="{Binding .}"
    Center="{Binding Path=.}"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've just started learning WPF MVVM using Prism and Unity. Decoupling the view from
I just started learning C++(coming from Java & Python) and am trying to learn
I´ve just started learning GWT and I´m trying to implement http://gwt.google.com/samples/Showcase/Showcase.html#!CwFileUpload and but failing
I just started learning Common Lisp a few days ago, and I'm trying to
I've just started learning WPF and like the power of databinding it presents; that
I am new to WPF and just started learning WPF. I am looking for
I'm learning WPF and started with this MSDN tutorial. I was just following the
Just started learning Rails (3). I am tearing my hair out trying to find
Just started learning Scheme. I'm using Dr. Racket as my compiler/interpreter. I need some
I just started learning Zend. I managed to get the basic working (using zf

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.