completed the branch
This commit is contained in:
1 parent
86c58476c6
commit
d25ff966c2
17 files changed
+152
-18
No files matched your search
@@ -328,6 +328,7 @@
|
||||
<Compile Include="$(MSBuildThisFileDirectory)ViewModel\Controls\PaginationDemoViewModel.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)ViewModel\Controls\SearchBarDemoViewModel.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)ViewModel\Controls\SideMenuDemoViewModel.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)ViewModel\Controls\SpriteDemoViewModel.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)ViewModel\Controls\StepBarDemoViewModel.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)ViewModel\Controls\TabControlDemoViewModel.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)ViewModel\Controls\WindowDemoViewModel.cs" />
|
||||
@@ -339,6 +340,9 @@
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Window\AboutWindow.xaml.cs">
|
||||
<DependentUpon>AboutWindow.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Main\AppSprite.xaml.cs">
|
||||
<DependentUpon>AppSprite.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Window\BlurWindow.xaml.cs">
|
||||
<DependentUpon>BlurWindow.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -787,6 +791,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="$(MSBuildThisFileDirectory)UserControl\Main\AppSprite.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="$(MSBuildThisFileDirectory)Window\BlurWindow.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
|
||||
@@ -987,6 +987,15 @@ namespace HandyControlDemo.Properties.Langs {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 打开精灵 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string OpenSprite {
|
||||
get {
|
||||
return ResourceManager.GetString("OpenSprite", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 轮廓文本 的本地化字符串。
|
||||
/// </summary>
|
||||
|
||||
@@ -648,4 +648,7 @@
|
||||
<data name="Sprite" xml:space="preserve">
|
||||
<value>Sprite</value>
|
||||
</data>
|
||||
<data name="OpenSprite" xml:space="preserve">
|
||||
<value>Open sprite</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -648,4 +648,7 @@
|
||||
<data name="Sprite" xml:space="preserve">
|
||||
<value>精灵</value>
|
||||
</data>
|
||||
<data name="OpenSprite" xml:space="preserve">
|
||||
<value>打开精灵</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -94,4 +94,8 @@
|
||||
<Setter Property="FontSize" Value="14"/>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="hc:Sprite" BasedOn="{StaticResource {x:Type hc:Sprite}}">
|
||||
<Setter Property="Padding" Value="25"/>
|
||||
</Style>
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -1,7 +1,12 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.SpriteDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:userControl="clr-namespace:HandyControlDemo.UserControl"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
DataContext="{Binding SpriteDemo,Source={StaticResource Locator}}"
|
||||
Width="300"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<userControl:UnderConstruction/>
|
||||
<hc:TransitioningContentControl>
|
||||
<Button Margin="32" Command="{Binding OpenCmd}" Content="{x:Static langs:Lang.OpenSprite}"/>
|
||||
</hc:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,9 @@
|
||||
<hc:SimplePanel x:Class="HandyControlDemo.UserControl.AppSprite"
|
||||
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">
|
||||
<Border Background="White" CornerRadius="20" Effect="{StaticResource EffectShadow4}">
|
||||
<Path Width="70" Height="70" Data="{StaticResource LogoGeometry}" Fill="#f06632"/>
|
||||
</Border>
|
||||
<Button Command="hc:ControlCommands.CloseWindow" CommandParameter="{Binding RelativeSource={RelativeSource Self}}" Visibility="{Binding IsMouseOver,RelativeSource={RelativeSource AncestorType=hc:SimplePanel},Converter={StaticResource Boolean2VisibilityConverter}}" Width="22" Height="22" Style="{StaticResource ButtonIcon}" Foreground="White" hc:IconElement.Geometry="{StaticResource ErrorGeometry}" Padding="0" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,-8,-8,0"/>
|
||||
</hc:SimplePanel>
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class AppSprite
|
||||
{
|
||||
public AppSprite()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using GalaSoft.MvvmLight;
|
||||
using HandyControl.Controls;
|
||||
using HandyControlDemo.UserControl;
|
||||
#if netle40
|
||||
using GalaSoft.MvvmLight.Command;
|
||||
#else
|
||||
using GalaSoft.MvvmLight.CommandWpf;
|
||||
# endif
|
||||
|
||||
namespace HandyControlDemo
|
||||
{
|
||||
public class SpriteDemoViewModel : ViewModelBase
|
||||
{
|
||||
public RelayCommand OpenCmd => new Lazy<RelayCommand>(() =>
|
||||
new RelayCommand(()=> Sprite.Show(new AppSprite()))).Value;
|
||||
}
|
||||
}
|
||||
@@ -39,6 +39,7 @@ namespace HandyControlDemo.ViewModel
|
||||
SimpleIoc.Default.Register<TabControlDemoViewModel>();
|
||||
SimpleIoc.Default.Register<NoUserViewModel>();
|
||||
SimpleIoc.Default.Register<CardDemoViewModel>();
|
||||
SimpleIoc.Default.Register<SpriteDemoViewModel>();
|
||||
}
|
||||
|
||||
public static ViewModelLocator Instance => new Lazy<ViewModelLocator>(() =>
|
||||
@@ -90,6 +91,8 @@ namespace HandyControlDemo.ViewModel
|
||||
|
||||
public CardDemoViewModel CardDemo => new CardDemoViewModel(ServiceLocator.Current.GetInstance<DataService>());
|
||||
|
||||
public SpriteDemoViewModel SpriteDemo => ServiceLocator.Current.GetInstance<SpriteDemoViewModel>();
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user