Hello Jimmy,
The
RadDropDownButton DropDownContent can be closed by setting the
RadDropDownButton.
IsOpen property to
false. This is why in your scenario you can handle the click of the buttons displayed in the
DropDownContent of the
RadDropDownButton to set the
IsOpen property. You can also handle the
PopupRoot Grid MouseLeave event to also close the
DropDownContent.
<telerik:RadDropDownButton x:Name="Currentfull" Margin="0,0,0,4" AutoOpenDelay="0:0:0.2"
VerticalContentAlignment="Center" HorizontalAlignment="Center" VerticalAlignment="Center">
<StackPanel Height="18" Margin="6,0" VerticalAlignment="Center" Orientation="Horizontal">
<Image Width="16" Height="16" Margin="3,0" VerticalAlignment="Center" />
<TextBlock VerticalAlignment="Center" FontFamily="Arial" FontSize="13" Foreground="#FF3D4350"
Text="CurrentFull" />
</StackPanel>
<telerik:RadDropDownButton.DropDownContent>
<Grid x:Name="PopupRoot" MouseLeave="PopupRoot_MouseLeave">
<Border Background="#FFF4F4F4" BorderBrush="#FFAAB9C0" BorderThickness="1" CornerRadius="1"
Padding="10,16,0,0">
<Border.Effect>
<DropShadowEffect BlurRadius="6" Opacity="0.4" ShadowDepth="1" />
</Border.Effect>
<StackPanel Margin="0,0,10,10">
<telerik:RadButton Name="rb_GetData" Click="rb_GetData_Click" Content="GetData"
FontSize="14" />
<telerik:RadButton Name="rb_SaleList" Click="rb_SaleList_Click" Content="SaleList"
FontSize="14" />
</StackPanel>
</Border>
<Path Width="14.142" Height="7.071" Margin="25,-6,0,0" HorizontalAlignment="Left"
VerticalAlignment="Top" Data="M7.0710683,0 L14.142137,7.0710683 L0,7.0710683 z"
Fill="#FFF4F4F4" Stretch="Fill" UseLayoutRounding="False">
<Path.Effect>
<DropShadowEffect BlurRadius="0" Direction="90" Opacity="0.4" ShadowDepth="1" />
</Path.Effect>
</Path>
</Grid>
</telerik:RadDropDownButton.DropDownContent>
</telerik:RadDropDownButton>
Give this a try and let me know if this is what you had in mind.
Kind regards,
Tina Stancheva
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>