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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:52:26+00:00 2026-05-23T13:52:26+00:00

EDIT: Note! This turned out to be a typo in my code According to

  • 0

EDIT: Note! This turned out to be a typo in my code

According to msdn , Path.Data appears to be bindable. But I am not sure how to read the Depenedency Property Information part of the msdn page. Is AffectsRender and AffectsMeasure be enough for my use?

If I use x:Name to directly assign it, the geometry appears

var curve = new GeometryGroup();
curve.Children.Add(new LineGeometry(new Point(0, 0), new Point(20, 20)));
curve.Children.Add(new LineGeometry(new Point(0, 20), new Point(20, 0)));
CurveGraph.Data = curve;

This works fine. Draws a nice “X”.

However, if I have a dependency property of type GeometryGroup in the ViewModel

var curve = new GeometryGroup();
curve.Children.Add(new LineGeometry(new Point(0, 0), new Point(20, 20)));
curve.Children.Add(new LineGeometry(new Point(0, 20), new Point(20, 0)));
GeometryData= curve;

dp :

public GeometryGroup GeometryData
    {
        get { return (GeometryGroup)GetValue(GeometryDataProperty); }
        set { SetValue(GeometryDataProperty, value); }
    }

    public static readonly DependencyProperty GeometryDataProperty =  DependencyProperty.Register("GeometryDataProperty", typeof(GeometryGroup), typeof(MiniTrendVm), new UIPropertyMetadata(new GeometryGroup()));

…then it didn’t work. Nothing happens. No “X”.

xaml :

<Path Data="{Binding GeometryData}" x:Name="CurveGraph" Stroke = "{Binding StrokeColor}" StrokeThickness = "2" Grid.RowSpan="4"/> 

Should this work? Have I fat fingered something? Or can’t the Data property be set this way? The brush was databound in both cases, so I know that the datacontext is correctly set.

  • 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-23T13:52:26+00:00Added an answer on May 23, 2026 at 1:52 pm

    Your DependencyProperty is registered as "GeometryDataProperty" which should be "GeometryData". Not quite sure if this actually breaks the binding. Edit: Recent tests by H.B. reveal that this probably is indeed the cause. Binding that property is possible.

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

Sidebar

Related Questions

EDIT: Note to new Perl programmers : This mechanism should NOT be used for
Edit: This was accidentally posted twice. Original: VB.NET Importing Classes I've seen some code
INITIAL NOTE: This is just for a personal tinkering project; I'm not writing enterprise
Edit : Note that my final purpose here is not having the class working,
EDIT: Please note that this question is OUTDATED; RVM got way easier to use
Side note: This is inherited code, I didn't do any of the setup and
EDIT NOTE I am rewording this question entirely now that I have a bit
RoomInfoActivity.java: http://pastebin.com/L9fFsFeH (note: this is the 3rd activity launched by the same application, not
Please note the Edit below for a lot more information, and a possible solution
Edit: This question was written in 2008, which was like 3 internet ages ago.

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.