or
<telerik:RadTileList x:Name="AppLaunchPad" GroupTemplate="{StaticResource GroupTemplate}" ScrollViewer.HorizontalScrollBarVisibility="Visible" cal:Message.Attach="[Event SelectionChanged] = [Action OpenDoorway($eventArgs)]">public void OpenDoorway(SelectionChangedEventArgs e){ var s = e.Source as RadTileList; var t = e.AddedItems.Count; if (t > 0) { windowManager.Alert("Testing", "This came from the Launcher: " + s.SelectedItem.ToString()); }}I get the following exception when I paste from your WPF Controls Examples and reduce the contents of RadPanes (See xaml below).
Any suggestions for a way forward?
Anders, Denmark
Object reference not set to an instance of an object.
at Telerik.Windows.Controls.InternalWindow.PopupWindowHost.PopupHostManagerBase.GetManager(DependencyObject obj) in c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\Window\InternalWindow\PopupWindowHost.cs:line 308
at Telerik.Windows.Controls.InternalWindow.SinglePopupWindowHost.GetHostManager() in c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\Window\InternalWindow\SinglePopupWindowHost.cs:line 22
at Telerik.Windows.Controls.InternalWindow.PopupWindowHost.Open(Boolean isModal) in c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\Window\InternalWindow\PopupWindowHost.cs:line 77
at Telerik.Windows.Controls.WindowBase.ShowWindow(Boolean isModal) in c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\Window\WindowBase.cs:line 891
at Telerik.Windows.Controls.Docking.ToolWindow.Open() in c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\Docking\Docking\Parts\ToolWindow.cs:line 121
at Telerik.Windows.Controls.RadDocking.OpenInToolWindow(RadSplitContainer container) in c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\Docking\Docking\Docking\RadDocking.cs:line 797
at Telerik.Windows.Controls.RadDocking.InitializeSplitContainer(RadSplitContainer container) in c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\Docking\Docking\Docking\RadDocking.cs:line 1325
at Telerik.Windows.Controls.RadDocking.OnApplyTemplate() in c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\Docking\Docking\Docking\RadDocking.cs:line 180
at System.Windows.FrameworkElement.ApplyTemplate()
at Microsoft.Expression.Platform.WPF.WpfViewNodeManager.EnsureElementInDictionary(Object root, ViewNode knownAncestor)
<telerik:RadDocking x:Name="radDocking1" Grid.Row="1" Margin="0 0 0 10" BorderThickness="0" Padding="0" Background="{StaticResource LightGrayBrush}"> <!--DocumentHost--> <telerik:RadDocking.DocumentHost> <telerik:RadSplitContainer> <telerik:RadPaneGroup> <telerik:RadDocumentPane Title="Description"> </telerik:RadDocumentPane> <telerik:RadPane Header="NotDragable" CanFloat="False"> </telerik:RadPane> </telerik:RadPaneGroup> </telerik:RadSplitContainer> </telerik:RadDocking.DocumentHost> <telerik:RadSplitContainer MaxWidth="600" telerik:DockingPanel.InitialSize="210,150" Name="LeftContainer" InitialPosition="DockedLeft"> <telerik:RadPaneGroup x:Name="Group1"> <!--Server Exproler--> <telerik:RadPane x:Name="Pane1" Header="Server Explorer"> </telerik:RadPane> <!--Toolbox--> <telerik:RadPane x:Name="Pane2" Header="Toolbox"> </telerik:RadPane> </telerik:RadPaneGroup> </telerik:RadSplitContainer> <telerik:RadSplitContainer MaxWidth="679" telerik:DockingPanel.InitialSize="210,150" x:Name="RightContainer" InitialPosition="DockedRight"> <telerik:RadPaneGroup x:Name="Group2"> <!-- Solution Explorer --> <telerik:RadPane x:Name="Pane3" Header="Solution Explorer"> </telerik:RadPane> <!--Properties--> <telerik:RadPane x:Name="Pane4" Header="Properties"> </telerik:RadPane> </telerik:RadPaneGroup> </telerik:RadSplitContainer> <telerik:RadSplitContainer InitialPosition="FloatingDockable" telerik:RadDocking.FloatingLocation="450, 250" telerik:RadDocking.FloatingSize="300, 220"> <telerik:RadPaneGroup> <telerik:RadPane Header="Not Document Pane" CanDockInDocumentHost="False"> </telerik:RadPane> </telerik:RadPaneGroup> </telerik:RadSplitContainer> <telerik:RadSplitContainer telerik:DockingPanel.InitialSize="200,180" x:Name="BottomContainer" InitialPosition="DockedBottom"> <telerik:RadPaneGroup x:Name="Group3"> <!-- Output --> <telerik:RadPane x:Name="Pane5" Header="Output"> </telerik:RadPane> <!--Error List--> <telerik:RadPane x:Name="Pane6" Header="Error List"> </telerik:RadPane> </telerik:RadPaneGroup> </telerik:RadSplitContainer></telerik:RadDocking><telerik:RadRibbonTab x:Class="TestTabLibrary.RibbonTabView" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" xmlns:cal="clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro" Header="Plugin Test"> <telerik:RadRibbonGroup Header="TestGoup 1"> <telerik:RadRibbonButton Text="Button 1" cal:Message.Attach="[Event Click] = [Action Group1Button1]"/> <telerik:RadRibbonButton Text="Button 2" cal:Message.Attach="[Event Click] = [Action Group1Button2]"/> </telerik:RadRibbonGroup> <telerik:RadRibbonGroup Header="TestGoup 2"> <telerik:RadRibbonButton Text="Button 1" cal:Message.Attach="[Event Click] = [Action Group2Button1]"/> <telerik:RadRibbonButton Text="Button 2" cal:Message.Attach="[Event Click] = [Action Group2Button2]"/> </telerik:RadRibbonGroup></telerik:RadRibbonTab>public class RibbonTabViewModel : IViewModel { public void Group1Button1() { Console.WriteLine("Group1Button1"); } public void Group1Button2() { Console.WriteLine("Group1Button2"); } public void Group2Button1() { Console.WriteLine("Group2Button1"); } public void Group2Button2() { Console.WriteLine("Group2Button2"); } }public class AppBootstrapper : Bootstrapper<MainViewModel> { public static readonly Container PublicContainer = new Container(); readonly string _pluginDirectory = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Plugins"); protected override void Configure() { PublicContainer.Register<IWindowManager, WindowManager>(Lifestyle.Singleton); PublicContainer.Register<IEventAggregator, EventAggregator>(Lifestyle.Singleton); PublicContainer.Register<MainViewModel>(); var pluginAssemblies = from file in new DirectoryInfo(_pluginDirectory).GetFiles() where file.Extension == ".dll" select Assembly.LoadFile(file.FullName); var pluginTabItemsView = from dll in pluginAssemblies from type in dll.GetExportedTypes() where typeof(ITabItem).IsAssignableFrom(type) where !type.IsAbstract where !type.IsGenericTypeDefinition select type; PublicContainer.RegisterAll<ITabItem>(pluginTabItemsView); var pluginTabItemsViewModel = from dll in pluginAssemblies from type in dll.GetExportedTypes() where typeof(IViewModel).IsAssignableFrom(type) where !type.IsAbstract where !type.IsGenericTypeDefinition select type; PublicContainer.RegisterAll<IViewModel>(pluginTabItemsViewModel); PublicContainer.Verify(); } protected override IEnumerable<object> GetAllInstances(Type service) { return PublicContainer.GetAllInstances(service); } protected override object GetInstance(Type service, string key) { return PublicContainer.GetInstance(service); } }<telerik:RadRibbonWindow x:Class="EtaStudio.View.MainView" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" Title="MainView" Height="300" Width="300"> <Grid> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="*"/> </Grid.RowDefinitions> <telerik:RadRibbonView Grid.Row="0" ApplicationName="Eta Studio" ItemsSource="{Binding Items}"/> </Grid></telerik:RadRibbonWindow>public class MainViewModel : Conductor<ITabItem>.Collection.OneActive { public MainViewModel() { IEnumerable<ITabItem> instances = AppBootstrapper.PublicContainer.GetAllInstances<ITabItem>(); Items.AddRange(instances); } }<Views:CustomViewBase.RibbonInformation> <entities:RibbonInformation Header="Operation"> <entities:RibbonInformation.RibbonGroups> <telerik:RadRibbonGroup x:Name="UIRibbonToolbar" Header="Controls"> <telerik:RadRibbonButton Text="Back" Size="Large" LargeImage="/Images/Back.bmp" Click="RadRibbonButton_Click_Back" Name="RadRibbonButton_Back" IsEnabled="True"/> <telerik:RadRibbonButton Text="Play" Size="Large" LargeImage="/Images/Play.bmp" Click="RadRibbonButton_Click_Play" Name="RadRibbonButton_Play" IsEnabled="True"/> <telerik:RadRibbonButton Text="Stop" Size="Large" LargeImage="/Images/Stop.bmp" Click="RadRibbonButton_Click_Stop" Name="RadRibbonButton_Stop" IsEnabled="True"/> </telerik:RadRibbonGroup> </entities:RibbonInformation.RibbonGroups> </entities:RibbonInformation></Views:CustomViewBase.RibbonInformation>private void RadRibbonButton_Click_Stop(object sender, RoutedEventArgs e){ this.IsEnabled = false; MessageBox.Show("Stop Button Pressed");}private void RadRibbonButton_Click_Play(object sender, RoutedEventArgs e){ this.IsEnabled = false; MessageBox.Show("Play Button Pressed");}private void RadRibbonButton_Click_Back(object sender, RoutedEventArgs e){ this.IsEnabled = false; MessageBox.Show("Back Button Pressed");}<Window xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" x:Class="WpfApplication2.MainWindow" Title="MainWindow" Height="350" Width="525" > <Grid> <StackPanel> <Button Content="Push" Click="Button_Click" /> <telerik:RadGridView ItemsSource="{Binding Data}" ColumnWidth="100" MaxColumnWidth="100"/> </StackPanel> </Grid></Window>
Designer:
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
public IEnumerable<DataItem> Data {get;set;}
private void Button_Click(object sender, RoutedEventArgs e)
{
var data = new List<DataItem>();
for (int i = 0; i < 5000; i++)
{
data.Add(new DataItem());
}
this.Data = data;
this.DataContext = this;
}
}
public class DataItem
{
public string Col {get;set;}
public string Col2 { get; set; }
public string Col3 { get; set; }
public string Col4 { get; set; }
public string Col5 { get; set; }
public string Col6 { get; set; }
public string Col7 { get; set; }
public string Col8 { get; set; }
public string Col9 { get; set; }
public string Col0 { get; set; }
public string Col11 { get; set; }
public string Col12 { get; set; }
public string Col13 { get; set; }
public string Col14 { get; set; }
}
I should add that this is using version 2012.2.912.40 of the WPF RadGridView component in a .NET 4.5 WPF application.