|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:UpDownCtrls"
xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Luna"
x:Name="MyArrowButton">
<local:ThicknessToMarginConverter x:Key="ThicknessToMarginConverter" />
<Style TargetType="{x:Type local:ArrowRepeatButton}">
<Setter Property="Focusable" Value="False"/>
<Setter Property="IsTabStop" Value="False"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:ArrowRepeatButton}">
<Grid Margin="0,0,0,0">
<Microsoft_Windows_Themes:ScrollChrome x:Name="ScrollChrome" HasOuterBorder="false"
Padding="0,0,0,0" SnapsToDevicePixels="False" ClipToBounds="True"
HorizontalAlignment="Stretch" RenderMouseOver="{TemplateBinding IsMouseOver}"
RenderPressed="{TemplateBinding IsPressed}"
ThemeColor="Metallic"/>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="ButtonArrowType" Value="Down">
<Setter TargetName="ScrollChrome" Property="Microsoft_Windows_Themes:ScrollChrome.ScrollGlyph" Value="DownArrow"/>
</Trigger>
<Trigger Property="ButtonArrowType" Value="Up">
<Setter TargetName="ScrollChrome" Property="Microsoft_Windows_Themes:ScrollChrome.ScrollGlyph" Value="UpArrow" />
</Trigger>
<Trigger Property="ButtonArrowType" Value="Left">
<Setter TargetName="ScrollChrome" Property="Microsoft_Windows_Themes:ScrollChrome.ScrollGlyph" Value="LeftArrow" />
</Trigger>
<Trigger Property="ButtonArrowType" Value="Right">
<Setter TargetName="ScrollChrome" Property="Microsoft_Windows_Themes:ScrollChrome.ScrollGlyph" Value="RightArrow" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- Other theme specific values here (that is, that are not used by RepeatArrowBotton) -->
<Style x:Key="UpDownButtonsStyle" TargetType="{x:Type local:UpDownButtons}">
<Setter Property="Margin" Value="{Binding BorderThickness, ElementName=TextBoxCtrl}"/>
<Setter Property="BorderThickness" Value="1"/>
</Style>
<Style x:Key="TimeCtrlsGridStyle" TargetType="{x:Type Grid}">
<Setter Property="Margin" Value="{Binding ElementName=TextBoxCtrl,
Path=BorderThickness,
Converter={StaticResource ThicknessToMarginConverter},
ConverterParameter=true}"/>
</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.