Quantcast
Channel: Extended WPF Toolkit™ Community Edition
Viewing all articles
Browse latest Browse all 4964

Commented Unassigned: DropDownButton without border and background does not function as expected [22497]

$
0
0
If you have a DropDownButton without a border or background and approach with the mouse from the right it does not focus or respond to clicks until the mouse is over the text of the button. This means even if you mouse over or click on the "v" part of the control it doesn't actually respond to mouse clicks.

This does not reproduce when there's a background and/or a border.

Repro code:
```
<Window x:Class="DropDownButtonDemo.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:xctk="clr-namespace:Xceed.Wpf.Toolkit;assembly=Xceed.Wpf.Toolkit"
xmlns:local="clr-namespace:DropDownButtonDemo"
mc:Ignorable="d"
Title="MainWindow"
Height="350"
Width="525">
<StackPanel Orientation="Horizontal">
<xctk:DropDownButton Width="Auto"
Height="Auto"
Content="Normal DDB (border)"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Margin="16">
<xctk:DropDownButton.DropDownContent>
<StackPanel Orientation="Vertical">
<Button Content="Button1" />
</StackPanel>
</xctk:DropDownButton.DropDownContent>
</xctk:DropDownButton>
<xctk:DropDownButton Width="Auto"
Height="Auto"
Margin="16"
Content="DDB (w/o border or background)"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Background="{x:Null}"
BorderThickness="0">
<xctk:DropDownButton.DropDownContent>
<StackPanel Orientation="Vertical">
<Button Content="Button1" />
</StackPanel>
</xctk:DropDownButton.DropDownContent>
</xctk:DropDownButton>
</StackPanel>
</Window>
```
Comments: ** Comment from web user: BoucherS **

Hi,

The same thing will happen with a standard WPF Button :
```
<xctk:DropDownButton Width="Auto"
Height="Auto"
Content="Normal DDB (border)"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Margin="16">
```

My suggestion would be to use a Transparent Background instead of a Null Background.

――――
_Get more controls, features, updates and technical support with [Xceed Toolkit Plus for WPF](https://wpftoolkit.codeplex.com/wikipage?title=Compare%20Editions)_


Viewing all articles
Browse latest Browse all 4964

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>