init branch

This commit is contained in:
NaBian committed 2019-10-24 21:58:34 +08:00
1 parent 1af8ac90f4
commit fa863c5bcb
24 files changed
+153 -21

No files matched your search

@@ -5,13 +5,14 @@
<UseWPF>true</UseWPF> <UseWPF>true</UseWPF>
<AssemblyName>HandyControlDemo</AssemblyName> <AssemblyName>HandyControlDemo</AssemblyName>
<RootNamespace>HandyControlDemo</RootNamespace> <RootNamespace>HandyControlDemo</RootNamespace>
<Version>2.2.0</Version> <Version>2.3.0</Version>
<ApplicationIcon>..\..\Shared\HandyControlDemo_Shared\Resources\Img\icon.ico</ApplicationIcon> <ApplicationIcon>..\..\Shared\HandyControlDemo_Shared\Resources\Img\icon.ico</ApplicationIcon>
<Configurations>Debug;Release</Configurations> <Configurations>Debug;Release</Configurations>
<Copyright>Copyright © HandyOrg 2018-2019</Copyright> <Copyright>Copyright © HandyOrg 2018-2019</Copyright>
<FileVersion>2.2.0.0</FileVersion> <FileVersion>2.3.0.0</FileVersion>
<AssemblyVersion>2.2.0.0</AssemblyVersion> <AssemblyVersion>2.3.0.0</AssemblyVersion>
<LangVersion>8.0</LangVersion> <LangVersion>8.0</LangVersion>
<Authors>HandyOrg</Authors>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DefineConstants>TRACE;Core</DefineConstants> <DefineConstants>TRACE;Core</DefineConstants>
@@ -426,6 +427,9 @@
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\DataGenerator_16x.png"> <Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\DataGenerator_16x.png">
<Link>Resources\Img\LeftMainContent\DataGenerator_16x.png</Link> <Link>Resources\Img\LeftMainContent\DataGenerator_16x.png</Link>
</Resource> </Resource>
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\DottedSplitter_16x.png">
<Link>Resources\Img\LeftMainContent\DottedSplitter_16x.png</Link>
</Resource>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<EmbeddedResource Include="..\..\Shared\HandyControlDemo_Shared\Properties\Langs\Lang.en.resx"> <EmbeddedResource Include="..\..\Shared\HandyControlDemo_Shared\Properties\Langs\Lang.en.resx">
@@ -4,14 +4,15 @@
<UseWPF>true</UseWPF> <UseWPF>true</UseWPF>
<AssemblyName>HandyControl</AssemblyName> <AssemblyName>HandyControl</AssemblyName>
<RootNamespace>HandyControl</RootNamespace> <RootNamespace>HandyControl</RootNamespace>
<Version>2.2.0</Version> <Version>2.3.0</Version>
<AssemblyVersion>2.2.0.0</AssemblyVersion> <AssemblyVersion>2.3.0.0</AssemblyVersion>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild> <GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance> <PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<Copyright>Copyright © HandyOrg 2018-2019</Copyright> <Copyright>Copyright © HandyOrg 2018-2019</Copyright>
<Description>Contains some commonly used simple WPF controls</Description> <Description>Contains some commonly used simple WPF controls</Description>
<Configurations>Debug;Release</Configurations> <Configurations>Debug;Release</Configurations>
<LangVersion>8.0</LangVersion> <LangVersion>8.0</LangVersion>
<Authors>HandyOrg</Authors>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DefineConstants>TRACE;Core</DefineConstants> <DefineConstants>TRACE;Core</DefineConstants>
@@ -427,6 +427,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\DottedSplitter_16x.png">
<Link>Resources\Img\LeftMainContent\DottedSplitter_16x.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\qq_group_1.jpg"> <Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\qq_group_1.jpg">
<Link>Resources\Img\qq_group_1.jpg</Link> <Link>Resources\Img\qq_group_1.jpg</Link>
</Resource> </Resource>
@@ -496,6 +496,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\DottedSplitter_16x.png">
<Link>Resources\Img\LeftMainContent\DottedSplitter_16x.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\qq_group_1.jpg"> <Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\qq_group_1.jpg">
<Link>Resources\Img\qq_group_1.jpg</Link> <Link>Resources\Img\qq_group_1.jpg</Link>
</Resource> </Resource>
@@ -120,6 +120,8 @@
public static readonly string SplitButtonDemoCtl = nameof(SplitButtonDemoCtl); public static readonly string SplitButtonDemoCtl = nameof(SplitButtonDemoCtl);
public static readonly string DividerDemoCtl = nameof(DividerDemoCtl);
/*-------------------- Tools --------------------*/ /*-------------------- Tools --------------------*/
public static readonly string HatchBrushGeneratorDemoCtl = nameof(HatchBrushGeneratorDemoCtl); public static readonly string HatchBrushGeneratorDemoCtl = nameof(HatchBrushGeneratorDemoCtl);
@@ -61,7 +61,8 @@ var controlList = new List<string>
"SpriteDemoCtl", "SpriteDemoCtl",
"NotificationDemoCtl", "NotificationDemoCtl",
"FloatingBlockDemoCtl", "FloatingBlockDemoCtl",
"SplitButtonDemoCtl" "SplitButtonDemoCtl",
"DividerDemoCtl"
}; };
var styleList = new List<string> var styleList = new List<string>
{ {
@@ -55,6 +55,9 @@
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Controls\CardDemoCtl.xaml.cs"> <Compile Include="$(MSBuildThisFileDirectory)UserControl\Controls\CardDemoCtl.xaml.cs">
<DependentUpon>CardDemoCtl.xaml</DependentUpon> <DependentUpon>CardDemoCtl.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Controls\DividerDemoCtl.xaml.cs">
<DependentUpon>DividerDemoCtl.xaml</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Controls\FloatingBlockDemoCtl.xaml.cs"> <Compile Include="$(MSBuildThisFileDirectory)UserControl\Controls\FloatingBlockDemoCtl.xaml.cs">
<DependentUpon>FloatingBlockDemoCtl.xaml</DependentUpon> <DependentUpon>FloatingBlockDemoCtl.xaml</DependentUpon>
</Compile> </Compile>
@@ -460,6 +463,10 @@
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</Page> </Page>
<Page Include="$(MSBuildThisFileDirectory)UserControl\Controls\DividerDemoCtl.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="$(MSBuildThisFileDirectory)UserControl\Controls\FloatingBlockDemoCtl.xaml"> <Page Include="$(MSBuildThisFileDirectory)UserControl\Controls\FloatingBlockDemoCtl.xaml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
@@ -26,16 +26,18 @@
<hc:Window.NonClientAreaContent> <hc:Window.NonClientAreaContent>
<userControl:NoUserContent/> <userControl:NoUserContent/>
</hc:Window.NonClientAreaContent> </hc:Window.NonClientAreaContent>
<Grid> <Border BorderThickness="0,1,0,0" BorderBrush="{DynamicResource BorderBrush}">
<Grid.ColumnDefinitions> <Grid>
<ColumnDefinition Width="200" MinWidth="200" MaxWidth="400"/> <Grid.ColumnDefinitions>
<ColumnDefinition MinWidth="200"/> <ColumnDefinition Width="200" MinWidth="200" MaxWidth="400"/>
</Grid.ColumnDefinitions> <ColumnDefinition MinWidth="200"/>
<userControl:LeftMainContent/> </Grid.ColumnDefinitions>
<userControl:MainContent Grid.Column="1"/> <userControl:LeftMainContent/>
<GridSplitter Grid.Column="1" HorizontalAlignment="Left" Width="4" Background="Transparent" BorderThickness="1,0,0,0" BorderBrush="{DynamicResource BorderBrush}"/> <userControl:MainContent Grid.Column="1"/>
<hc:ScrollViewer Grid.Column="1" VerticalScrollBarVisibility="Hidden" HorizontalAlignment="Right" IsEnableInertia="True" IsPenetrating="True"> <GridSplitter Grid.Column="1" HorizontalAlignment="Left" Width="4" Background="Transparent" BorderThickness="1,0,0,0" BorderBrush="{DynamicResource BorderBrush}"/>
<StackPanel hc:Growl.GrowlParent="True" VerticalAlignment="Top" Margin="0,10,10,10"/> <hc:ScrollViewer Grid.Column="1" VerticalScrollBarVisibility="Hidden" HorizontalAlignment="Right" IsEnableInertia="True" IsPenetrating="True">
</hc:ScrollViewer> <StackPanel hc:Growl.GrowlParent="True" VerticalAlignment="Top" Margin="0,10,10,10"/>
</Grid> </hc:ScrollViewer>
</Grid>
</Border>
</hc:BlurWindow> </hc:BlurWindow>
@@ -13,5 +13,5 @@ using System.Windows;
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]
[assembly: ComVisible(false)] [assembly: ComVisible(false)]
[assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)] [assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)]
[assembly: AssemblyVersion("2.2.0")] [assembly: AssemblyVersion("2.3.0")]
#endif #endif
@@ -492,6 +492,15 @@ namespace HandyControlDemo.Properties.Langs {
} }
} }
/// <summary>
/// 查找类似 分割线 的本地化字符串。
/// </summary>
public static string Divider {
get {
return ResourceManager.GetString("Divider", resourceCulture);
}
}
/// <summary> /// <summary>
/// 查找类似 在这里拖拽 的本地化字符串。 /// 查找类似 在这里拖拽 的本地化字符串。
/// </summary> /// </summary>
@@ -675,4 +675,7 @@
<data name="Morphing Animation" xml:space="preserve"> <data name="Morphing Animation" xml:space="preserve">
<value>Morphing Animation</value> <value>Morphing Animation</value>
</data> </data>
<data name="Divider" xml:space="preserve">
<value>Divider</value>
</data>
</root> </root>
@@ -675,4 +675,7 @@
<data name="Morphing Animation" xml:space="preserve"> <data name="Morphing Animation" xml:space="preserve">
<value>Morphing Animation</value> <value>Morphing Animation</value>
</data> </data>
<data name="Divider" xml:space="preserve">
<value>Divider</value>
</data>
</root> </root>
@@ -675,4 +675,7 @@
<data name="Morphing Animation" xml:space="preserve"> <data name="Morphing Animation" xml:space="preserve">
<value>Morphing Animation</value> <value>Morphing Animation</value>
</data> </data>
<data name="Divider" xml:space="preserve">
<value>Divider</value>
</data>
</root> </root>
@@ -675,4 +675,7 @@
<data name="Morphing Animation" xml:space="preserve"> <data name="Morphing Animation" xml:space="preserve">
<value>变形动画</value> <value>变形动画</value>
</data> </data>
<data name="Divider" xml:space="preserve">
<value>分割线</value>
</data>
</root> </root>
Binary file not shown.

After

Width:  |  Height:  |  Size: 125 B

@@ -0,0 +1,8 @@
<UserControl x:Class="HandyControlDemo.UserControl.DividerDemoCtl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Background="{DynamicResource RegionBrush}">
<Grid>
</Grid>
</UserControl>
@@ -0,0 +1,10 @@
namespace HandyControlDemo.UserControl
{
public partial class DividerDemoCtl
{
public DividerDemoCtl()
{
InitializeComponent();
}
}
}
@@ -345,6 +345,11 @@
<Image Source="../../Resources/Img/LeftMainContent/VSO_Card_16x.png"/> <Image Source="../../Resources/Img/LeftMainContent/VSO_Card_16x.png"/>
</hc:EdgeElement.LeftContent> </hc:EdgeElement.LeftContent>
</ListBoxItem> </ListBoxItem>
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.DividerDemoCtl}" Content="{x:Static langs:Lang.Divider}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/DottedSplitter_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.CirclePanelDemoCtl}" Content="{x:Static langs:Lang.CirclePanel}"> <ListBoxItem Tag="{x:Static data:MessageToken.CirclePanelDemoCtl}" Content="{x:Static langs:Lang.CirclePanel}">
<hc:EdgeElement.LeftContent> <hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/ColorWheel_16x.png"/> <Image Source="../../Resources/Img/LeftMainContent/ColorWheel_16x.png"/>
@@ -455,7 +460,7 @@
<Image Source="../../Resources/Img/LeftMainContent/ScrollBox_16x.png"/> <Image Source="../../Resources/Img/LeftMainContent/ScrollBox_16x.png"/>
</hc:EdgeElement.LeftContent> </hc:EdgeElement.LeftContent>
</ListBoxItem> </ListBoxItem>
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.SpriteDemoCtl}" Content="{x:Static langs:Lang.Sprite}"> <ListBoxItem Tag="{x:Static data:MessageToken.SpriteDemoCtl}" Content="{x:Static langs:Lang.Sprite}">
<hc:EdgeElement.LeftContent> <hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/HandyControl.png"/> <Image Source="../../Resources/Img/LeftMainContent/HandyControl.png"/>
</hc:EdgeElement.LeftContent> </hc:EdgeElement.LeftContent>
@@ -0,0 +1,36 @@
using System.Windows;
using System.Windows.Controls;
using HandyControl.Data;
namespace HandyControl.Controls
{
public class Divider : Control
{
public static readonly DependencyProperty ContentProperty = DependencyProperty.Register(
"Content", typeof(object), typeof(Divider), new PropertyMetadata(default(object)));
public object Content
{
get => (object) GetValue(ContentProperty);
set => SetValue(ContentProperty, value);
}
public static readonly DependencyProperty DashedProperty = DependencyProperty.Register(
"Dashed", typeof(bool), typeof(Divider), new PropertyMetadata(ValueBoxes.FalseBox));
public bool Dashed
{
get => (bool) GetValue(DashedProperty);
set => SetValue(DashedProperty, value);
}
public static readonly DependencyProperty OrientationProperty = DependencyProperty.Register(
"Orientation", typeof(Orientation), typeof(Divider), new PropertyMetadata(default(Orientation)));
public Orientation Orientation
{
get => (Orientation) GetValue(OrientationProperty);
set => SetValue(OrientationProperty, value);
}
}
}
@@ -24,6 +24,7 @@
<Compile Include="$(MSBuildThisFileDirectory)Controls\Button\SplitButton.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Controls\Button\SplitButton.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Controls\Growl\GrowlWindow.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Controls\Growl\GrowlWindow.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Controls\Image\ImageBlock.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Controls\Image\ImageBlock.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Controls\Other\Divider.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Controls\Other\Magnifier.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Controls\Other\Magnifier.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Controls\Other\ButtonGroup.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Controls\Other\ButtonGroup.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Controls\Other\Card.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Controls\Other\Card.cs" />
@@ -381,6 +382,10 @@
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</Page> </Page>
<Page Include="$(MSBuildThisFileDirectory)Themes\Styles\Base\DividerBaseStyle.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="$(MSBuildThisFileDirectory)Themes\Styles\Base\CardBaseStyle.xaml"> <Page Include="$(MSBuildThisFileDirectory)Themes\Styles\Base\CardBaseStyle.xaml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
@@ -425,6 +430,10 @@
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</Page> </Page>
<Page Include="$(MSBuildThisFileDirectory)Themes\Styles\Divider.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="$(MSBuildThisFileDirectory)Themes\Styles\FloatingBlock.xaml"> <Page Include="$(MSBuildThisFileDirectory)Themes\Styles\FloatingBlock.xaml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
@@ -12,7 +12,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyTrademark("")] [assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]
[assembly: ComVisible(false)] [assembly: ComVisible(false)]
[assembly: AssemblyVersion("2.2.0")] [assembly: AssemblyVersion("2.3.0")]
#endif #endif
[assembly: XmlnsDefinition("https://handyorg.github.io/handycontrol", "HandyControl.Controls")] [assembly: XmlnsDefinition("https://handyorg.github.io/handycontrol", "HandyControl.Controls")]
@@ -0,0 +1,9 @@
<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="DividerBaseStyle" TargetType="controls:Divider">
<Setter Property="Focusable" Value="False"/>
</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/DividerBaseStyle.xaml"/>
</ResourceDictionary.MergedDictionaries>
<Style BasedOn="{StaticResource DividerBaseStyle}" TargetType="controls:Divider"/>
</ResourceDictionary>
@@ -75,6 +75,7 @@
<ResourceDictionary Source="Notification.xaml"/> <ResourceDictionary Source="Notification.xaml"/>
<ResourceDictionary Source="FloatingBlock.xaml"/> <ResourceDictionary Source="FloatingBlock.xaml"/>
<ResourceDictionary Source="SplitButton.xaml"/> <ResourceDictionary Source="SplitButton.xaml"/>
<ResourceDictionary Source="Divider.xaml"/>
</ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries>
</ResourceDictionary> </ResourceDictionary>