private void ContractProxyGridView_CurrentCellChanged(object sender, GridViewCurrentCellChangedEventArgs e) { if (e.NewCell == null || e.NewCell.ParentRow == null) return; e.NewCell.ParentRow.IsCurrent = true; }In xaml file I define the template like this:
I'm using the RegionAdapter from the following article.
http://blogs.telerik.com/blogs/posts/09-08-31/using_the_raddocking_control_with_prism.aspx
However, I'm using PRISM 4 + MVVM + MefBootstrapper.
Has anybody successfully used the RegionAdapter with MefBootstrapper?
I'm getting the following error message...
this
.Container.Resolve
Error 1 'System.ComponentModel.Composition.Hosting.CompositionContainer' does not contain a definition for 'Resolve' and the best extension method overload 'Microsoft.Practices.Unity.UnityContainerExtensions.Resolve<T>(Microsoft.Practices.Unity.IUnityContainer, params Microsoft.Practices.Unity.ResolverOverride[])'
Thank you
protected override RegionAdapterMappings ConfigureRegionAdapterMappings() { var mappings = base.ConfigureRegionAdapterMappings(); mappings.RegisterMapping(typeof(RadPaneGroup), this.Container.Resolve<RadPaneGroupRegionAdapter>()); return mappings; }<UserControl ...> <UserControl.Resources> <Style x:Key="NoChildrenRowStyle" TargetType="telerik:GridViewRow"> <Setter Property="IsExpandable" Value="False"/> </Style> <Style x:Key="HasChildrenRowStyle" TargetType="telerik:GridViewRow"> <Setter Property="IsExpandable" Value="True"/> </Style></UserControl.Resources> <local:RowStyleSelector x:Key="RowStyleSelector" NoChildrenStyle="{StaticResource NoChildrenRowStyle}" HasChildrenStyle="{StaticResource HasChildrenRowStyle}"/> <telerik:RadGridView ItemsSource="{Binding ParentsCollectionView}" RowIndicatorVisibility="Collapsed" AutoGenerateColumns="False" RowStyleSelector="{StaticResource RowStyleSelector}"> <telerik:RadGridView.Columns> <telerik:GridViewToggleRowDetailsColumn /> <telerik:GridViewDataColumn Header="Name" DataMemberBinding="{Binding Name}"/> <telerik:GridViewDataColumn Header="Age" DatatMemberBinding="{Binding Age}"/> </telerik:RadGridView.Columns> <telerik:RadGridView.RowDetailsTemplate> <DataTemplate> <ListBox ItemsSource="{Binding Children}"> <ListBox.ItemTemplate> <DataTemplate> <Grid> <TextBlock Text="{Binding Name}"/> </Grid> </DataTemplate> </ListBox.ItemTemplate> </ListBox> </DataTemplate> </telerik:RadGridView.RowDetailsTemplate> </telerik:RadGridView></UserControl>In XAML, I try to bind the RoutingService of my diagram:
<telerik:RadDiagram ....... RoutingService="{Binding Router}" ... />
And I get this error:
'RoutingService' property is read-only and cannot be set from markup. Line 92 Position 45.
Why do I have to assign this router in code-behind? Makes sense to bind it since it can easily be a property of my viewmodel...
UPDATE: Basically, I'm trying to assign the Router to an instance of OrgTreeRouter.