Skip to content

Conversation

@Moulde
Copy link

@Moulde Moulde commented Mar 15, 2017

Hi

I ran into this issue where if you wrap the TabablzControl (inside the Layout), in a Grid element like so:

    <Grid>
        <dragablz:TabablzControl x:Name="InitialTabablzControl"
                             FixedHeaderCount="1"
                             Style="{StaticResource TabablzControlStyle}"
                             AddLocationHint="After">
            <dragablz:TabablzControl.InterTabController>
                <dragablz:InterTabController InterTabClient="{Binding InterTabClient}" Partition="2AE89D18-F236-4D20-9605-6C03319038E6" />
            </dragablz:TabablzControl.InterTabController>
        </dragablz:TabablzControl>
    </Grid>

It can be reproduced in the BoundExampleWindow.xaml sample.
After wrapping in Grid, the "Query Layouts" no longer works.

After wrapping the element in Grid, the LayoutAccessor can no longer find the tabablzControl as this is not the direct child of the Layout element.

The LayoutAccessor currently does this

        var branch = Layout.Content as Branch;
        if (branch != null)
            _branchAccessor = new BranchAccessor(branch);
        else
        {
            _tabablzControl = Layout.Content as TabablzControl;
        }

But after wrapping the TabablzControl in the grid, like above. The above line results in null, as Grid cant be converted to TabablzControl type.

I figure it should instead traverse down untill it finds the TabablzControl.


Changed LayouAccessor constructor to look for TabablzControl instead of just (trying to) convert Layout.Content to TabablzControl.

mha added 2 commits March 15, 2017 09:41
Changed LayouAccessor constructor to look for TabablzControl instead of just (trying to) convert Layout.Content to TabablzControl.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant