question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Exception when I tear off a tab

See original GitHub issue

My TabablzControl is in UserControl and when I try to drag out a tab, I got an exception (I can reorder fine).

My MainWindow

<Window x:Class="Satroem.Views.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:prism="http://prismlibrary.com/"
        prism:ViewModelLocator.AutoWireViewModel="True"
        xmlns:resources="clr-namespace:Satroem.Resources"
        WindowStartupLocation="CenterScreen" FontFamily="Calibri"
        Title="Satroem" Height="720" Width="1280">
    <ContentControl prism:RegionManager.RegionName="{x:Static resources:RegionNames.ContentRegion}" />
</Window>

My UserControl

<UserControl x:Class="Satroem.Views.ISLoc.ISLocView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:resources="clr-namespace:Satroem.Resources"
             xmlns:dragablz="clr-namespace:Dragablz;assembly=Dragablz"
             xmlns:dockablz="clr-namespace:Dragablz.Dockablz;assembly=Dragablz"
             xmlns:prism="http://prismlibrary.com/"
             prism:ViewModelLocator.AutoWireViewModel="True"
             mc:Ignorable="d">
        <Grid x:Name="container">
            <dockablz:Layout >
                <dragablz:TabablzControl BorderThickness="0" Margin="0,-1,0,1" ConsolidateOrphanedItems="True" SelectedIndex="{Binding SelectedTab}">
                    <dragablz:TabablzControl.InterTabController>
                        <dragablz:InterTabController />
                    </dragablz:TabablzControl.InterTabController>

                    <TabItem Header="Données">
                        <ContentControl prism:RegionManager.RegionName="{x:Static resources:RegionNames.TabDataRegion}" />
                    </TabItem>
                    <TabItem Header="Cartographie">
                        <ContentControl prism:RegionManager.RegionName="{x:Static resources:RegionNames.TabMapRegion}" />
                    </TabItem>
                    <TabItem Header="Résultats">
                        <ContentControl prism:RegionManager.RegionName="{x:Static resources:RegionNames.TabResultRegion}" />
                    </TabItem>

                </dragablz:TabablzControl>
            </dockablz:Layout>
        </Grid>
</UserControl>

My exception

An unhandled exception of type 'System.Reflection.TargetInvocationException' occurred in mscorlib.dll
Exception has been thrown by the target of an invocation.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:42 (20 by maintainers)

github_iconTop GitHub Comments

1reaction
ButchersBoycommented, Apr 25, 2017

Use a totally static InterTabClient. This often helps remove a lot of the complexity around DataContext.

Example: https://github.com/ButchersBoy/doobry/blob/master/Doobry/MainWindow.xaml#L55

0reactions
ButchersBoycommented, Apr 25, 2017

If you post a GitHub repo I will try and take a look. No zip files please.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Activating window move on tear-off tabs
I have a tabcontrol with tab items. I would like to open a specific tab in its own window when an user "tears"...
Read more >
Exception 'Operation is not valid ...' when I try to remove a ...
Hi, I want remove Tab item from Tab control which itemsource binding to a source. But i got this error 'Operation is not...
Read more >
Chrome 110 will automatically discard background tabs. ...
The "discards" tab will show you the state of all your tabs, and the right "actions" column contains an "urgent discard" link, allowing...
Read more >
drag and drop - Disable ability to pull a tab off of Chrome
With the exception of "drag and drop", or "open tab in a new window", which this has nothing, directly, to do with.
Read more >
Add an Exception Rule - TechDocs - Broadcom Inc.
Select the Exception Handler tab. ... Expand the Exception operator properties dialog. ... Select an exception type from the drop-down list.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found