Expander not working on first click

15 posts, 0 answers
  1. patrick
    patrick avatar
    2 posts
    Member since:
    Oct 2010

    Posted 04 Aug 2011 Link to this post

    We have implemented the WPF expander. however on first click on the closed expander, nothing occurs. User has to click twice for expander to function. Subsequent to that, exoander works fine. Any suggestions?
  2. Kiril Stanoev
    Admin
    Kiril Stanoev avatar
    1512 posts

    Posted 09 Aug 2011 Link to this post

    Hi Patrick,

    We are not aware of such an existing issue. Could you please take a look at the attached project and let me know if I am missing anything. I'd be glad to further assist you.

    All the best,
    Kiril Stanoev
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

  3. UI for WPF is Visual Studio 2017 Ready
  4. Gerardo
    Gerardo avatar
    18 posts
    Member since:
    Jun 2011

    Posted 29 Nov 2011 Link to this post

    Hi,
    I have the same Patrick´s issue.
    I was working with 2011 q1 version and i updated it to 2011 q3 recently and then radexpander controls are not expanded at first click.
  5. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 02 Dec 2011 Link to this post

    Hi Gerardo,

    Do you set any custom styles/ControlTemplate for the RadExpander control? Can you send us a sample reproducing the issue or code samples that we can use to try and reproduce it on our side?

    We will highly appreciate your cooperation on the matter. Thank you in advance.

    Greetings,
    Tina Stancheva
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  6. Scott
    Scott avatar
    30 posts
    Member since:
    Aug 2011

    Posted 12 Dec 2011 Link to this post

    I'm seeing a behavior that *might* be related. I have two RadPane items in a RadPaneGroup with one starting in the foreground, the other seen only as a tab. In the Q2 release, it used to take one click to switch to the second pane. In the Q3 release, it now takes two clicks. Once the second pane has been activated in that fashion, one click will suffice to switch between tabs.

    I'll post the issue in the RadDocking forum, too.
  7. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 15 Dec 2011 Link to this post

    Hello Scott,

    We don't believe that the two issues - the RadPane and RadExpander are related. However in the RadExpander there was a known scenario in which the control had to be double clicked in order to visualize its content, but this issue was fixed and the control should work as expected with the latest release.

    Regards,
    Tina Stancheva
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  8. Gerardo
    Gerardo avatar
    18 posts
    Member since:
    Jun 2011

    Posted 15 Dec 2011 Link to this post

    Hi, what´s the latest release?, I´ve  2011 Q3 release and it has that issue.
  9. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 16 Dec 2011 Link to this post

    Hi Gerardo,

    The Q3 2011 release is the latest release and we are not aware of such issues with the RadExpander in it. This is why I wanted to ask you if you can assist us in reproducing the issue on our side so that we can investigate the case.

    Can you please try to isolate the issue in a small project and send it to us? Also, if you can list the steps to reproduce the issues, that would greatly help us.

    Thank you in advance for your cooperation on the matter.

    Greetings,
    Tina Stancheva
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  10. Gerardo
    Gerardo avatar
    18 posts
    Member since:
    Jun 2011

    Posted 16 Dec 2011 Link to this post

    HI, this is my code:

        <Style x:Key="EstiloRadExpanderCM" TargetType="{x:Type telerik:RadExpander}"
        </Style>
     
     
    <Style x:Key="ListBoxStyleIndicador" TargetType="{x:Type ListBoxItem}">
            <Style.Resources>
                <BooleanToVisibilityConverter x:Key="boolToVis"/>
            </Style.Resources>
            <Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
            <Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
            <Setter Property="Padding" Value="2,0,2,0"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate x:Name="ListBoxStyleIndicadorTemplate" TargetType="{x:Type ListBoxItem}">
                        <Border x:Name="Bd"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Background="{TemplateBinding Background}"
                                Padding="{TemplateBinding Padding}"
                                SnapsToDevicePixels="true">
                            <Controles:ToggleButtonIndicador
                                Content="{Binding NombreIndicador}"
                                IdBIIndicadores="{Binding IdBiIndicadores}"
                                IsChecked="{Binding IsSelected, Mode=TwoWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListBoxItem}}}"
                                Style="{DynamicResource BotonNegro}"
                                Padding="6,2"                            
                                ToolTip="{Binding Descripcion}"
                                Visibility="{Binding Visible, Converter={StaticResource boolToVis}}">                           
                                <Controles:ToggleButtonIndicador.Resources>
                                    <Controles:BindingProxy x:Key="itemProxy"
                                                            Data="{Binding DataContext, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListBoxItem}}}" />
                                    <Controles:BindingProxy x:Key="vmProxy"
                                                            Data="{Binding DataContext, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}" />
                                    <BooleanToVisibilityConverter x:Key="boolToVis"/>
                                </Controles:ToggleButtonIndicador.Resources>
                                <Controles:ToggleButtonIndicador.ContextMenu>
                                    <ContextMenu>
                                        <MenuItem Header="Editar"
                                                  DataContext="{Binding Data,Source={StaticResource vmProxy}}">
                                            <MenuItem.Icon>
                                                <Image Source="{DynamicResource ImagenBotonEditarCM}" />
                                            </MenuItem.Icon>
                                            <Interactivity:Interaction.Triggers>
                                                <Interactivity:EventTrigger EventName="Click" >
                                                    <cal:ActionMessage MethodName="EditarIndicador" >
                                                        <cal:Parameter Value="{Binding Path=Data.IdBiIndicadores, Source={StaticResource itemProxy}}" />
                                                    </cal:ActionMessage >
                                                </Interactivity:EventTrigger>
                                            </Interactivity:Interaction.Triggers>
                                        </MenuItem>
                                        <MenuItem Header="Nuevo"
                                                  DataContext="{Binding Data,Source={StaticResource vmProxy}}">
                                            <MenuItem.Icon>
                                                <Image Source="{DynamicResource ImagenBotonMasCM}" />
                                            </MenuItem.Icon>
                                            <Interactivity:Interaction.Triggers>
                                                <Interactivity:EventTrigger EventName="Click" >
                                                    <cal:ActionMessage MethodName="NuevoIndicador" >                                                   
                                                    </cal:ActionMessage >
                                                </Interactivity:EventTrigger>
                                            </Interactivity:Interaction.Triggers>
                                        </MenuItem>
                                        <MenuItem Header="Eliminar"
                                                  Visibility="{Binding Path=Data.Derivado,Source={StaticResource itemProxy},Converter={StaticResource boolToVis}}"
                                                  DataContext="{Binding Data,Source={StaticResource vmProxy}}">
                                            <MenuItem.Icon>
                                                <Image Source="{DynamicResource ImagenBotonCancelarCM}" />
                                            </MenuItem.Icon>
                                            <Interactivity:Interaction.Triggers>
                                                <Interactivity:EventTrigger EventName="Click" >
                                                    <cal:ActionMessage MethodName="EliminarIndicador" >
                                                        <cal:Parameter Value="{Binding Path=Data.IdBiIndicadores, Source={StaticResource itemProxy}}" />
                                                    </cal:ActionMessage >
                                                </Interactivity:EventTrigger>
                                            </Interactivity:Interaction.Triggers>
                                        </MenuItem>
                                    </ContextMenu>
                                </Controles:ToggleButtonIndicador.ContextMenu>
     
                            </Controles:ToggleButtonIndicador>
                        </Border>
     
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
            <Setter Property="IsSelected" Value="{Binding Seleccionado, Mode=TwoWay}"/>
        </Style>
         
         
        <telerik:RadExpander x:Name="rexpParametros"
                                             Grid.Column="0"
                                             ExpandDirection="Right"
                                             SizeChanged="rexpParametros_SizeChanged"                                        
                                             Style="{DynamicResource EstiloRadExpanderCM}" >
                            <telerik:RadExpander.Header>
                                <TextBlock TextWrapping="Wrap">
                                    <Run Foreground="White" Language="es-es" Text="Parámetros" FontSize="14"/>
                                </TextBlock>
                            </telerik:RadExpander.Header>
                            <ListBox x:Name="lbxParametros"                    
                                     ItemsSource="{Binding Path=Parametros, Mode=TwoWay}"
                                     Background="{x:Null}"
                                     SelectionMode="Multiple"
                                     ItemContainerStyle= "{DynamicResource ListBoxStyleParametroVista}"                                 
                                     BorderBrush="{x:Null}"
                                     VerticalContentAlignment="Center"
                                     SelectionChanged="lbxParametros_SelectionChanged"
                                     IsEnabled="{Binding Path=IsEnabledListaParametros, Mode=OneWay}"
                                     d:LayoutOverrides="Height" >
                                <Interactivity:Interaction.Triggers>
                                    <Interactivity:EventTrigger EventName="SelectionChanged">
                                        <cal:ActionMessage MethodName="SelectionChangedParametros">
                                        </cal:ActionMessage>
                                    </Interactivity:EventTrigger>
                                </Interactivity:Interaction.Triggers>
                            </ListBox>
                        </telerik:RadExpander>
  11. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 21 Dec 2011 Link to this post

    Hello Gerardo,

     I had to isolate your code in order to make it run. Unfortunately, I was unable to detect any issue regarding the proper expansion of the RadExpander. Is it possble for you to send us a runnable sample showing your issue? We could change this ticket's type to GeneralFeedBack or you can send us a project in a new support ticket. thank you in advance for your cooperation. 

    Kind regards,
    Petar Mladenov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  12. ITC
    ITC avatar
    19 posts
    Member since:
    Nov 2010

    Posted 23 Dec 2011 Link to this post

    Hi 

    I am using the RadExpander in the RowDetails portion of a GridView. If I set the IsExpanded property to true the expander header is rendered in expanded state, but the content is not expanded.

    I have to click on the header to collapse and then click again to expand. After that it works fine.

    I have seen this behaviour when I have multiple expanders below each other in a stackpanel. This happens when the stackpanel is hosted in a backstage item, a rowdetails of a gridview, etc.

    Hope the above helps to track it down. Let me know if you need anything else...
  13. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 28 Dec 2011 Link to this post

    Hello Dirk,

     Unfortunately, we were again unable to reproduce this issue when we placed the RadExpander in the RowDetaisTemplate. You can see this in the attached example.
    Indeed, we have similar issues - you can check out this PITS item. Is it possible for you to send us more from your code - via new support ticket for example? This way we could better investigate this issue and advice you better. Probably it has to do with the mentioned PITS item but we cannot confirm this without reproducing it.
    Thank you in advance for your cooperation. 

    All the best,
    Petar Mladenov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  14. Sebastian
    Sebastian avatar
    12 posts
    Member since:
    Oct 2010

    Posted 27 Feb 2012 Link to this post

    Hello,

    i have a similar problem with the RadExpander, where the content is not shown unless the expander is collapsed and re-expanded again.

    I have build a litte example with Blend, that roughly represents my application window:

    <Window
        x:Class="ExpanderTest.MainWindow"
        x:Name="Window"
        Title="MainWindow"
        Width="640" Height="480">
     
        <Grid x:Name="LayoutRoot">
            <telerik:RadTabControl>
                <telerik:RadTabItem Header="RadTabItem">
                    <DockPanel>
                        <telerik:RadExpander Header="RadExpander" ExpandDirection="Left" IsExpanded="True">
                            <telerik:RadOutlookBar>
                                <telerik:RadOutlookBarItem Header="RadOutlookBarItem"/>
                            </telerik:RadOutlookBar>
                        </telerik:RadExpander>
                        <telerik:RadGridView/>
                    </DockPanel>
                </telerik:RadTabItem>
            </telerik:RadTabControl>
        </Grid>
    </Window>

    After starting the application in Blend, the expander is marked as expanded, but the outlookbar is not shown. For me, this is reproduceable on every startup.

    (RadControl for WPF 2011.3.1116.35)

    ---
    btw: i know, that the outlookbar can be collapsed itself, but due to some historical reasons it is still placed inside an expander... collapsing the outlookbar ist deactivated in my project. Using a TreeView instead the outlookBar does not effect the behavior of the expander.
  15. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 01 Mar 2012 Link to this post

    Hello Sebastian ,

     I am not sure whether this is an issue in the RadDocking or int he RadExpander/RadOutlookBar but I can assure it is fixed in the Q1 2012 as you can see in the attached project. Is it suitable for you to upgrade?

    Regards,
    Petar Mladenov
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  16. Sebastian
    Sebastian avatar
    12 posts
    Member since:
    Oct 2010

    Posted 16 Mar 2012 Link to this post

    Hello Petar,

    yes, i have now upgraded to  Q1 2012 and the RadExpander works fine.

    Thanks
    Sebastian
Back to Top
UI for WPF is Visual Studio 2017 Ready