I´m working on an app with the following architecture, I´m using CSLA
.NET 4, BXF for plumbing to MVVM and WPF.
Files code follow:
TreeviewView.xaml
------------------------
TrashViewModel.cs
------------------------
With this version of the code I get an exception that says:
"'Provide value on 'System.Windows.Markup.StaticResourceHolder' threw an exception.' Line number '108' and line position '50'."
---------------------
However if I change the code for the collectionviewsource to:
I get this:
Locating source for 'c:\Builds\WPF_Scrum\Release_WPF_2010_Q2_SP2\Sources\Development\Core\Controls\Animation\AnimationManager.cs'. Checksum: MD5 {d5 92 43 67 7f ad 5a 42 93 7e b9 53 ee b2 ef 99}
The file 'c:\Builds\WPF_Scrum\Release_WPF_2010_Q2_SP2\Sources\Development\Core\Controls\Animation\AnimationManager.cs' does not exist.
Looking in script documents for 'c:\Builds\WPF_Scrum\Release_WPF_2010_Q2_SP2\Sources\Development\Core\Controls\Animation\AnimationManager.cs'...
Looking in the projects for 'c:\Builds\WPF_Scrum\Release_WPF_2010_Q2_SP2\Sources\Development\Core\Controls\Animation\AnimationManager.cs'.
The file was not found in a project.
Looking in directory 'C:\Program Files\Microsoft Visual Studio 10.0\VC\crt\src\'...
Looking in directory 'C:\Program Files\Microsoft Visual Studio 10.0\VC\atlmfc\src\mfc\'...
Looking in directory 'C:\Program Files\Microsoft Visual Studio 10.0\VC\atlmfc\src\atl\'...
Looking in directory 'C:\Program Files\Microsoft Visual Studio 10.0\VC\atlmfc\include\'...
The debug source files settings for the active solution indicate that the debugger will not ask the user to find the file: c:\Builds\WPF_Scrum\Release_WPF_2010_Q2_SP2\Sources\Development\Core\Controls\Animation\AnimationManager.cs.
The debugger could not locate the source file 'c:\Builds\WPF_Scrum\Release_WPF_2010_Q2_SP2\Sources\Development\Core\Controls\Animation\AnimationManager.cs'.
???
Any ideas?
I could try setting up a demo project, but I´d expose too much of the BL of the app and my employer wouldn´t like that..
Files code follow:
TreeviewView.xaml
------------------------
<UserControl x:Class="MyAppDesktopWPF.TreeviewView" xmlns:Telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation" xmlns:csla="clr-namespace:Csla.Data;assembly=Csla" mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="400" Loaded="UserControl_Loaded" xmlns:my="clr-namespace:MyAppDesktopWPF.ViewModels">
<UserControl.Resources>
<CollectionViewSource x:Key="TreeAreaDS" Source="{Binding Source={StaticResource TrashViewModel}, Path=Model}"></CollectionViewSource>
<HierarchicalDataTemplate x:Key="ToolsDataTemplate"ItemsSource="{Binding Tools}" > <TextBlock Text="{Binding Path=Name}" FontWeight="Bold"/>
</HierarchicalDataTemplate>
<HierarchicalDataTemplate x:Key="SegmentsDataTemplate"ItemsSource="{Binding Segments}" ItemTemplate="{StaticResource ToolsDataTemplate}" > <TextBlock Text="{Binding Path=Name}" FontWeight="Bold"/> </HierarchicalDataTemplate>
<HierarchicalDataTemplate x:Key="SectionsDataTemplate" ItemsSource="{Binding Sections}" ItemTemplate="{StaticResource SegmentsDataTemplate}"> <TextBlock Text="{Binding Path=Name}"FontWeight="Bold"/> </HierarchicalDataTemplate>
</UserControl.Resources>
<Telerik:RadTreeView ItemsSource="{Binding Source={StaticResource TreeAreaDS}}" ItemTemplate="{StaticResource SectionsDataTemplate}"Name="PlanTreeView" Height="250" HorizontalAlignment="Left" Margin="3"VerticalAlignment="Center" Width="150" />TrashViewModel.cs
------------------------
public class TrashViewModel : ViewModel<MyAppBO.MyClass> { public TrashViewModel() { Bxf.Shell.Instance.ShowStatus(new Bxf.Status { Text = "Getting Plan", IsBusy = true }); ManageObjectLifetime = true; // cascade model changed events through VM to View Model.PropertyChanged += (o, e) => OnPropertyChanged(e.PropertyName); }
public TrashViewModel(MyClass classInstance) { Bxf.Shell.Instance.ShowStatus(new Bxf.Status { Text = "Getting Plan", IsBusy = true }); ManageObjectLifetime = true; Model = classInstance;
// cascade model changed events through VM to View<br> Model.PropertyChanged += (o, e) => OnPropertyChanged(e.PropertyName); }With this version of the code I get an exception that says:
"'Provide value on 'System.Windows.Markup.StaticResourceHolder' threw an exception.' Line number '108' and line position '50'."
---------------------
However if I change the code for the collectionviewsource to:
<CollectionViewSource x:Key="TreeAreaDS"Source="TrashViewModel"></CollectionViewSource>I get this:
Locating source for 'c:\Builds\WPF_Scrum\Release_WPF_2010_Q2_SP2\Sources\Development\Core\Controls\Animation\AnimationManager.cs'. Checksum: MD5 {d5 92 43 67 7f ad 5a 42 93 7e b9 53 ee b2 ef 99}
The file 'c:\Builds\WPF_Scrum\Release_WPF_2010_Q2_SP2\Sources\Development\Core\Controls\Animation\AnimationManager.cs' does not exist.
Looking in script documents for 'c:\Builds\WPF_Scrum\Release_WPF_2010_Q2_SP2\Sources\Development\Core\Controls\Animation\AnimationManager.cs'...
Looking in the projects for 'c:\Builds\WPF_Scrum\Release_WPF_2010_Q2_SP2\Sources\Development\Core\Controls\Animation\AnimationManager.cs'.
The file was not found in a project.
Looking in directory 'C:\Program Files\Microsoft Visual Studio 10.0\VC\crt\src\'...
Looking in directory 'C:\Program Files\Microsoft Visual Studio 10.0\VC\atlmfc\src\mfc\'...
Looking in directory 'C:\Program Files\Microsoft Visual Studio 10.0\VC\atlmfc\src\atl\'...
Looking in directory 'C:\Program Files\Microsoft Visual Studio 10.0\VC\atlmfc\include\'...
The debug source files settings for the active solution indicate that the debugger will not ask the user to find the file: c:\Builds\WPF_Scrum\Release_WPF_2010_Q2_SP2\Sources\Development\Core\Controls\Animation\AnimationManager.cs.
The debugger could not locate the source file 'c:\Builds\WPF_Scrum\Release_WPF_2010_Q2_SP2\Sources\Development\Core\Controls\Animation\AnimationManager.cs'.
???
Any ideas?
I could try setting up a demo project, but I´d expose too much of the BL of the app and my employer wouldn´t like that..