c# - WPF binding failure with AvalonDock Theme -


i'm using avalondock wpf application , want use data binding changing theme.

viewmodel:

    private theme _avalondocktheme = new expressiondarktheme();     public theme avalondocktheme     {                 {             return _avalondocktheme;         }         set         {             if (_avalondocktheme != value)             {                 _avalondocktheme = value;                 raisepropertychanged("avalondocktheme");             }         }     } 

xaml:

<xcad:dockingmanager allowmixedorientation="true"         theme="{binding source={staticresource docktheme}}"          x:name="_dockingmanager">     <!-- content --> </xcad:dockingmanager> 

whe use following error message:

system.windows.data error: 5 : value produced bindingexpression not valid target property.; value='xceed.wpf.avalondock.themes.expressiondarktheme' bindingexpression:path=mainviewmodel.avalondocktheme; dataitem='app' (hashcode=47182344); target element 'collectionviewsource' (hashcode=42887454); target property 'source' (type 'object') 

i don't understand why binding fails. binding source , target both of type xceed.wpf.avalondock.themes.theme error message says target element of type collectionviewsource. why?

take @ question:

binding collectionviewsource within datatemplate

if doesn't help, please provide docktheme resource definition.


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -