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

RadDropDownButton.DropDownContent on top of the modalbackground after ShowDialog()

2 Answers 177 Views
Buttons
This is a migrated thread and some comments may be shown as answers.
Ted
Top achievements
Rank 1
Ted asked on 16 Sep 2011, 09:14 AM
Hi,
I have a question for RadDropDownButton and Modal window in XBAP model. If you click the dropdown item of RadDropDownButton, it will popup the modal window (ShowDialog), but the DropDownContent doesn't disappear and it is on top of the ModalBackground. If you click the other place, the DropDownContent disappears. I want to know how can i resolve it?

<Page x:Class="WpfBrowserApplication1.Page1"
      mc:Ignorable="d"
      d:DesignHeight="600" d:DesignWidth="800"
      Title="Page1">
    <Grid VerticalAlignment="Top">
        <StackPanel Orientation="Horizontal" >
            <telerik:RadDropDownButton Focusable="False" x:Name="RadDropDownButton1" Width="120" Height="120" Background="{x:Null}" Margin="20" CornerRadius="8" BorderThickness="1" BorderBrush="#E0E0E0"  DropDownButtonPosition="Bottom" DropDownIndicatorVisibility="{Binding IsShowContent}">
                <StackPanel Orientation="Vertical" Margin="0,0,0,0">
                    <Image Width="84" Height="84" Source="/WpfBrowserApplication1;component/Images/soundforge.ico" />
                    <TextBlock HorizontalAlignment="Center" FontWeight="Bold"  VerticalAlignment="Center" Text="soundforge" />
                </StackPanel>
                <telerik:RadDropDownButton.DropDownContent>
                    <ListBox BorderThickness="0" Focusable="False">
                        <telerik:RadMenuItem Focusable="False" Height="32" Width="230" Header="Header1" Click="RadMenuItem_Click">
                            <telerik:RadMenuItem.Icon>
                                <Image Height="16" Width="16" Source="/WpfBrowserApplication1;component/Images/Bmp.ico" />
                            </telerik:RadMenuItem.Icon>
                        </telerik:RadMenuItem>
                    </ListBox>
                </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
        </StackPanel>
    </Grid>
</Page>
private void RadMenuItem_Click(object sender, RoutedEventArgs e)
 {
            RadControlsScenario1 dd = new RadControlsScenario1();
            dd.WindowStartupLocation = WindowStartupLocation.CenterScreen;
            dd.ShowDialog();
            dd.Focus();
 }


Thanks,
Ted.

2 Answers, 1 is accepted

Sort by
0
Accepted
Zarko
Telerik team
answered on 21 Sep 2011, 12:57 PM
Hi Ted,
You could try to close it manually in the event handler like this:
this.RadDropDownButton1.IsOpen = false;
If you have more questions please feel free to ask.

Best wishes,
Zarko
the Telerik team

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

0
Ted
Top achievements
Rank 1
answered on 22 Sep 2011, 06:42 AM
Cool~~Thanks for you help.
Tags
Buttons
Asked by
Ted
Top achievements
Rank 1
Answers by
Zarko
Telerik team
Ted
Top achievements
Rank 1
Share this question
or