[英]Click on current tabItem of TabControl (in WPF)
I have ScrollViewer on my TabItem, what I want to do is when user touch header scrolling up, and I call this code 我的TabItem上有ScrollViewer,我想做的是当用户触摸标题向上滚动时,我将此代码称为
ScrollMyProduct.ScrollToVerticalOffset(0);
But TabItem hasn't support clicking on only header of it, and SelectionChanged isn't work, because I clicking on current TabItem 但是TabItem不支持仅单击其标题,并且SelectionChanged不起作用,因为我单击了当前的TabItem
A while back i did this changing the style of the header 前阵子我做了这个改变标题的样式
<Setter Property="HeaderTemplate">
<Setter.Value>
<DataTemplate>
<Label Content={Binding}>
<Label.Style>
<Style TargetType="Label">
<EventSetter Event="MouseDoubleClick" Handler="TabItemMouseDoubleClick"/>
</Style>
</Label.Style>
</Label>
</DataTemplate>
</Setter.Value>
</Setter>
Which bindings to the internal label of the tabheaders label item 哪些绑定到tabheaders标签项目的内部标签
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.