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

Radexpander Makes my Itemscontrols buttons stop working

5 Answers 70 Views
Expander
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 18 Feb 2016, 02:44 PM

I have a radexpander on a form that is meant to expand over a custom control.  The relevant WPF is:

 

            <Grid Grid.Column="2" Grid.Row="1" Margin="0,20,0,0">
                <Grid.RowDefinitions>
                    <RowDefinition Height="85*"/>
                    <RowDefinition Height="15*" MinHeight="50px"/>
                </Grid.RowDefinitions>
                <gsas:FullHourlyView Grid.Row="0"/>
                <gsas:Legend Grid.Row="1" Margin="20,15,0,0" Visibility="{Binding LegendVisible, Converter={StaticResource BoolToVis}, FallbackValue=Visible}"/>
            </Grid>

            <telerik:RadExpander x:Name="expand" Grid.Column="2" Grid.Row="1" ExpandDirection="Up" VerticalAlignment="Stretch" VerticalContentAlignment="Bottom" HorizontalHeaderAlignment="Right" telerik:AnimationManager.IsAnimationEnabled="True" IsExpanded="{Binding AlarmGridExpanded, Mode=TwoWay}" Collapsed="expand_Collapsed" Expanded="expand_Expanded" ToolTip="Show Alarms">
                <ContentControl HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Content="{Binding AlarmsGrid}"></ContentControl>
            </telerik:RadExpander>
        </Grid>

The FullyHourlyView is made up of four other custom controls, the relevant bit being:

               <ItemsControl ItemsSource="{Binding HourData}" x:Name="HourBlocks">
                <ItemsControl.ItemsPanel>
                    <ItemsPanelTemplate>
                        <StackPanel Orientation="Horizontal"/>
                    </ItemsPanelTemplate>
                </ItemsControl.ItemsPanel>
                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="-1,0,-3,0"  Command="{Binding ElementName=HourBlocks, Path=DataContext.HourlyClick}" CommandParameter="{Binding}">

There are a couple of behaviors I now have to do with the radexpander being on there.  

1) The buttons do not fire, in fact that appear to be disabled or something like that because when you hover over it they do not highlight like they do when I remove the radexpander from the WPF.

2) The tooltip for the buttons is the same as the Tooltip for the RadExpander (Show Alarms).

If I remove the expander everything works as I would expect.

 

5 Answers, 1 is accepted

Sort by
0
Kiril Vandov
Telerik team
answered on 18 Feb 2016, 05:08 PM
Hello Mark,

We have tried to reproduce the reported behavior, but with no success. The RadExpander does not treat or modify its content in any matter that is why we think that the issue might be caused the xaml setup. That is why we would like you to provide us with a sample project reproducing the issue in order to provide investigate further.

Looking forward to hearing from you.

Kind regards,
Kiril Vandov
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
Mark
Top achievements
Rank 1
answered on 19 Feb 2016, 03:53 PM

Kiril,

I have an example, how do I get it to you?

0
Mark
Top achievements
Rank 1
answered on 19 Feb 2016, 04:50 PM

Kiril,

I can get it to do it with just this:

<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:t="clr-namespace:TestItemsControlButton"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" x:Class="TestItemsControlButton.MainWindow"
        Title="MainWindow" Height="350" Width="525"
        >
    <Grid>
        <Button Height="50"></Button>
        <telerik:RadExpander x:Name="expand" Grid.Column="2" Grid.Row="1"  ExpandDirection="Up" VerticalAlignment="Stretch" VerticalContentAlignment="Bottom" HorizontalHeaderAlignment="Right" telerik:AnimationManager.IsAnimationEnabled="True" IsExpanded="{Binding AlarmGridExpanded, Mode=TwoWay}" ToolTip="Show Alarms">
        </telerik:RadExpander>
    </Grid>
</Window>

0
Accepted
Kiril Vandov
Telerik team
answered on 22 Feb 2016, 07:32 AM
Hello Mark,

If the attached code-snippet is a copy of your code a the issue is that you cant click on the button marked with Height="50", it is expected let me explain why. You have defined a Grid in which you are defining a Button and on top of it a RadExpander, as the RadExpander does not have background set by default you are able to see the button below it (that does not make it clickable). You will reproduce that behavior with all MS controls too, you can try to use the MS Expander and reproduce the behavior. If you want to display the button and the Expander and keep their interaction you will need to define them in different Grid Columns\Rows depends on your UI preferences.
<Grid>
    <Grid.ColumnDefinitions>
        <ColumnDefinition />
        <ColumnDefinition />
    </Grid.ColumnDefinitions>
    <Button Height="50"></Button>
    <telerik:RadExpander x:Name="expand"  Background="Orange"
                         Grid.Column="2"
                         Grid.Row="1" 
                         ExpandDirection="Up"
                         VerticalAlignment="Stretch"
                         VerticalContentAlignment="Bottom"
                         HorizontalHeaderAlignment="Right"
                         telerik:AnimationManager.IsAnimationEnabled="True"
                         IsExpanded="{Binding AlarmGridExpanded, Mode=TwoWay}" ToolTip="Show Alarms">
        <local:UserControl1 />
    </telerik:RadExpander>
</Grid>
I hope this information helps.

Kind regards,
Kiril Vandov
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
Mark
Top achievements
Rank 1
answered on 22 Feb 2016, 08:23 PM

Kiril, 

That was it, thank you.

Tags
Expander
Asked by
Mark
Top achievements
Rank 1
Answers by
Kiril Vandov
Telerik team
Mark
Top achievements
Rank 1
Share this question
or