init branch

This commit is contained in:
NaBian committed 2019-07-16 00:22:12 +08:00
1 parent 4f9cc3a472
commit 69eee87e5e
16 files changed
+113 -2

No files matched your search

@@ -359,6 +359,12 @@
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\VSO_Card_16x.png"> <Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\VSO_Card_16x.png">
<Link>Resources\Img\LeftMainContent\VSO_Card_16x.png</Link> <Link>Resources\Img\LeftMainContent\VSO_Card_16x.png</Link>
</Resource> </Resource>
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\ImageStack_16x.png">
<Link>Resources\Img\LeftMainContent\ImageStack_16x.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\Dance.png">
<Link>Resources\Img\Dance.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">
@@ -396,6 +396,12 @@
<Generator>TextTemplatingFileGenerator</Generator> <Generator>TextTemplatingFileGenerator</Generator>
<LastGenOutput>MessageToken.cs</LastGenOutput> <LastGenOutput>MessageToken.cs</LastGenOutput>
</Content> </Content>
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\Dance.png">
<Link>Resources\Img\Dance.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\ImageStack_16x.png">
<Link>Resources\Img\LeftMainContent\ImageStack_16x.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\VSO_Card_16x.png"> <Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\VSO_Card_16x.png">
<Link>Resources\Img\LeftMainContent\VSO_Card_16x.png</Link> <Link>Resources\Img\LeftMainContent\VSO_Card_16x.png</Link>
</Resource> </Resource>
@@ -458,6 +458,12 @@
<Generator>TextTemplatingFileGenerator</Generator> <Generator>TextTemplatingFileGenerator</Generator>
<LastGenOutput>MessageToken.cs</LastGenOutput> <LastGenOutput>MessageToken.cs</LastGenOutput>
</Content> </Content>
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\Dance.png">
<Link>Resources\Img\Dance.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\ImageStack_16x.png">
<Link>Resources\Img\LeftMainContent\ImageStack_16x.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\VSO_Card_16x.png"> <Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\VSO_Card_16x.png">
<Link>Resources\Img\LeftMainContent\VSO_Card_16x.png</Link> <Link>Resources\Img\LeftMainContent\VSO_Card_16x.png</Link>
</Resource> </Resource>
@@ -104,6 +104,8 @@
public static readonly string MagnifierDemoCtl = nameof(MagnifierDemoCtl); public static readonly string MagnifierDemoCtl = nameof(MagnifierDemoCtl);
public static readonly string ImageBlockDemoCtl = nameof(ImageBlockDemoCtl);
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);
@@ -54,7 +54,8 @@ var controlList = new List<string>
"RangeSliderDemoCtl", "RangeSliderDemoCtl",
"ButtonGroupDemoCtl", "ButtonGroupDemoCtl",
"CardDemoCtl", "CardDemoCtl",
"MagnifierDemoCtl" "MagnifierDemoCtl",
"ImageBlockDemoCtl"
}; };
var styleList = new List<string> var styleList = new List<string>
{ {
@@ -54,6 +54,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\ImageBlockDemoCtl.xaml.cs">
<DependentUpon>ImageBlockDemoCtl.xaml</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Controls\MagnifierDemoCtl.xaml.cs"> <Compile Include="$(MSBuildThisFileDirectory)UserControl\Controls\MagnifierDemoCtl.xaml.cs">
<DependentUpon>MagnifierDemoCtl.xaml</DependentUpon> <DependentUpon>MagnifierDemoCtl.xaml</DependentUpon>
</Compile> </Compile>
@@ -423,6 +426,10 @@
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</Page> </Page>
<Page Include="$(MSBuildThisFileDirectory)UserControl\Controls\ImageBlockDemoCtl.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="$(MSBuildThisFileDirectory)UserControl\Controls\MagnifierDemoCtl.xaml"> <Page Include="$(MSBuildThisFileDirectory)UserControl\Controls\MagnifierDemoCtl.xaml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
@@ -690,6 +690,15 @@ namespace HandyControlDemo.Properties.Langs {
} }
} }
/// <summary>
/// 查找类似 图片块 的本地化字符串。
/// </summary>
public static string ImageBlock {
get {
return ResourceManager.GetString("ImageBlock", resourceCulture);
}
}
/// <summary> /// <summary>
/// 查找类似 图片浏览器 的本地化字符串。 /// 查找类似 图片浏览器 的本地化字符串。
/// </summary> /// </summary>
@@ -630,4 +630,7 @@
<data name="Magnifier" xml:space="preserve"> <data name="Magnifier" xml:space="preserve">
<value>Magnifier</value> <value>Magnifier</value>
</data> </data>
<data name="ImageBlock" xml:space="preserve">
<value>ImageBlock</value>
</data>
</root> </root>
@@ -630,4 +630,7 @@
<data name="Magnifier" xml:space="preserve"> <data name="Magnifier" xml:space="preserve">
<value>放大镜</value> <value>放大镜</value>
</data> </data>
<data name="ImageBlock" xml:space="preserve">
<value>图片块</value>
</data>
</root> </root>
Binary file not shown.

After

Width:  |  Height:  |  Size: 617 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 336 B

@@ -0,0 +1,6 @@
<UserControl x:Class="HandyControlDemo.UserControl.ImageBlockDemoCtl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:userControl="clr-namespace:HandyControlDemo.UserControl">
<userControl:UnderConstruction/>
</UserControl>
@@ -0,0 +1,10 @@
namespace HandyControlDemo.UserControl
{
public partial class ImageBlockDemoCtl
{
public ImageBlockDemoCtl()
{
InitializeComponent();
}
}
}
@@ -195,6 +195,11 @@
</hc:StatusSwitchElement.CheckedElement> </hc:StatusSwitchElement.CheckedElement>
</ToggleButton> </ToggleButton>
<ListBox Name="ListBoxControl" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1" BorderThickness="0" SelectionMode="Single" Style="{StaticResource ListBoxTransparent}"> <ListBox Name="ListBoxControl" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1" BorderThickness="0" SelectionMode="Single" Style="{StaticResource ListBoxTransparent}">
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.ImageBlockDemoCtl}" Content="{x:Static langs:Lang.ImageBlock}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/ImageStack_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.MagnifierDemoCtl}" Content="{x:Static langs:Lang.Magnifier}"> <ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.MagnifierDemoCtl}" Content="{x:Static langs:Lang.Magnifier}">
<hc:EdgeElement.LeftContent> <hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/Search_16x.png"/> <Image Source="../../Resources/Img/LeftMainContent/Search_16x.png"/>
@@ -330,7 +335,7 @@
<Image Source="../../Resources/Img/LeftMainContent/ColorWheel_16x.png"/> <Image Source="../../Resources/Img/LeftMainContent/ColorWheel_16x.png"/>
</hc:EdgeElement.LeftContent> </hc:EdgeElement.LeftContent>
</ListBoxItem> </ListBoxItem>
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.GridDemoCtl}" Content="{x:Static langs:Lang.Grid}"> <ListBoxItem Tag="{x:Static data:MessageToken.GridDemoCtl}" Content="{x:Static langs:Lang.Grid}">
<hc:EdgeElement.LeftContent> <hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/GridPane_16x.png"/> <Image Source="../../Resources/Img/LeftMainContent/GridPane_16x.png"/>
</hc:EdgeElement.LeftContent> </hc:EdgeElement.LeftContent>
@@ -0,0 +1,46 @@
using System.Windows;
using System.Windows.Media;
using HandyControl.Data;
namespace HandyControl.Controls
{
public class ImageBlock : FrameworkElement
{
public static readonly DependencyProperty SourceProperty = DependencyProperty.Register(
"Source", typeof(ImageSource), typeof(ImageBlock), new FrameworkPropertyMetadata(default(ImageSource),
FrameworkPropertyMetadataOptions.AffectsMeasure | FrameworkPropertyMetadataOptions.AffectsRender));
public ImageSource Source
{
get => (ImageSource) GetValue(SourceProperty);
set => SetValue(SourceProperty, value);
}
public static readonly DependencyProperty ColumnsProperty = DependencyProperty.Register(
"Columns", typeof(int), typeof(ImageBlock), new FrameworkPropertyMetadata(ValueBoxes.Int1Box,
FrameworkPropertyMetadataOptions.AffectsMeasure | FrameworkPropertyMetadataOptions.AffectsRender));
public int Columns
{
get => (int) GetValue(ColumnsProperty);
set => SetValue(ColumnsProperty, value);
}
public static readonly DependencyProperty RowsProperty = DependencyProperty.Register(
"Rows", typeof(int), typeof(ImageBlock), new FrameworkPropertyMetadata(ValueBoxes.Int1Box,
FrameworkPropertyMetadataOptions.AffectsMeasure | FrameworkPropertyMetadataOptions.AffectsRender));
public int Rows
{
get => (int) GetValue(RowsProperty);
set => SetValue(RowsProperty, value);
}
protected override void OnRender(DrawingContext dc)
{
var imageSource = Source;
if (imageSource != null) dc.DrawImage(imageSource, new Rect(new Point(), RenderSize));
}
}
}
@@ -19,6 +19,7 @@
<Compile Include="$(MSBuildThisFileDirectory)Controls\Attach\PanelElement.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Controls\Attach\PanelElement.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Controls\Attach\PasswordBoxAttach.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Controls\Attach\PasswordBoxAttach.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Controls\Attach\RectangleAttach.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Controls\Attach\RectangleAttach.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Controls\Image\ImageBlock.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" />