init branch
No files matched your search
@@ -48,6 +48,36 @@
|
|||||||
<ProjectReference Include="..\HandyControl_Core_30\HandyControl_Core_30.csproj" />
|
<ProjectReference Include="..\HandyControl_Core_30\HandyControl_Core_30.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\QQ\1.gif">
|
||||||
|
<Link>Resources\Img\QQ\1.gif</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\QQ\2.gif">
|
||||||
|
<Link>Resources\Img\QQ\2.gif</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\QQ\3.gif">
|
||||||
|
<Link>Resources\Img\QQ\3.gif</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\QQ\4.gif">
|
||||||
|
<Link>Resources\Img\QQ\4.gif</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\QQ\5.gif">
|
||||||
|
<Link>Resources\Img\QQ\5.gif</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\QQ\6.gif">
|
||||||
|
<Link>Resources\Img\QQ\6.gif</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\QQ\7.gif">
|
||||||
|
<Link>Resources\Img\QQ\7.gif</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\QQ\8.gif">
|
||||||
|
<Link>Resources\Img\QQ\8.gif</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\QQ\9.gif">
|
||||||
|
<Link>Resources\Img\QQ\9.gif</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\QQ\10.gif">
|
||||||
|
<Link>Resources\Img\QQ\10.gif</Link>
|
||||||
|
</Resource>
|
||||||
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\1.jpg">
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\1.jpg">
|
||||||
<Link>Resources\Img\1.jpg</Link>
|
<Link>Resources\Img\1.jpg</Link>
|
||||||
</Resource>
|
</Resource>
|
||||||
@@ -363,6 +393,9 @@
|
|||||||
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\ImageStack_16x.png">
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\ImageStack_16x.png">
|
||||||
<Link>Resources\Img\LeftMainContent\ImageStack_16x.png</Link>
|
<Link>Resources\Img\LeftMainContent\ImageStack_16x.png</Link>
|
||||||
</Resource>
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\Dynamic_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\Dynamic_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\Dance.png">
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\Dance.png">
|
||||||
<Link>Resources\Img\Dance.png</Link>
|
<Link>Resources\Img\Dance.png</Link>
|
||||||
</Resource>
|
</Resource>
|
||||||
|
|||||||
@@ -83,6 +83,36 @@
|
|||||||
</Compile>
|
</Compile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\QQ\1.gif">
|
||||||
|
<Link>Resources\Img\QQ\1.gif</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\QQ\2.gif">
|
||||||
|
<Link>Resources\Img\QQ\2.gif</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\QQ\3.gif">
|
||||||
|
<Link>Resources\Img\QQ\3.gif</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\QQ\4.gif">
|
||||||
|
<Link>Resources\Img\QQ\4.gif</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\QQ\5.gif">
|
||||||
|
<Link>Resources\Img\QQ\5.gif</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\QQ\6.gif">
|
||||||
|
<Link>Resources\Img\QQ\6.gif</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\QQ\7.gif">
|
||||||
|
<Link>Resources\Img\QQ\7.gif</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\QQ\8.gif">
|
||||||
|
<Link>Resources\Img\QQ\8.gif</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\QQ\9.gif">
|
||||||
|
<Link>Resources\Img\QQ\9.gif</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\QQ\10.gif">
|
||||||
|
<Link>Resources\Img\QQ\10.gif</Link>
|
||||||
|
</Resource>
|
||||||
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\1.jpg">
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\1.jpg">
|
||||||
<Link>Resources\Img\1.jpg</Link>
|
<Link>Resources\Img\1.jpg</Link>
|
||||||
</Resource>
|
</Resource>
|
||||||
@@ -387,6 +417,9 @@
|
|||||||
<Generator>TextTemplatingFileGenerator</Generator>
|
<Generator>TextTemplatingFileGenerator</Generator>
|
||||||
<LastGenOutput>MessageToken.cs</LastGenOutput>
|
<LastGenOutput>MessageToken.cs</LastGenOutput>
|
||||||
</Content>
|
</Content>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\Dynamic_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\Dynamic_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\Dance.png">
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\Dance.png">
|
||||||
<Link>Resources\Img\Dance.png</Link>
|
<Link>Resources\Img\Dance.png</Link>
|
||||||
</Resource>
|
</Resource>
|
||||||
|
|||||||
@@ -151,6 +151,36 @@
|
|||||||
</Compile>
|
</Compile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\QQ\1.gif">
|
||||||
|
<Link>Resources\Img\QQ\1.gif</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\QQ\2.gif">
|
||||||
|
<Link>Resources\Img\QQ\2.gif</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\QQ\3.gif">
|
||||||
|
<Link>Resources\Img\QQ\3.gif</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\QQ\4.gif">
|
||||||
|
<Link>Resources\Img\QQ\4.gif</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\QQ\5.gif">
|
||||||
|
<Link>Resources\Img\QQ\5.gif</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\QQ\6.gif">
|
||||||
|
<Link>Resources\Img\QQ\6.gif</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\QQ\7.gif">
|
||||||
|
<Link>Resources\Img\QQ\7.gif</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\QQ\8.gif">
|
||||||
|
<Link>Resources\Img\QQ\8.gif</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\QQ\9.gif">
|
||||||
|
<Link>Resources\Img\QQ\9.gif</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\QQ\10.gif">
|
||||||
|
<Link>Resources\Img\QQ\10.gif</Link>
|
||||||
|
</Resource>
|
||||||
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\1.jpg">
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\1.jpg">
|
||||||
<Link>Resources\Img\1.jpg</Link>
|
<Link>Resources\Img\1.jpg</Link>
|
||||||
</Resource>
|
</Resource>
|
||||||
@@ -436,6 +466,7 @@
|
|||||||
<Link>Properties\Langs\Lang.resx</Link>
|
<Link>Properties\Langs\Lang.resx</Link>
|
||||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||||
<LastGenOutput>Lang.Designer.cs</LastGenOutput>
|
<LastGenOutput>Lang.Designer.cs</LastGenOutput>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -449,6 +480,9 @@
|
|||||||
<Generator>TextTemplatingFileGenerator</Generator>
|
<Generator>TextTemplatingFileGenerator</Generator>
|
||||||
<LastGenOutput>MessageToken.cs</LastGenOutput>
|
<LastGenOutput>MessageToken.cs</LastGenOutput>
|
||||||
</Content>
|
</Content>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\Dynamic_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\Dynamic_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\Dance.png">
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\Dance.png">
|
||||||
<Link>Resources\Img\Dance.png</Link>
|
<Link>Resources\Img\Dance.png</Link>
|
||||||
</Resource>
|
</Resource>
|
||||||
@@ -491,7 +525,6 @@
|
|||||||
<Link>Resources\fabric-icons.ttf</Link>
|
<Link>Resources\fabric-icons.ttf</Link>
|
||||||
</Resource>
|
</Resource>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup />
|
|
||||||
<Import Project="..\..\Shared\HandyControlDemo_Shared\HandyControlDemo_Shared.projitems" Label="Shared" />
|
<Import Project="..\..\Shared\HandyControlDemo_Shared\HandyControlDemo_Shared.projitems" Label="Shared" />
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
</Project>
|
</Project>
|
||||||
@@ -106,6 +106,8 @@
|
|||||||
|
|
||||||
public static readonly string ImageBlockDemoCtl = nameof(ImageBlockDemoCtl);
|
public static readonly string ImageBlockDemoCtl = nameof(ImageBlockDemoCtl);
|
||||||
|
|
||||||
|
public static readonly string RunningBlockDemoCtl = nameof(RunningBlockDemoCtl);
|
||||||
|
|
||||||
public static readonly string ButtonDemoCtl = nameof(ButtonDemoCtl);
|
public static readonly string ButtonDemoCtl = nameof(ButtonDemoCtl);
|
||||||
|
|
||||||
public static readonly string RepeatButtonDemoCtl = nameof(RepeatButtonDemoCtl);
|
public static readonly string RepeatButtonDemoCtl = nameof(RepeatButtonDemoCtl);
|
||||||
|
|||||||
@@ -55,7 +55,8 @@ var controlList = new List<string>
|
|||||||
"ButtonGroupDemoCtl",
|
"ButtonGroupDemoCtl",
|
||||||
"CardDemoCtl",
|
"CardDemoCtl",
|
||||||
"MagnifierDemoCtl",
|
"MagnifierDemoCtl",
|
||||||
"ImageBlockDemoCtl"
|
"ImageBlockDemoCtl",
|
||||||
|
"RunningBlockDemoCtl"
|
||||||
};
|
};
|
||||||
var styleList = new List<string>
|
var styleList = new List<string>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -159,6 +159,9 @@
|
|||||||
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Controls\RateDemoCtl.xaml.cs">
|
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Controls\RateDemoCtl.xaml.cs">
|
||||||
<DependentUpon>RateDemoCtl.xaml</DependentUpon>
|
<DependentUpon>RateDemoCtl.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Controls\RunningBlockDemoCtl.xaml.cs">
|
||||||
|
<DependentUpon>RunningBlockDemoCtl.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Controls\ScrollViewerDemoCtl.xaml.cs">
|
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Controls\ScrollViewerDemoCtl.xaml.cs">
|
||||||
<DependentUpon>ScrollViewerDemoCtl.xaml</DependentUpon>
|
<DependentUpon>ScrollViewerDemoCtl.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -566,6 +569,10 @@
|
|||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Include="$(MSBuildThisFileDirectory)UserControl\Controls\RunningBlockDemoCtl.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
<Page Include="$(MSBuildThisFileDirectory)UserControl\Controls\ScrollViewerDemoCtl.xaml">
|
<Page Include="$(MSBuildThisFileDirectory)UserControl\Controls\ScrollViewerDemoCtl.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
@@ -800,4 +807,9 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="$(MSBuildThisFileDirectory)Service\Data\" />
|
<Folder Include="$(MSBuildThisFileDirectory)Service\Data\" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Update="E:\Work\GitHub\HandyControl\src\Shared\HandyControlDemo_Shared\UserControl\Controls\RunningTextDemoCtl.xaml.cs">
|
||||||
|
<DependentUpon>RunningBlockDemoCtl.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
@@ -1239,6 +1239,15 @@ namespace HandyControlDemo.Properties.Langs {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 查找类似 滚动块 的本地化字符串。
|
||||||
|
/// </summary>
|
||||||
|
public static string RunningBlock {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("RunningBlock", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 滚动视图 的本地化字符串。
|
/// 查找类似 滚动视图 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -633,4 +633,7 @@
|
|||||||
<data name="ImageBlock" xml:space="preserve">
|
<data name="ImageBlock" xml:space="preserve">
|
||||||
<value>ImageBlock</value>
|
<value>ImageBlock</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="RunningBlock" xml:space="preserve">
|
||||||
|
<value>RunningBlock</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
@@ -633,4 +633,7 @@
|
|||||||
<data name="ImageBlock" xml:space="preserve">
|
<data name="ImageBlock" xml:space="preserve">
|
||||||
<value>图片块</value>
|
<value>图片块</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="RunningBlock" xml:space="preserve">
|
||||||
|
<value>滚动块</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
|
After Width: | Height: | Size: 221 B |
|
After Width: | Height: | Size: 6.2 KiB |
|
After Width: | Height: | Size: 9.3 KiB |
|
After Width: | Height: | Size: 7.7 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 7.6 KiB |
|
After Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 7.6 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 6.1 KiB |
@@ -0,0 +1,25 @@
|
|||||||
|
<UserControl x:Class="HandyControlDemo.UserControl.RunningBlockDemoCtl"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||||
|
Background="{DynamicResource RegionBrush}"
|
||||||
|
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs">
|
||||||
|
<StackPanel Margin="32">
|
||||||
|
<hc:RunningBlock Content="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=5}"/>
|
||||||
|
<hc:RunningBlock Content="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=10}" Duration="0:0:10" Margin="0,16,0,0"/>
|
||||||
|
<hc:RunningBlock Margin="0,16,0,0" Duration="0:0:20">
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<hc:GifImage Uri="/HandyControlDemo;component/Resources/Img/QQ/1.gif"/>
|
||||||
|
<hc:GifImage Uri="/HandyControlDemo;component/Resources/Img/QQ/2.gif"/>
|
||||||
|
<hc:GifImage Uri="/HandyControlDemo;component/Resources/Img/QQ/3.gif"/>
|
||||||
|
<hc:GifImage Uri="/HandyControlDemo;component/Resources/Img/QQ/4.gif"/>
|
||||||
|
<hc:GifImage Uri="/HandyControlDemo;component/Resources/Img/QQ/5.gif"/>
|
||||||
|
<hc:GifImage Uri="/HandyControlDemo;component/Resources/Img/QQ/6.gif"/>
|
||||||
|
<hc:GifImage Uri="/HandyControlDemo;component/Resources/Img/QQ/7.gif"/>
|
||||||
|
<hc:GifImage Uri="/HandyControlDemo;component/Resources/Img/QQ/8.gif"/>
|
||||||
|
<hc:GifImage Uri="/HandyControlDemo;component/Resources/Img/QQ/9.gif"/>
|
||||||
|
<hc:GifImage Uri="/HandyControlDemo;component/Resources/Img/QQ/10.gif"/>
|
||||||
|
</StackPanel>
|
||||||
|
</hc:RunningBlock>
|
||||||
|
</StackPanel>
|
||||||
|
</UserControl>
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
namespace HandyControlDemo.UserControl
|
||||||
|
{
|
||||||
|
public partial class RunningBlockDemoCtl
|
||||||
|
{
|
||||||
|
public RunningBlockDemoCtl()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -325,6 +325,11 @@
|
|||||||
<Image Source="../../Resources/Img/LeftMainContent/TextBlock_16x.png"/>
|
<Image Source="../../Resources/Img/LeftMainContent/TextBlock_16x.png"/>
|
||||||
</hc:EdgeElement.LeftContent>
|
</hc:EdgeElement.LeftContent>
|
||||||
</ListBoxItem>
|
</ListBoxItem>
|
||||||
|
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.RunningBlockDemoCtl}" Content="{x:Static langs:Lang.RunningBlock}">
|
||||||
|
<hc:EdgeElement.LeftContent>
|
||||||
|
<Image Source="../../Resources/Img/LeftMainContent/Dynamic_16x.png"/>
|
||||||
|
</hc:EdgeElement.LeftContent>
|
||||||
|
</ListBoxItem>
|
||||||
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.CardDemoCtl}" Content="{x:Static langs:Lang.Card}">
|
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.CardDemoCtl}" Content="{x:Static langs:Lang.Card}">
|
||||||
<hc:EdgeElement.LeftContent>
|
<hc:EdgeElement.LeftContent>
|
||||||
<Image Source="../../Resources/Img/LeftMainContent/VSO_Card_16x.png"/>
|
<Image Source="../../Resources/Img/LeftMainContent/VSO_Card_16x.png"/>
|
||||||
@@ -400,7 +405,7 @@
|
|||||||
<Image Source="../../Resources/Img/LeftMainContent/HoverMenu_16x.png"/>
|
<Image Source="../../Resources/Img/LeftMainContent/HoverMenu_16x.png"/>
|
||||||
</hc:EdgeElement.LeftContent>
|
</hc:EdgeElement.LeftContent>
|
||||||
</ListBoxItem>
|
</ListBoxItem>
|
||||||
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.RangeSliderDemoCtl}" Content="{x:Static langs:Lang.RangeSlider}">
|
<ListBoxItem Tag="{x:Static data:MessageToken.RangeSliderDemoCtl}" Content="{x:Static langs:Lang.RangeSlider}">
|
||||||
<hc:EdgeElement.LeftContent>
|
<hc:EdgeElement.LeftContent>
|
||||||
<Image Source="../../Resources/Img/LeftMainContent/brackets_Square_16xLG.png"/>
|
<Image Source="../../Resources/Img/LeftMainContent/brackets_Square_16xLG.png"/>
|
||||||
</hc:EdgeElement.LeftContent>
|
</hc:EdgeElement.LeftContent>
|
||||||
|
|||||||
@@ -0,0 +1,87 @@
|
|||||||
|
using System;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Controls;
|
||||||
|
using System.Windows.Media;
|
||||||
|
using System.Windows.Media.Animation;
|
||||||
|
using HandyControl.Data;
|
||||||
|
|
||||||
|
namespace HandyControl.Controls
|
||||||
|
{
|
||||||
|
[TemplatePart(Name = ElementContent, Type = typeof(UIElement))]
|
||||||
|
public class RunningBlock : ContentControl
|
||||||
|
{
|
||||||
|
private const string ElementContent = "PART_ContentElement";
|
||||||
|
|
||||||
|
protected Storyboard _storyboard;
|
||||||
|
|
||||||
|
private UIElement _elementContent;
|
||||||
|
public override void OnApplyTemplate()
|
||||||
|
{
|
||||||
|
base.OnApplyTemplate();
|
||||||
|
|
||||||
|
_elementContent = GetTemplateChild(ElementContent) as UIElement;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static readonly DependencyProperty OrientationProperty = DependencyProperty.Register(
|
||||||
|
"Orientation", typeof(Orientation), typeof(RunningBlock), new FrameworkPropertyMetadata(default(Orientation), FrameworkPropertyMetadataOptions.AffectsRender));
|
||||||
|
|
||||||
|
public Orientation Orientation
|
||||||
|
{
|
||||||
|
get => (Orientation) GetValue(OrientationProperty);
|
||||||
|
set => SetValue(OrientationProperty, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static readonly DependencyProperty DurationProperty = DependencyProperty.Register(
|
||||||
|
"Duration", typeof(Duration), typeof(RunningBlock), new FrameworkPropertyMetadata(new Duration(TimeSpan.FromSeconds(5)), FrameworkPropertyMetadataOptions.AffectsRender));
|
||||||
|
|
||||||
|
public Duration Duration
|
||||||
|
{
|
||||||
|
get => (Duration) GetValue(DurationProperty);
|
||||||
|
set => SetValue(DurationProperty, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static readonly DependencyProperty IsRunningProperty = DependencyProperty.Register(
|
||||||
|
"IsRunning", typeof(bool), typeof(RunningBlock), new PropertyMetadata(ValueBoxes.TrueBox, (o, args) =>
|
||||||
|
{
|
||||||
|
var ctl = (RunningBlock)o;
|
||||||
|
var v = (bool)args.NewValue;
|
||||||
|
if (v)
|
||||||
|
{
|
||||||
|
ctl._storyboard?.Resume();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ctl._storyboard?.Pause();
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
|
||||||
|
public bool IsRunning
|
||||||
|
{
|
||||||
|
get => (bool) GetValue(IsRunningProperty);
|
||||||
|
set => SetValue(IsRunningProperty, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void UpdateContent()
|
||||||
|
{
|
||||||
|
if (_elementContent == null) return;
|
||||||
|
|
||||||
|
_storyboard = new Storyboard();
|
||||||
|
|
||||||
|
var animation = new DoubleAnimation(-ActualWidth, ActualWidth, Duration)
|
||||||
|
{
|
||||||
|
RepeatBehavior = RepeatBehavior.Forever
|
||||||
|
};
|
||||||
|
Storyboard.SetTarget(animation, _elementContent);
|
||||||
|
Storyboard.SetTargetProperty(animation, new PropertyPath("(UIElement.RenderTransform).(TransformGroup.Children)[0].(TranslateTransform.X)"));
|
||||||
|
_storyboard.Children.Add(animation);
|
||||||
|
|
||||||
|
_storyboard.Begin();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnRender(DrawingContext drawingContext)
|
||||||
|
{
|
||||||
|
base.OnRender(drawingContext);
|
||||||
|
UpdateContent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -28,6 +28,7 @@
|
|||||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Slider\RangeSlider\RangeTrack.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Controls\Slider\RangeSlider\RangeTrack.cs" />
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Slider\RangeSlider\RangeThumb.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Controls\Slider\RangeSlider\RangeThumb.cs" />
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Slider\RangeSlider\TwoWayRangeBase.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Controls\Slider\RangeSlider\TwoWayRangeBase.cs" />
|
||||||
|
<Compile Include="$(MSBuildThisFileDirectory)Controls\Other\RunningBlock.cs" />
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Interactivity\Commands\OpenLinkCommand.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Interactivity\Commands\OpenLinkCommand.cs" />
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Tools\Converter\BorderCircularClipConverter.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Tools\Converter\BorderCircularClipConverter.cs" />
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Tools\Converter\Number2PercentageConverter.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Tools\Converter\Number2PercentageConverter.cs" />
|
||||||
@@ -372,6 +373,10 @@
|
|||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Include="$(MSBuildThisFileDirectory)Themes\Styles\Base\RunningBlockBaseStyle.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
<Page Include="$(MSBuildThisFileDirectory)Themes\Styles\Base\SliderBaseStyle.xaml">
|
<Page Include="$(MSBuildThisFileDirectory)Themes\Styles\Base\SliderBaseStyle.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
@@ -728,6 +733,10 @@
|
|||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Include="$(MSBuildThisFileDirectory)Themes\Styles\RunningBlock.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
<Page Include="$(MSBuildThisFileDirectory)Themes\Styles\ScrollViewer.xaml">
|
<Page Include="$(MSBuildThisFileDirectory)Themes\Styles\ScrollViewer.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:controls="clr-namespace:HandyControl.Controls">
|
||||||
|
|
||||||
|
<Style x:Key="RunningBlockBaseStyle" TargetType="controls:RunningBlock">
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="controls:RunningBlock">
|
||||||
|
<controls:SimplePanel ClipToBounds="True">
|
||||||
|
<ContentPresenter x:Name="PART_ContentElement" RenderTransformOrigin="0.5,0.5">
|
||||||
|
<ContentPresenter.RenderTransform>
|
||||||
|
<TransformGroup>
|
||||||
|
<TranslateTransform X="0"/>
|
||||||
|
</TransformGroup>
|
||||||
|
</ContentPresenter.RenderTransform>
|
||||||
|
</ContentPresenter>
|
||||||
|
</controls:SimplePanel>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
</ResourceDictionary>
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:controls="clr-namespace:HandyControl.Controls">
|
||||||
|
|
||||||
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
<ResourceDictionary Source="Base/RunningBlockBaseStyle.xaml"/>
|
||||||
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
|
||||||
|
<Style BasedOn="{StaticResource RunningBlockBaseStyle}" TargetType="controls:RunningBlock"/>
|
||||||
|
|
||||||
|
</ResourceDictionary>
|
||||||
@@ -70,6 +70,7 @@
|
|||||||
<ResourceDictionary Source="Rectangle.xaml"/>
|
<ResourceDictionary Source="Rectangle.xaml"/>
|
||||||
<ResourceDictionary Source="Magnifier.xaml"/>
|
<ResourceDictionary Source="Magnifier.xaml"/>
|
||||||
<ResourceDictionary Source="ToggleBlock.xaml"/>
|
<ResourceDictionary Source="ToggleBlock.xaml"/>
|
||||||
|
<ResourceDictionary Source="RunningBlock.xaml"/>
|
||||||
</ResourceDictionary.MergedDictionaries>
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||