|
<ResourceDictionary x:Class="CommonUtils.Themes.Generic"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:CommonUtils">
<Style x:Key="DropDownButtonStyle" TargetType="{x:Type Button}" />
<Style TargetType="local:TextBoxWithHistory" BasedOn="{StaticResource {x:Type TextBox}}">
<Style.Setters>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="TextBoxBase">
<ControlTemplate.Resources>
</ControlTemplate.Resources>
<Border
BorderThickness="0.4"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding Foreground}"
>
<StackPanel>
<DockPanel>
<Button Width="20"
x:Name="PART_DropButton"
DockPanel.Dock="Right"
Margin="3,0,0,0"
Height="{TemplateBinding Height}"
Style="{DynamicResource DropDownButtonStyle}"
Foreground="{TemplateBinding Foreground}"
Focusable="False"
>
<Path Fill="{TemplateBinding Foreground}" Stroke="{TemplateBinding Foreground}" >
<Path.Data>
<PathGeometry Figures="M0,0L6,0L3,3z" />
</Path.Data>
</Path>
</Button>
<ScrollViewer Name="PART_ContentHost"
Margin="2"
SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}"
HorizontalContentAlignment="Center"
VerticalContentAlignment="Center"/>
</DockPanel>
<local:HistoryListPopup x:Name="PART_Popup"
IsOpen="False"
StaysOpen="False"
Placement="Bottom"
AllowsTransparency="True"
Width="{TemplateBinding ActualWidth}"
Height="200"
>
<ListBox ItemsSource="{Binding HistoryList}"
Background="{TemplateBinding Background}"
Foreground="{TemplateBinding Foreground}"
SelectedItem="{Binding SelectedItem, Mode=TwoWay}"
x:Name="m_historyListBox"
>
<!--SelectedItem="{TemplateBinding local:HistoryListPopup.SelectedItem, Mode=TwoWay}"-->
<!--MouseDoubleClick="OnMouseDoubleClick"-->
</ListBox>
</local:HistoryListPopup>
</StackPanel>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style.Setters>
</Style>
<Style TargetType="{x:Type local:TestCustomControl}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:TestCustomControl}">
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}">
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.