Page 1 of 1

Minor bug in rendering of Expander

Posted: Sun May 15, 2016 3:11 am
by rkmore
The new controls in Beta 8 are great! Especially the Tab and Expander controls.
However I have found a small bug in the rendering of "Expander".
I often use nested expanders to implement a tree view. In Beta 8 when an expander is nested the expannsion button is not rendered until it has been clicked once.

The following demonstrates the issue...

Code: Select all

<Page
    x:Class="Application5.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Application5"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">
    <StackPanel>
        <Expander Background="White">
            <Expander.Header>
                <TextBlock Text="Level 1" Foreground="Black" Background="White" FontSize="20"/>
            </Expander.Header>
            <StackPanel Margin="20,0,0,0">
                <Expander Background="White">
                    <Expander.Header>
                        <TextBlock Text="Level 2 Item 1" Foreground="Black" Background="White" FontSize="20"/>
                    </Expander.Header>
                    <StackPanel Margin="20,0,0,0">
                        <TextBlock Text="Level 3 Item 1" Foreground="Black" Background="White" FontSize="20" Margin="20,0,0,0"/>
                        <TextBlock Text="Level 3 Item 2" Foreground="Black" Background="White" FontSize="20" Margin="20,0,0,0"/>
                        <TextBlock Text="Level 3 Item 3" Foreground="Black" Background="White" FontSize="20" Margin="20,0,0,0"/>
                    </StackPanel>
                </Expander>
                <Expander Background="White">
                    <Expander.Header>
                        <TextBlock Text="Level 2 Item 2" Foreground="Black" Background="White" FontSize="20"/>
                    </Expander.Header>
                    <StackPanel Margin="20,0,0,0">
                        <TextBlock Text="Level 3 Item 1" Foreground="Black" Background="White" FontSize="20" Margin="20,0,0,0"/>
                        <TextBlock Text="Level 3 Item 2" Foreground="Black" Background="White" FontSize="20" Margin="20,0,0,0"/>
                        <TextBlock Text="Level 3 Item 3" Foreground="Black" Background="White" FontSize="20" Margin="20,0,0,0"/>
                    </StackPanel>
                </Expander>
                <Expander Background="White">
                    <Expander.Header>
                        <TextBlock Text="Level 2 Item 3" Foreground="Black" Background="White" FontSize="20"/>
                    </Expander.Header>
                    <StackPanel Margin="20,0,0,0">
                        <TextBlock Text="Level 3 Item 1" Foreground="Black" Background="White" FontSize="20" Margin="20,0,0,0"/>
                        <TextBlock Text="Level 3 Item 2" Foreground="Black" Background="White" FontSize="20" Margin="20,0,0,0"/>
                        <TextBlock Text="Level 3 Item 3" Foreground="Black" Background="White" FontSize="20" Margin="20,0,0,0"/>
                    </StackPanel>
                </Expander>
            </StackPanel>
        </Expander>       
    </StackPanel>
</Page>

Re: Minor bug in rendering of Expander

Posted: Sun May 15, 2016 8:57 pm
by JS-Support @Userware
Thank you for reporting this issue.

We are going to investigate the issue related to nested Expander controls. We will keep you updated.

We are working hard on the next release.

PS : Glad you like the new controls introduced in Beta 8. By the way, with the new support for ControlTemplates, it is now possible to create just any control by inheriting from Control, adding dependency properties, and specifying a ControlTemplate (which uses "OnApplyTemplate", "GetTemplatedChild", and "TemplateBinding" for interactions between the ControlTemplate and the class).

Thank you.
Regards
JS-Support