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 - Custom RoutedEvent in EventTrigger of CustomControl Style.

 
 
Old 08-03-2006   #1 (permalink)
Illumineo


 
 

Custom RoutedEvent in EventTrigger of CustomControl Style.

I have a custom control with a RoutedEvent and try to wire it to the
generic.xaml style.

public class ClassShape : Control
{
public static readonly RoutedEvent ExpandEvent
...
}

The default style is something like:
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

xmlns:local="clr-namespaceiaxaml.ShapeLibrary;assembly=Diaxaml.ShapeLibrary"
>

<Style TargetType="{x:Type local:ClassShape}">
....
<EventTrigger RoutedEvent="{local:ClassShape.ExpandEventHandler}">

Tried many things in many ways but the compiler keeps on telling me
that;
'ClassShape.ExpandEventHandler' tag does not exist in XML namespace
'clr-namespaceiaxaml.ShapeLibrary;assembly=Diaxaml.ShapeLibrary'.

Is beta-related or just not possible?

Thanks for any hint!


My System SpecsSystem Spec
Old 08-17-2006   #2 (permalink)
Nick Kramer [MSFT]


 
 

Re: Custom RoutedEvent in EventTrigger of CustomControl Style.

I don't know the status of this one. We have though had a lot of bugs with
locally defined components, where parsing works just fine if the user code
isn't a separate DLL, but doesn't work if the code is in the same DLL. You
might try that and see if that helps.


--
-Nick Kramer [MSFT]
http://blogs.msdn.com/nickkramer

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

"Illumineo" <NetronProject@gmail.com> wrote in message
news:1154583328.550902.142960@m73g2000cwd.googlegroups.com...
>I have a custom control with a RoutedEvent and try to wire it to the
> generic.xaml style.
>
> public class ClassShape : Control
> {
> public static readonly RoutedEvent ExpandEvent
> ...
> }
>
> The default style is something like:
> <ResourceDictionary
> xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
>
> xmlns:local="clr-namespaceiaxaml.ShapeLibrary;assembly=Diaxaml.ShapeLibrary"
> >

> <Style TargetType="{x:Type local:ClassShape}">
> ...
> <EventTrigger RoutedEvent="{local:ClassShape.ExpandEventHandler}">
>
> Tried many things in many ways but the compiler keeps on telling me
> that;
> 'ClassShape.ExpandEventHandler' tag does not exist in XML namespace
> 'clr-namespaceiaxaml.ShapeLibrary;assembly=Diaxaml.ShapeLibrary'.
>
> Is beta-related or just not possible?
>
> Thanks for any hint!
>



My System SpecsSystem Spec
 

Thread Tools


Similar Threads
Thread Forum
Font Size - XP style vs Vista style Vista General
Font Size - XP style vs Vista style Vista General


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