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

Expander not working on first click

14 Answers 534 Views
Expander
This is a migrated thread and some comments may be shown as answers.
patrick
Top achievements
Rank 1
patrick asked on 04 Aug 2011, 06:25 PM
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?

14 Answers, 1 is accepted

Sort by
0
Kiril Stanoev
Telerik team
answered on 09 Aug 2011, 02:40 PM
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 >>

0
Gerardo
Top achievements
Rank 1
answered on 29 Nov 2011, 04:34 PM
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.
0
Tina Stancheva
Telerik team
answered on 02 Dec 2011, 08:56 AM
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 >>

0
Scott
Top achievements
Rank 1
answered on 12 Dec 2011, 06:41 PM
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.
0
Tina Stancheva
Telerik team
answered on 15 Dec 2011, 05:23 PM
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 >>

0
Gerardo
Top achievements
Rank 1
answered on 15 Dec 2011, 07:14 PM
Hi, what´s the latest release?, I´ve  2011 Q3 release and it has that issue.
0
Tina Stancheva
Telerik team
answered on 16 Dec 2011, 09:23 AM
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 >>

0
Gerardo
Top achievements
Rank 1
answered on 16 Dec 2011, 01:13 PM
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>
0
Petar Mladenov
Telerik team
answered on 21 Dec 2011, 11:10 AM
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 >>

0
ITC
Top achievements
Rank 1
answered on 23 Dec 2011, 01:48 PM
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...
0
Petar Mladenov
Telerik team
answered on 28 Dec 2011, 01:23 PM
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 >>

0
recotech
Top achievements
Rank 1
answered on 27 Feb 2012, 01:40 PM
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.
0
Petar Mladenov
Telerik team
answered on 01 Mar 2012, 10:42 AM
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 >>
0
recotech
Top achievements
Rank 1
answered on 16 Mar 2012, 05:37 PM
Hello Petar,

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

Thanks
Sebastian
Tags
Expander
Asked by
patrick
Top achievements
Rank 1
Answers by
Kiril Stanoev
Telerik team
Gerardo
Top achievements
Rank 1
Tina Stancheva
Telerik team
Scott
Top achievements
Rank 1
Petar Mladenov
Telerik team
ITC
Top achievements
Rank 1
recotech
Top achievements
Rank 1
Share this question
or