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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T10:32:29+00:00 2026-05-12T10:32:29+00:00

I am attempting to write a MarkupExtension to support the process of instantiating custom

  • 0

I am attempting to write a MarkupExtension to support the process of instantiating custom types via XAML. My custom types are POCOs and not descendants of DependencyObject. There seems to be no straightforward XAML mechanism for MarkupExtensions to obtain references to objects in the graph that is being loaded. I note that the WPF machinery provides some of these capabilities but the relevant properties are all internal.

Any ideas?

  • 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-12T10:32:30+00:00Added an answer on May 12, 2026 at 10:32 am

    I wrote a class that I use to bind to ViewModel commands, and it contains some code to retrieve the root of the XAML. It uses reflection on private WPF members, so it’s not exactly clean, but it works… You can find it here

    http://www.thomaslevesque.com/2009/03/17/wpf-using-inputbindings-with-the-mvvm-pattern/

    BTW, it doesn’t work with WPF 4 because the private implementation has changed… If you’re interested I can post an updated version that takes these changes into account

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

Sidebar

Related Questions

I'm attempting to write a custom MarkupExtension to make my life easier by giving
I am attempting to write a 'User Control' in WinForms .NET (not ASP.NET). The
I'm attempting to write a custom widget and I want to use existing UI
I'm attempting to write a custom RegExpValidator in AS3 (similar to this ). I'm
I'm attempting to write a game. I therefore have lots of different types of
I am attempting to write a program whereby I need to process a string
I am curretnly attempting to write a script in python that allows me to
I am attempting to write an Android app which will allow me to read
I am attempting to write a method that has an optional EventHandler Paramater. it
I'm attempting to write a shader to put a border around text. It compiles

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.