添加项目文件。
This commit is contained in:
44
Wpf.Ui.Extend/Controls/RunningLine/RunningLine.xaml
Normal file
44
Wpf.Ui.Extend/Controls/RunningLine/RunningLine.xaml
Normal file
@@ -0,0 +1,44 @@
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:exc="clr-namespace:Wpf.Ui.Extend.Controls">
|
||||
|
||||
<Style x:Key="DefaultRunningLineStyle" TargetType="{x:Type exc:RunningLine}">
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type exc:RunningLine}">
|
||||
<Canvas
|
||||
x:Name="RootCanvas"
|
||||
Height="{TemplateBinding ActualHeight}"
|
||||
Background="{TemplateBinding Background}">
|
||||
<ItemsControl
|
||||
x:Name="RootPanel"
|
||||
Height="{TemplateBinding ActualHeight}"
|
||||
ItemTemplate="{TemplateBinding LineTemplate}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel VerticalAlignment="{Binding VerticalContentAlignment, RelativeSource={RelativeSource FindAncestor, AncestorType=exc:RunningLine}}" Orientation="Horizontal" />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
</ItemsControl>
|
||||
<ItemsControl
|
||||
x:Name="RootPanelNext"
|
||||
Height="{TemplateBinding ActualHeight}"
|
||||
ItemTemplate="{TemplateBinding LineTemplate}"
|
||||
Visibility="Hidden">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel VerticalAlignment="{Binding VerticalContentAlignment, RelativeSource={RelativeSource FindAncestor, AncestorType=exc:RunningLine}}" Orientation="Horizontal" />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
</ItemsControl>
|
||||
</Canvas>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style BasedOn="{StaticResource DefaultRunningLineStyle}" TargetType="{x:Type exc:RunningLine}" />
|
||||
|
||||
</ResourceDictionary>
|
||||
Reference in New Issue
Block a user