This is a migrated thread and some comments may be shown as answers.

Expander header alignment broken?

4 Answers 237 Views
Expander
This is a migrated thread and some comments may be shown as answers.
Juha
Top achievements
Rank 2
Juha asked on 14 Jan 2016, 11:53 AM

I just upgraded to latest release (2016.1.112) and it looks like the Expander's icon does not follow alignment anymore. Expander expands to left and there's no header text, just the icon and vertical header alignment is set to "Center". Is this a new bug since it worked before upgrade?

Thanks,

Juha

4 Answers, 1 is accepted

Sort by
0
Dinko | Tech Support Engineer
Telerik team
answered on 19 Jan 2016, 11:33 AM
Hi Juha,

We are not sure that we correctly understand your case. We have created a sample project demonstrating when you expand/collapsed the Expander the header text is changing its vertical alignment. Can you confirm that this is the behavior you have mentioned in your ticket? If no, you can modify the attached project so it reproduce the behavior and send it back to us so we can further test it on our side. Also, can you tell us which version were you using in your application before the upgrade? 

We are looking forward to your answer.

Regards,
Dinko
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Juha
Top achievements
Rank 2
answered on 20 Jan 2016, 08:41 AM

The case is this:

 - we have an expander on the right side of the window, it expands to the left and it does not have header text, just the arrow icon

- in previous version the icon was correctly in the middle, in the new 2016 release it moved to the top of the expander

- previous version was the 1st release of 2015 if I remember correctly

<telerik:RadExpander telerik:AnimationManager.IsAnimationEnabled="False" Margin="5" Padding="0" Grid.Row="0" Grid.RowSpan="3" Grid.Column="1" IsExpanded="{Binding IsOptionsExpanded, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" ExpandDirection="Left" VerticalHeaderAlignment="Center" >

0
Dinko | Tech Support Engineer
Telerik team
answered on 22 Jan 2016, 01:52 PM
Hi Juha,

We have managed to reproduce the issue. However, our development team need more time to further investigate what is the reason causing this behavior. As a workaround, you can subscribe for the Loaded event of the RadExpander. Then you can get the RadToggleButton using the ChildrenOfType() â€‹method of the expander and set the HorizontalAlignment property to Center in code behind. Check the code snippet below:
private void expander_Loaded(object sender, RoutedEventArgs e)
{
    RadExpander expander = sender as RadExpander;
    if (expander != null)
    {
      RadToggleButton button = expander.ChildrenOfType<RadToggleButton>().FirstOrDefault();
        button.HorizontalAlignment = System.Windows.HorizontalAlignment.Center;
    }
}
Please give this approach a try and let us know if this solution works for you. 

Regards,
Dinko
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Juha
Top achievements
Rank 2
answered on 26 Jan 2016, 11:01 AM
Thanks, it works now!
Tags
Expander
Asked by
Juha
Top achievements
Rank 2
Answers by
Dinko | Tech Support Engineer
Telerik team
Juha
Top achievements
Rank 2
Share this question
or