I have a template control Bookmark (not the one from the ESRI toolkit), and in MainWindow.xaml, this works just fine:
<sdl:Bookmark>
<sdl:Bookmark.Bookmarks>
<sdl:BookmarkItem Name="test" Extent="-121.89,33.60,-117.09,36.32">
</sdl:BookmarkItem>
</sdl:Bookmark.Bookmarks>
</sdl:Bookmark>
But, I also have a template control Titlebar which inside of its XAML contains one of these Bookmark controls, and in MainWindow.xaml, this does NOT work:
<sdl:Titlebar x:Name="Titlebar">
<sdl:Titlebar.Bookmark>
<sdl:Bookmark.Bookmarks> <!-- Doesn't like this -->
<sdl:BookmarkItem Name="test" Extent="-121.89,33.60,-117.09,36.32">
</sdl:BookmarkItem>
</sdl:Bookmark.Bookmarks>
</sdl:Titlebar.Bookmark>
</sdl:Titlebar>
I get this error:Error 11 The tag 'Bookmark.Bookmarks' does not exist in XML namespace 'clr-namespace:SDL.ArcGIS.Client.Toolkit;assembly=SDL.ArcGIS.Client.Toolkit'. Line 45 Position 22. C:\Projects\SDL.ArcGIS.Client.Toolkit\SDL.ArcGIS.Client.Toolkit.WPFTestApplication\MainWindow.xaml 45 22 SDL.ArcGIS.Client.Toolkit.WPFTestApplicationBookmark does have a member property in the Titlebar class that is set to the template bookmark in OnApplyTemplate(). I tried making a dependency property for the Bookmark property too, but that didn't help either.Is this a Known limitation? Or most likley, what am I doing wrong?Thanks a lot for any help!!!*EDIT - Additional info:Also, when doing the following, it compiles and launchs without error, but the BookmarkItems never appear in the ObservableCollection:
<sdl:Titlebar x:Name="Titlebar">
<sdl:Titlebar.Bookmark>
<sdl:Bookmark>
<sdl:Bookmark.Bookmarks>
<sdl:BookmarkItem Name="test" Extent="-121.89,33.60,-117.09,36.32">
</sdl:BookmarkItem>
</sdl:Bookmark.Bookmarks>
</sdl:Bookmark>
</sdl:Titlebar.Bookmark>
</sdl:Titlebar>
Even though it compiles, this doesn't seem right to me though... having to redeclare the Bookmark. It feels like a bookmark is being created inside a bookmark.