Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > Avalon

Vista - Problem with custom Markup Extension

 
 
Old 04-11-2006   #1 (permalink)
Marcus


 
 

Problem with custom Markup Extension

Hi everybody,

Today I created my first custom Markup Extension... (yay me!!! )

My problem is that after defining my custom MarkupExtention...
rightfully called "CustomExtension"... I cannot use the attribute
syntax to use the extension...

<TextBox Text="{local:CustomExtension Param1=test}" /> <!-- Doesn't
work!!! -->

The compiler gives me an error indicating that the MarkupExtention
"CustomExtention" cannot be found in the "local" namespace and to make
sure that Markup Extentions must derive from MarkupExtension (which my
class does)...

If I use the Element Syntax (as above)... the neverything works
fine...

<TextBox>
<TextBox.Text>
<local:CustomExtension Param1="test"/>
</TextBox.Text>
</TextBox>

Now, maybe this is a bug of WPF, or I'm missing something else...

Thanks..

Marcys


My System SpecsSystem Spec
Old 05-25-2006   #2 (permalink)
Tom


 
 

Re: Problem with custom Markup Extension

Hi Marcus,

I am also experiencing compilation problems with custom markup extensions (Beta 2). But it seems that it works if you use plain XAML. I posted example on my blog: RefExtension - How to load XAML on-demand [ http://blog.vyvojar.cz/tom/archive/2006/05/25/8222.aspx ]

Kind regards,

Tom

My System SpecsSystem Spec
 

Thread Tools


Similar Threads
Thread Forum
.mp3 extension problem Sound & Audio


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46