PC Review


Reply
Thread Tools Rate Thread

Custom markup extensions in WPF

 
 
Mark
Guest
Posts: n/a
 
      28th Jul 2009
Hi, I'm trying to tackle localization of a WPF project using Custom
MarkupExtensions. For resource strings that contain format specifiers({0}
{1} etc...), I would like to implement these arguments as properties on the
Custom MarkupExtension so they are accessible via Xaml as well. For
example:

If I had the resource string: "Design {0}", then
MyMarkupExtension.FirstArgument would be a property that sets {0}.

I thought it would be really neat to be able to data bind
MyMarkupExtension.FirstArgument, but ran into a slag because the
MarkupExtension class does not inherit from DependencyObject, so I cannot
implement the arguments as Dependency Properties. Has anyone ran into this
before? To generalize the question, is it possible to use a CLR property as
the data binding target at all? This doesn't seem to be the case based on
what I have read, but does anyone know of a good workaround for what I am
trying to accomplish?

Thanks

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Access Developer Extensions - Allow only custom installalation? 2dollars Microsoft Access 8 27th Nov 2009 10:05 PM
Re: Access Developer Extensions - Allow only custom installalation? Douglas J. Steele Microsoft Access 0 25th Nov 2009 03:48 PM
Designer files rewrite custom control when markup changed. Joe Microsoft ASP .NET 1 13th May 2008 02:04 AM
Doubt in Associate File Extensions with a Custom application. zidansoft@gmail.com Microsoft VC .NET 1 4th Jan 2007 01:41 PM
FP extensions versus SharePoint and latest version of FP extensions Fran Microsoft Frontpage 4 15th Mar 2005 04:33 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:29 AM.