Expander header alignment broken?

5 posts, 0 answers
  1. Juha
    Juha avatar
    3 posts
    Member since:
    Mar 2015

    Posted 14 Jan Link to this post

    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

  2. Dinko
    Admin
    Dinko avatar
    206 posts

    Posted 19 Jan Link to this post

    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
  3. UI for WPF is Visual Studio 2017 Ready
  4. Juha
    Juha avatar
    3 posts
    Member since:
    Mar 2015

    Posted 20 Jan in reply to Dinko Link to this post

    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" >

  5. Dinko
    Admin
    Dinko avatar
    206 posts

    Posted 22 Jan Link to this post

    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
  6. Juha
    Juha avatar
    3 posts
    Member since:
    Mar 2015

    Posted 26 Jan in reply to Dinko Link to this post

    Thanks, it works now!
Back to Top
UI for WPF is Visual Studio 2017 Ready