add GifImage
Currently, there are only a few basic features, and more features will be added in version 2.0
This commit is contained in:
1 parent
4d72778190
commit
e4dc65675a
26 files changed
+1686
-7
No files matched your search
@@ -54,6 +54,8 @@
|
||||
|
||||
public static readonly string TagDemoCtl = nameof(TagDemoCtl);
|
||||
|
||||
public static readonly string GifImageDemoCtl = nameof(GifImageDemoCtl);
|
||||
|
||||
public static readonly string ButtonDemoCtl = nameof(ButtonDemoCtl);
|
||||
|
||||
public static readonly string ToggleButtonDemoCtl = nameof(ToggleButtonDemoCtl);
|
||||
|
||||
@@ -29,7 +29,8 @@ var controlList = new List<string>
|
||||
"DateTimePickerDemoCtl",
|
||||
"CalendarWithClockDemoCtl",
|
||||
"SearchBarDemoCtl",
|
||||
"TagDemoCtl"
|
||||
"TagDemoCtl",
|
||||
"GifImageDemoCtl"
|
||||
};
|
||||
var styleList = new List<string>
|
||||
{
|
||||
|
||||
@@ -129,6 +129,9 @@
|
||||
<Compile Include="UserControl\Controls\DateTimePickerDemoCtl.xaml.cs">
|
||||
<DependentUpon>DateTimePickerDemoCtl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UserControl\Controls\GifImageDemoCtl.xaml.cs">
|
||||
<DependentUpon>GifImageDemoCtl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UserControl\Controls\GrowlDemoCtl.xaml.cs">
|
||||
<DependentUpon>GrowlDemoCtl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -383,6 +386,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="UserControl\Controls\GifImageDemoCtl.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="UserControl\Controls\GrowlDemoCtl.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
@@ -599,6 +606,8 @@
|
||||
<Generator>TextTemplatingFileGenerator</Generator>
|
||||
<LastGenOutput>MessageToken.cs</LastGenOutput>
|
||||
</Content>
|
||||
<Resource Include="Resources\Img\car_chase.gif" />
|
||||
<Resource Include="Resources\Img\LeftMainContent\Animation_16x.png" />
|
||||
<Resource Include="Resources\Img\LeftMainContent\Tag_16x.png" />
|
||||
<Resource Include="Resources\Img\LeftMainContent\Search_16x.png" />
|
||||
<Resource Include="Resources\Img\LeftMainContent\ToolBar_16x.png" />
|
||||
|
||||
+10
-1
@@ -47,7 +47,7 @@ namespace HandyControlDemo.Properties.Langs {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 重写当前线程的 CurrentUICulture 属性
|
||||
/// 使用此强类型资源类,为所有资源查找
|
||||
/// 重写当前线程的 CurrentUICulture 属性。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
@@ -384,6 +384,15 @@ namespace HandyControlDemo.Properties.Langs {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Gif图片 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string GifImage {
|
||||
get {
|
||||
return ResourceManager.GetString("GifImage", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 分组框 的本地化字符串。
|
||||
/// </summary>
|
||||
|
||||
@@ -429,4 +429,7 @@
|
||||
<data name="Tag" xml:space="preserve">
|
||||
<value>Tag</value>
|
||||
</data>
|
||||
<data name="GifImage" xml:space="preserve">
|
||||
<value>GifImage</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -409,4 +409,7 @@
|
||||
<data name="Tag" xml:space="preserve">
|
||||
<value>标签</value>
|
||||
</data>
|
||||
<data name="GifImage" xml:space="preserve">
|
||||
<value>Gif图片</value>
|
||||
</data>
|
||||
</root>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 494 B |
Binary file not shown.
|
After Width: | Height: | Size: 4.5 MiB |
@@ -0,0 +1,13 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.GifImageDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<controls:TransitioningContentControl>
|
||||
<controls:GifImage x:Name="GifImageMain" Margin="32" Width="400" Height="300">
|
||||
<controls:GifImage.Source>
|
||||
<BitmapImage UriSource="/HandyControlDemo;component/Resources/Img/car_chase.gif"/>
|
||||
</controls:GifImage.Source>
|
||||
</controls:GifImage>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class GifImageDemoCtl : IDisposable
|
||||
{
|
||||
public GifImageDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
GifImageMain.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -199,6 +199,11 @@
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Tag_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.GifImageDemoCtl}" Content="{x:Static langs:Lang.GifImage}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Animation_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.CirclePanelDemoCtl}" Content="{x:Static langs:Lang.CirclePanel}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/ColorWheel_16x.png"/>
|
||||
|
||||
@@ -38,7 +38,14 @@ namespace HandyControlDemo.ViewModel
|
||||
|
||||
public MainViewModel(DataService dataService)
|
||||
{
|
||||
Messenger.Default.Register<object>(this, MessageToken.LoadShowContent, obj => SubContent = obj);
|
||||
Messenger.Default.Register<object>(this, MessageToken.LoadShowContent, obj =>
|
||||
{
|
||||
if (SubContent is IDisposable disposable)
|
||||
{
|
||||
disposable.Dispose();
|
||||
}
|
||||
SubContent = obj;
|
||||
});
|
||||
Messenger.Default.Register<object>(this, MessageToken.ClearLeftSelected, obj =>
|
||||
{
|
||||
if (_listBoxItemCurrent == null) return;
|
||||
|
||||
Reference in new issue
Block a user