Hi,
I am playing around with the trial of your product and have come unstuck with the MDI docking.
Here is my xaml..I then add DocumentWindow objects in code...
Everything works 100% until I drag a the last DocumentWindow from one container to a new one. The application then crashes with
"Object reference not set to an instance of an object".
I have tried to clone your samples as much as possible, but still no go.
Please give me an idea as to what I am doing wrong.
I am playing around with the trial of your product and have come unstuck with the MDI docking.
Here is my xaml..
<Page x:Class="FMS.Main"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ribbon="http://schemas.actiprosoftware.com/winfx/xaml/ribbon"
xmlns:shared="http://schemas.actiprosoftware.com/winfx/xaml/shared"
Title="Franchise Management System" Width="1024" Loaded="Page_Loaded" xmlns:docking="http://schemas.actiprosoftware.com/winfx/xaml/docking">
<DockPanel LastChildFill="True">
<ribbon:Ribbon Height="Auto" Name="ribbon1" Width="1024" DockPanel.Dock="Top">
<ribbon:Ribbon.ApplicationMenu>
<ribbon:ApplicationMenu>
<ribbon:ApplicationMenu.FooterButtons>
<ribbon:Button Label="Exit" />
</ribbon:ApplicationMenu.FooterButtons>
<ribbon:ApplicationMenu.AdditionalContent>
<ribbon:RecentDocumentMenu>
<ribbon:RecentDocumentMenu.Manager>
<shared:RecentDocumentManager />
</ribbon:RecentDocumentMenu.Manager>
</ribbon:RecentDocumentMenu>
</ribbon:ApplicationMenu.AdditionalContent>
<ribbon:Button Label="Menu Item" />
</ribbon:ApplicationMenu>
</ribbon:Ribbon.ApplicationMenu>
<ribbon:Tab Label="Maintenance">
<ribbon:Group Label="Accounts" Width="Auto">
<ribbon:Button ImageSourceSmall="pack://application:,,,/ActiproSoftware.Ribbon.Wpf30;component/Products/Ribbon/Images/ButtonDefault32.png" Label="New" Name="NewAccountButton" Click="NewAccountButton_Click" />
<ribbon:Button ImageSourceSmall="pack://application:,,,/ActiproSoftware.Ribbon.Wpf30;component/Products/Ribbon/Images/ButtonDefault32.png" Label="List" Name="ListAccountsButton" Click="ListAccountsButton_Click" />
</ribbon:Group>
</ribbon:Tab>
</ribbon:Ribbon>
<docking:DockSite Height="Auto" Name="MainDockSite" Width="Auto" AreDocumentWindowsDestroyedOnClose="False">
<docking:SplitContainer>
<docking:Workspace>
<docking:TabbedMdiHost>
<docking:TabbedMdiContainer Name="mdiContainer"></docking:TabbedMdiContainer>
</docking:TabbedMdiHost>
</docking:Workspace>
</docking:SplitContainer>
</docking:DockSite>
</DockPanel>
</Page>
private void ListAccountsButton_Click(object sender, ActiproSoftware.Windows.Controls.Ribbon.Controls.ExecuteRoutedEventArgs e)
{
DocumentWindow dw = new DocumentWindow(MainDockSite);
dw.Title = mdiContainer.Items.Count.ToString() + " : Items";
dw.Activate();
}
"Object reference not set to an instance of an object".
I have tried to clone your samples as much as possible, but still no go.
Please give me an idea as to what I am doing wrong.