WPF ComboBox样式
标签:xmlns nts nsf textbox sof checked snap path and
一、样式的样子就是这样的
二、样式Style - 不可编辑请设置 属性为ReadOnly=true属性
1 "http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
3
4
31
32
33
58
59
60 "Template">
61 62 "ComboBox">
63 "#F7FDF7">
64 65 "0.7*"/>
66 "0.3*" MaxWidth="30"/>
67 68 "0" IsReadOnly="{TemplateBinding IsReadOnly}" Text="{TemplateBinding Text}">69 "0" BorderThickness="1,1,0,1" BorderBrush="#81D779" CornerRadius="1,0,0,1">
70
71 72 "1" BorderThickness="0,1,1,1" BorderBrush="#81D779" CornerRadius="0,1,1,0">
73 "{StaticResource ComboxStyleBtn}" IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" ClickMode="Press">74 75 "{TemplateBinding IsDropDownOpen}" Placement="Bottom" x:Name="Popup" Focusable="False" AllowsTransparency="True" PopupAnimation="Slide">
76 "1" MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{TemplateBinding ActualWidth}" x:Name="DropDown" SnapsToDevicePixels="True">
77 78 "Black" BlurRadius="2" ShadowDepth="0" Opacity="0.5"/>
79 80 "4,6,4,6" Style="{DynamicResource ScrollViewerStyle}" MaxHeight="{TemplateBinding MaxDropDownHeight}" SnapsToDevicePixels="True" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" CanContentScroll="True">
81
82 "True" KeyboardNavigation.DirectionalNavigation="Contained" Background="White"/>
83 84 85 86 87 88 89 90
91
三、关于ScroolViwer样式
1
2 34
35 48 61
62 83
84 168
169
170 198
199 227
228 256
257
转自:http://blog.csdn.net/lvguoshan/article/details/49178619
WPF ComboBox样式
标签:xmlns nts nsf textbox sof checked snap path and
原文地址:https://www.cnblogs.com/dotnetHui/p/8452389.html
评论