mirror of
https://gitee.com/handyorg/HandyControl.git
synced 2024-11-29 18:38:30 +08:00
environmental adaptation
This commit is contained in:
parent
4b7124d5c8
commit
e6870af941
@ -23,54 +23,97 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HandyControlDemo_Net_40", "
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HandyControlDemo_Code", "Shared\HandyControlDemo_Code\HandyControlDemo_Code.csproj", "{D8A4748C-0500-4F63-BC47-3506658C68F7}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HandyControlDemo_Code", "Shared\HandyControlDemo_Code\HandyControlDemo_Code.csproj", "{D8A4748C-0500-4F63-BC47-3506658C68F7}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Net_35", "Net_35", "{2BA46994-CD4E-4C49-8A8A-982EFB39CE78}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HandyControl_Net_35", "Net_35\HandyControl_Net_35\HandyControl_Net_35.csproj", "{51C0089A-2A3C-4CB1-BEC1-BC4634F2E66B}"
|
||||||
|
EndProject
|
||||||
|
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Microsoft.Windows.Shell", "Shared\Microsoft.Windows.Shell\Microsoft.Windows.Shell.shproj", "{EFCBB492-4AD7-4CB6-9556-52C327EF2A19}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HandyControlDemo_Net_35", "Net_35\HandyControlDemo_Net_35\HandyControlDemo_Net_35.csproj", "{709E332D-635E-44B1-B6D1-1F49468F48CF}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SharedMSBuildProjectFiles) = preSolution
|
GlobalSection(SharedMSBuildProjectFiles) = preSolution
|
||||||
Shared\HandyControl_Shared\HandyControl_Shared.projitems*{32204503-2ef0-4681-ae13-aa1feb6c658a}*SharedItemsImports = 5
|
Shared\HandyControl_Shared\HandyControl_Shared.projitems*{32204503-2ef0-4681-ae13-aa1feb6c658a}*SharedItemsImports = 5
|
||||||
|
Shared\Microsoft.Windows.Shell\Microsoft.Windows.Shell.projitems*{32204503-2ef0-4681-ae13-aa1feb6c658a}*SharedItemsImports = 5
|
||||||
|
Shared\HandyControl_Shared\HandyControl_Shared.projitems*{51c0089a-2a3c-4cb1-bec1-bc4634f2e66b}*SharedItemsImports = 5
|
||||||
|
Shared\Microsoft.Windows.Shell\Microsoft.Windows.Shell.projitems*{51c0089a-2a3c-4cb1-bec1-bc4634f2e66b}*SharedItemsImports = 5
|
||||||
|
Shared\HandyControlDemo_Shared\HandyControlDemo_Shared.projitems*{709e332d-635e-44b1-b6d1-1f49468f48cf}*SharedItemsImports = 5
|
||||||
Shared\HandyControlDemo_Shared\HandyControlDemo_Shared.projitems*{9a7b52e6-94bb-4e7e-bb6a-7cf6761b79a7}*SharedItemsImports = 5
|
Shared\HandyControlDemo_Shared\HandyControlDemo_Shared.projitems*{9a7b52e6-94bb-4e7e-bb6a-7cf6761b79a7}*SharedItemsImports = 5
|
||||||
Shared\HandyControl_Shared\HandyControl_Shared.projitems*{aac11083-faca-405d-9197-5c1212d65656}*SharedItemsImports = 13
|
Shared\HandyControl_Shared\HandyControl_Shared.projitems*{aac11083-faca-405d-9197-5c1212d65656}*SharedItemsImports = 13
|
||||||
Shared\HandyControlDemo_Shared\HandyControlDemo_Shared.projitems*{c4694269-c9b8-45d5-87f8-d0088c532510}*SharedItemsImports = 13
|
Shared\HandyControlDemo_Shared\HandyControlDemo_Shared.projitems*{c4694269-c9b8-45d5-87f8-d0088c532510}*SharedItemsImports = 13
|
||||||
Shared\HandyControlDemo_Shared\HandyControlDemo_Shared.projitems*{d8ae88f8-c36b-4d10-a7f9-22ffcfba5231}*SharedItemsImports = 5
|
Shared\HandyControlDemo_Shared\HandyControlDemo_Shared.projitems*{d8ae88f8-c36b-4d10-a7f9-22ffcfba5231}*SharedItemsImports = 5
|
||||||
Shared\HandyControl_Shared\HandyControl_Shared.projitems*{dc966e3d-bcff-4652-98cf-070e5494749a}*SharedItemsImports = 5
|
Shared\HandyControl_Shared\HandyControl_Shared.projitems*{dc966e3d-bcff-4652-98cf-070e5494749a}*SharedItemsImports = 5
|
||||||
|
Shared\Microsoft.Windows.Shell\Microsoft.Windows.Shell.projitems*{efcbb492-4ad7-4cb6-9556-52c327ef2a19}*SharedItemsImports = 13
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Debug-Net35|Any CPU = Debug-Net35|Any CPU
|
||||||
Debug-Net40|Any CPU = Debug-Net40|Any CPU
|
Debug-Net40|Any CPU = Debug-Net40|Any CPU
|
||||||
Release|Any CPU = Release|Any CPU
|
Release|Any CPU = Release|Any CPU
|
||||||
|
Release-Net35|Any CPU = Release-Net35|Any CPU
|
||||||
Release-Net40|Any CPU = Release-Net40|Any CPU
|
Release-Net40|Any CPU = Release-Net40|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
{DC966E3D-BCFF-4652-98CF-070E5494749A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{DC966E3D-BCFF-4652-98CF-070E5494749A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{DC966E3D-BCFF-4652-98CF-070E5494749A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{DC966E3D-BCFF-4652-98CF-070E5494749A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{DC966E3D-BCFF-4652-98CF-070E5494749A}.Debug-Net35|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{DC966E3D-BCFF-4652-98CF-070E5494749A}.Debug-Net40|Any CPU.ActiveCfg = Debug|Any CPU
|
{DC966E3D-BCFF-4652-98CF-070E5494749A}.Debug-Net40|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{DC966E3D-BCFF-4652-98CF-070E5494749A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{DC966E3D-BCFF-4652-98CF-070E5494749A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{DC966E3D-BCFF-4652-98CF-070E5494749A}.Release|Any CPU.Build.0 = Release|Any CPU
|
{DC966E3D-BCFF-4652-98CF-070E5494749A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{DC966E3D-BCFF-4652-98CF-070E5494749A}.Release-Net35|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{DC966E3D-BCFF-4652-98CF-070E5494749A}.Release-Net40|Any CPU.ActiveCfg = Release|Any CPU
|
{DC966E3D-BCFF-4652-98CF-070E5494749A}.Release-Net40|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{9A7B52E6-94BB-4E7E-BB6A-7CF6761B79A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{9A7B52E6-94BB-4E7E-BB6A-7CF6761B79A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{9A7B52E6-94BB-4E7E-BB6A-7CF6761B79A7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{9A7B52E6-94BB-4E7E-BB6A-7CF6761B79A7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{9A7B52E6-94BB-4E7E-BB6A-7CF6761B79A7}.Debug-Net35|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{9A7B52E6-94BB-4E7E-BB6A-7CF6761B79A7}.Debug-Net40|Any CPU.ActiveCfg = Debug|Any CPU
|
{9A7B52E6-94BB-4E7E-BB6A-7CF6761B79A7}.Debug-Net40|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{9A7B52E6-94BB-4E7E-BB6A-7CF6761B79A7}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{9A7B52E6-94BB-4E7E-BB6A-7CF6761B79A7}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{9A7B52E6-94BB-4E7E-BB6A-7CF6761B79A7}.Release|Any CPU.Build.0 = Release|Any CPU
|
{9A7B52E6-94BB-4E7E-BB6A-7CF6761B79A7}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{9A7B52E6-94BB-4E7E-BB6A-7CF6761B79A7}.Release-Net35|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{9A7B52E6-94BB-4E7E-BB6A-7CF6761B79A7}.Release-Net40|Any CPU.ActiveCfg = Release|Any CPU
|
{9A7B52E6-94BB-4E7E-BB6A-7CF6761B79A7}.Release-Net40|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{32204503-2EF0-4681-AE13-AA1FEB6C658A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{32204503-2EF0-4681-AE13-AA1FEB6C658A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{32204503-2EF0-4681-AE13-AA1FEB6C658A}.Debug-Net35|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{32204503-2EF0-4681-AE13-AA1FEB6C658A}.Debug-Net40|Any CPU.ActiveCfg = Debug|Any CPU
|
{32204503-2EF0-4681-AE13-AA1FEB6C658A}.Debug-Net40|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{32204503-2EF0-4681-AE13-AA1FEB6C658A}.Debug-Net40|Any CPU.Build.0 = Debug|Any CPU
|
{32204503-2EF0-4681-AE13-AA1FEB6C658A}.Debug-Net40|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{32204503-2EF0-4681-AE13-AA1FEB6C658A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{32204503-2EF0-4681-AE13-AA1FEB6C658A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{32204503-2EF0-4681-AE13-AA1FEB6C658A}.Release-Net35|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{32204503-2EF0-4681-AE13-AA1FEB6C658A}.Release-Net40|Any CPU.ActiveCfg = Release|Any CPU
|
{32204503-2EF0-4681-AE13-AA1FEB6C658A}.Release-Net40|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{32204503-2EF0-4681-AE13-AA1FEB6C658A}.Release-Net40|Any CPU.Build.0 = Release|Any CPU
|
{32204503-2EF0-4681-AE13-AA1FEB6C658A}.Release-Net40|Any CPU.Build.0 = Release|Any CPU
|
||||||
{D8AE88F8-C36B-4D10-A7F9-22FFCFBA5231}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{D8AE88F8-C36B-4D10-A7F9-22FFCFBA5231}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{D8AE88F8-C36B-4D10-A7F9-22FFCFBA5231}.Debug-Net35|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{D8AE88F8-C36B-4D10-A7F9-22FFCFBA5231}.Debug-Net40|Any CPU.ActiveCfg = Debug|Any CPU
|
{D8AE88F8-C36B-4D10-A7F9-22FFCFBA5231}.Debug-Net40|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{D8AE88F8-C36B-4D10-A7F9-22FFCFBA5231}.Debug-Net40|Any CPU.Build.0 = Debug|Any CPU
|
{D8AE88F8-C36B-4D10-A7F9-22FFCFBA5231}.Debug-Net40|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{D8AE88F8-C36B-4D10-A7F9-22FFCFBA5231}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{D8AE88F8-C36B-4D10-A7F9-22FFCFBA5231}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{D8AE88F8-C36B-4D10-A7F9-22FFCFBA5231}.Release-Net35|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{D8AE88F8-C36B-4D10-A7F9-22FFCFBA5231}.Release-Net40|Any CPU.ActiveCfg = Release|Any CPU
|
{D8AE88F8-C36B-4D10-A7F9-22FFCFBA5231}.Release-Net40|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{D8AE88F8-C36B-4D10-A7F9-22FFCFBA5231}.Release-Net40|Any CPU.Build.0 = Release|Any CPU
|
{D8AE88F8-C36B-4D10-A7F9-22FFCFBA5231}.Release-Net40|Any CPU.Build.0 = Release|Any CPU
|
||||||
{D8A4748C-0500-4F63-BC47-3506658C68F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{D8A4748C-0500-4F63-BC47-3506658C68F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{D8A4748C-0500-4F63-BC47-3506658C68F7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{D8A4748C-0500-4F63-BC47-3506658C68F7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{D8A4748C-0500-4F63-BC47-3506658C68F7}.Debug-Net35|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{D8A4748C-0500-4F63-BC47-3506658C68F7}.Debug-Net35|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{D8A4748C-0500-4F63-BC47-3506658C68F7}.Debug-Net40|Any CPU.ActiveCfg = Debug|Any CPU
|
{D8A4748C-0500-4F63-BC47-3506658C68F7}.Debug-Net40|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{D8A4748C-0500-4F63-BC47-3506658C68F7}.Debug-Net40|Any CPU.Build.0 = Debug|Any CPU
|
{D8A4748C-0500-4F63-BC47-3506658C68F7}.Debug-Net40|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{D8A4748C-0500-4F63-BC47-3506658C68F7}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{D8A4748C-0500-4F63-BC47-3506658C68F7}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{D8A4748C-0500-4F63-BC47-3506658C68F7}.Release|Any CPU.Build.0 = Release|Any CPU
|
{D8A4748C-0500-4F63-BC47-3506658C68F7}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{D8A4748C-0500-4F63-BC47-3506658C68F7}.Release-Net35|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{D8A4748C-0500-4F63-BC47-3506658C68F7}.Release-Net35|Any CPU.Build.0 = Release|Any CPU
|
||||||
{D8A4748C-0500-4F63-BC47-3506658C68F7}.Release-Net40|Any CPU.ActiveCfg = Release|Any CPU
|
{D8A4748C-0500-4F63-BC47-3506658C68F7}.Release-Net40|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{D8A4748C-0500-4F63-BC47-3506658C68F7}.Release-Net40|Any CPU.Build.0 = Release|Any CPU
|
{D8A4748C-0500-4F63-BC47-3506658C68F7}.Release-Net40|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{51C0089A-2A3C-4CB1-BEC1-BC4634F2E66B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{51C0089A-2A3C-4CB1-BEC1-BC4634F2E66B}.Debug-Net35|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{51C0089A-2A3C-4CB1-BEC1-BC4634F2E66B}.Debug-Net35|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{51C0089A-2A3C-4CB1-BEC1-BC4634F2E66B}.Debug-Net40|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{51C0089A-2A3C-4CB1-BEC1-BC4634F2E66B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{51C0089A-2A3C-4CB1-BEC1-BC4634F2E66B}.Release-Net35|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{51C0089A-2A3C-4CB1-BEC1-BC4634F2E66B}.Release-Net35|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{51C0089A-2A3C-4CB1-BEC1-BC4634F2E66B}.Release-Net40|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{709E332D-635E-44B1-B6D1-1F49468F48CF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{709E332D-635E-44B1-B6D1-1F49468F48CF}.Debug-Net35|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{709E332D-635E-44B1-B6D1-1F49468F48CF}.Debug-Net35|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{709E332D-635E-44B1-B6D1-1F49468F48CF}.Debug-Net40|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{709E332D-635E-44B1-B6D1-1F49468F48CF}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{709E332D-635E-44B1-B6D1-1F49468F48CF}.Release-Net35|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{709E332D-635E-44B1-B6D1-1F49468F48CF}.Release-Net35|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{709E332D-635E-44B1-B6D1-1F49468F48CF}.Release-Net40|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
@ -83,6 +126,9 @@ Global
|
|||||||
{32204503-2EF0-4681-AE13-AA1FEB6C658A} = {35E3F9C0-8924-4536-BE09-F3761FDBF066}
|
{32204503-2EF0-4681-AE13-AA1FEB6C658A} = {35E3F9C0-8924-4536-BE09-F3761FDBF066}
|
||||||
{D8AE88F8-C36B-4D10-A7F9-22FFCFBA5231} = {35E3F9C0-8924-4536-BE09-F3761FDBF066}
|
{D8AE88F8-C36B-4D10-A7F9-22FFCFBA5231} = {35E3F9C0-8924-4536-BE09-F3761FDBF066}
|
||||||
{D8A4748C-0500-4F63-BC47-3506658C68F7} = {0938270D-E9F0-489B-AF9E-5C5AD7C69897}
|
{D8A4748C-0500-4F63-BC47-3506658C68F7} = {0938270D-E9F0-489B-AF9E-5C5AD7C69897}
|
||||||
|
{51C0089A-2A3C-4CB1-BEC1-BC4634F2E66B} = {2BA46994-CD4E-4C49-8A8A-982EFB39CE78}
|
||||||
|
{EFCBB492-4AD7-4CB6-9556-52C327EF2A19} = {0938270D-E9F0-489B-AF9E-5C5AD7C69897}
|
||||||
|
{709E332D-635E-44B1-B6D1-1F49468F48CF} = {2BA46994-CD4E-4C49-8A8A-982EFB39CE78}
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
SolutionGuid = {D4636382-1A18-4079-A3E7-054DD970F179}
|
SolutionGuid = {D4636382-1A18-4079-A3E7-054DD970F179}
|
||||||
|
@ -0,0 +1,625 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutputType>WinExe</OutputType>
|
||||||
|
<AssemblyName>HandyControlDemo</AssemblyName>
|
||||||
|
<RootNamespace>HandyControlDemo</RootNamespace>
|
||||||
|
<TargetFramework>net35</TargetFramework>
|
||||||
|
<ApplicationIcon>..\..\Shared\HandyControlDemo_Shared\Resources\Img\icon.ico</ApplicationIcon>
|
||||||
|
<NoWarn>0108</NoWarn>
|
||||||
|
<UseWPF>true</UseWPF>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="MvvmLightLibs" Version="5.4.1.1" />
|
||||||
|
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="..\..\Shared\HandyControlDemo_Shared\Data\MessageToken.cs">
|
||||||
|
<Link>Data\MessageToken.cs</Link>
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
<DependentUpon>MessageToken.tt</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="..\..\Shared\HandyControlDemo_Shared\Properties\Langs\LangProvider.cs">
|
||||||
|
<Link>Properties\Langs\LangProvider.cs</Link>
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
<DependentUpon>LangProvider.tt</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="..\..\Shared\HandyControlDemo_Shared\Properties\Langs\Lang.Designer.cs">
|
||||||
|
<Link>Properties\Langs\Lang.Designer.cs</Link>
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
<DependentUpon>Lang.resx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Remove="Properties\AssemblyInfo.cs" />
|
||||||
|
<Compile Remove="Properties\Langs\Lang.en.Designer.cs" />
|
||||||
|
<Compile Remove="Tools\Helper\CommonHelper.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\..\Shared\HandyControlDemo_Code\HandyControlDemo_Code.csproj" />
|
||||||
|
<ProjectReference Include="..\HandyControl_Net_35\HandyControl_Net_35.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Data\DemoInfo_Net_35.json">
|
||||||
|
<Link>Data\DemoInfo_Net_35.json</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\chrome_dragon.png">
|
||||||
|
<Link>Resources\Img\chrome_dragon.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\Cover.png">
|
||||||
|
<Link>Resources\Img\Cover.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<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">
|
||||||
|
<Link>Resources\Img\1.jpg</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\2.jpg">
|
||||||
|
<Link>Resources\Img\2.jpg</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\3.jpg">
|
||||||
|
<Link>Resources\Img\3.jpg</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\4.jpg">
|
||||||
|
<Link>Resources\Img\4.jpg</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\5.jpg">
|
||||||
|
<Link>Resources\Img\5.jpg</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\Album\1.jpg">
|
||||||
|
<Link>Resources\Img\Album\1.jpg</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\Album\10.jpg">
|
||||||
|
<Link>Resources\Img\Album\10.jpg</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\Album\2.jpg">
|
||||||
|
<Link>Resources\Img\Album\2.jpg</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\Album\3.jpg">
|
||||||
|
<Link>Resources\Img\Album\3.jpg</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\Album\4.jpg">
|
||||||
|
<Link>Resources\Img\Album\4.jpg</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\Album\5.jpg">
|
||||||
|
<Link>Resources\Img\Album\5.jpg</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\Album\6.jpg">
|
||||||
|
<Link>Resources\Img\Album\6.jpg</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\Album\7.jpg">
|
||||||
|
<Link>Resources\Img\Album\7.jpg</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\Album\8.jpg">
|
||||||
|
<Link>Resources\Img\Album\8.jpg</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\Album\9.jpg">
|
||||||
|
<Link>Resources\Img\Album\9.jpg</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\Avatar\avatar1.png">
|
||||||
|
<Link>Resources\Img\Avatar\avatar1.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\Avatar\avatar2.png">
|
||||||
|
<Link>Resources\Img\Avatar\avatar2.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\Avatar\avatar3.png">
|
||||||
|
<Link>Resources\Img\Avatar\avatar3.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\Avatar\avatar4.png">
|
||||||
|
<Link>Resources\Img\Avatar\avatar4.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\Avatar\avatar5.png">
|
||||||
|
<Link>Resources\Img\Avatar\avatar5.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\Avatar\avatar6.png">
|
||||||
|
<Link>Resources\Img\Avatar\avatar6.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\b1.jpg">
|
||||||
|
<Link>Resources\Img\b1.jpg</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\b2.jpg">
|
||||||
|
<Link>Resources\Img\b2.jpg</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\car_chase.gif">
|
||||||
|
<Link>Resources\Img\car_chase.gif</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\Chat\chat_back1.jpg">
|
||||||
|
<Link>Resources\Img\Chat\chat_back1.jpg</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\Chat\chat_back2.jpg">
|
||||||
|
<Link>Resources\Img\Chat\chat_back2.jpg</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\Flag\cn.png">
|
||||||
|
<Link>Resources\Img\Flag\cn.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\Flag\ca-Es.png">
|
||||||
|
<Link>Resources\Img\Flag\ca-Es.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\Flag\en.png">
|
||||||
|
<Link>Resources\Img\Flag\en.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\Flag\fa.png">
|
||||||
|
<Link>Resources\Img\Flag\fa.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\Flag\fr.png">
|
||||||
|
<Link>Resources\Img\Flag\fr.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\Flag\ko-KR.png">
|
||||||
|
<Link>Resources\Img\Flag\ko-KR.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\Flag\pt-BR.png">
|
||||||
|
<Link>Resources\Img\Flag\pt-BR.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\Flag\ru.png">
|
||||||
|
<Link>Resources\Img\Flag\ru.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\Flag\tr.png">
|
||||||
|
<Link>Resources\Img\Flag\tr.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\icon-white.ico">
|
||||||
|
<Link>Resources\Img\icon-white.ico</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\icon.ico">
|
||||||
|
<Link>Resources\Img\icon.ico</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\qq_group_1.jpg">
|
||||||
|
<Link>Resources\Img\qq_group_1.jpg</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\qq_group_2.jpg">
|
||||||
|
<Link>Resources\Img\qq_group_2.jpg</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\Animation_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\Animation_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\BorderElement_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\BorderElement_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\Brush_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\Brush_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\Bubble_16xLG.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\Bubble_16xLG.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\ButtonClick_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\ButtonClick_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\Calendar_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\Calendar_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\Carousel_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\Carousel_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\CheckBox_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\CheckBox_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\CheckBoxList_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\CheckBoxList_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\ColorPalette_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\ColorPalette_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\ColorWheel_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\ColorWheel_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\ComboBox_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\ComboBox_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\ContextMenu_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\ContextMenu_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\DataGrid_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\DataGrid_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\DatePicker_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\DatePicker_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\DetailDataView_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\DetailDataView_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\Dialog_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\Dialog_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\DotLarge_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\DotLarge_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\Expander_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\Expander_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\FlipVertical_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\FlipVertical_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\Flow_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\Flow_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\GoToTop_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\GoToTop_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\GroupBox_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\GroupBox_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\HoverMenu_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\HoverMenu_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\Image_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\Image_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\ImageBrowser_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\ImageBrowser_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\Label_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\Label_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\layout-FlexLayout-16.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\layout-FlexLayout-16.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\LinearCarousel_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\LinearCarousel_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\ListBox_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\ListBox_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\ListView_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\ListView_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\Loading_Blue_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\Loading_Blue_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\Message_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\Message_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\NotificationHub_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\NotificationHub_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\NumericListBox_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\NumericListBox_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\Paginator_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\Paginator_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\Panel_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\Panel_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\PasswordBox_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\PasswordBox_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\Path_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\Path_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\ProgressBar_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\ProgressBar_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\ProgressButton_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\ProgressButton_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\RadioButton_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\RadioButton_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\PropertyGridEditorPart_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\PropertyGridEditorPart_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\RepeatButton_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\RepeatButton_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\RichTextBox_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\RichTextBox_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\ScrollBox_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\ScrollBox_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\Search_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\Search_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\Shield_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\Shield_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\Slider_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\Slider_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\SortAscending_grey_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\SortAscending_grey_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\SplitterControl_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\SplitterControl_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\Star.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\Star.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\TabPage_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\TabPage_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\Tag_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\Tag_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\TextBlock_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\TextBlock_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\TextBox_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\TextBox_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\Timeline_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\Timeline_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\TimePicker_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\TimePicker_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\Time_color_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\Time_color_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\Toggle_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\Toggle_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\ToolBar_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\ToolBar_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\Transfer_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\Transfer_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\TreeView_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\TreeView_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\User_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\User_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\WindowsForm_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\WindowsForm_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\GridPane_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\GridPane_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\under_construction.gif">
|
||||||
|
<Link>Resources\Img\under_construction.gif</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\DevOps\DevOps-Boards.png">
|
||||||
|
<Link>Resources\Img\DevOps\DevOps-Boards.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\DevOps\DevOps-Overview.png">
|
||||||
|
<Link>Resources\Img\DevOps\DevOps-Overview.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\DevOps\DevOps-Pipelines.png">
|
||||||
|
<Link>Resources\Img\DevOps\DevOps-Pipelines.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\DevOps\DevOps-Repos.png">
|
||||||
|
<Link>Resources\Img\DevOps\DevOps-Repos.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\DevOps\DevOps-TestPlans.png">
|
||||||
|
<Link>Resources\Img\DevOps\DevOps-TestPlans.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\MainMenuControl_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\MainMenuControl_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\fabric-icons.ttf">
|
||||||
|
<Link>Resources\fabric-icons.ttf</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Registry.txt">
|
||||||
|
<Link>Resources\Registry.txt</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\brackets_Square_16xLG.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\brackets_Square_16xLG.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\ButtonGroup_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\ButtonGroup_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\VSO_Card_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\VSO_Card_16x.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\Dynamic_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\Dynamic_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\PolygonHexagon_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\PolygonHexagon_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\HandyControl.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\HandyControl.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\Procedure_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\Procedure_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\Dance.png">
|
||||||
|
<Link>Resources\Img\Dance.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\thumbs_up.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\thumbs_up.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\SplitButton_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\SplitButton_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\DataGenerator_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\DataGenerator_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<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\LeftMainContent\PopupCursor_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\PopupCursor_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\TransitioningContentControl_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\TransitioningContentControl_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\View_Portrait_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\View_Portrait_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\TransformRelative_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\TransformRelative_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\Effects_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\Effects_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\Ellipsis_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\Ellipsis_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\WPFFlowDocument_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\WPFFlowDocument_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\OutlinedRectangleTool_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\OutlinedRectangleTool_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\frame_16xLG.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\frame_16xLG.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\cloud.png">
|
||||||
|
<Link>Resources\Img\cloud.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\WindowScreenshot_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\WindowScreenshot_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Include="..\..\Shared\HandyControlDemo_Shared\Properties\Langs\Lang.tr.resx">
|
||||||
|
<Link>Properties\Langs\Lang.tr.resx</Link>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="..\..\Shared\HandyControlDemo_Shared\Properties\Langs\Lang.ca-ES.resx">
|
||||||
|
<Link>Properties\Langs\Lang.ca-ES.resx</Link>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="..\..\Shared\HandyControlDemo_Shared\Properties\Langs\Lang.en.resx">
|
||||||
|
<Link>Properties\Langs\Lang.en.resx</Link>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="..\..\Shared\HandyControlDemo_Shared\Properties\Langs\Lang.fa.resx">
|
||||||
|
<Link>Properties\Langs\Lang.fa.resx</Link>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="..\..\Shared\HandyControlDemo_Shared\Properties\Langs\Lang.fr.resx">
|
||||||
|
<Link>Properties\Langs\Lang.fr.resx</Link>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="..\..\Shared\HandyControlDemo_Shared\Properties\Langs\Lang.ko-KR.resx">
|
||||||
|
<Link>Properties\Langs\Lang.ko-KR.resx</Link>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="..\..\Shared\HandyControlDemo_Shared\Properties\Langs\Lang.pt-BR.resx">
|
||||||
|
<Link>Properties\Langs\Lang.pt-BR.resx</Link>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="..\..\Shared\HandyControlDemo_Shared\Properties\Langs\Lang.ru.resx">
|
||||||
|
<Link>Properties\Langs\Lang.ru.resx</Link>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="..\..\Shared\HandyControlDemo_Shared\Properties\Langs\Lang.resx">
|
||||||
|
<Link>Properties\Langs\Lang.resx</Link>
|
||||||
|
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>Lang.Designer.cs</LastGenOutput>
|
||||||
|
</EmbeddedResource>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="..\..\Shared\HandyControlDemo_Shared\Properties\App.config">
|
||||||
|
<Link>Properties\App.config</Link>
|
||||||
|
</None>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Content Include="..\..\Shared\HandyControlDemo_Shared\Data\MessageToken.tt">
|
||||||
|
<Link>Data\MessageToken.tt</Link>
|
||||||
|
<Generator>TextTemplatingFileGenerator</Generator>
|
||||||
|
<LastGenOutput>MessageToken.cs</LastGenOutput>
|
||||||
|
</Content>
|
||||||
|
<Content Include="..\..\Shared\HandyControlDemo_Shared\Properties\Langs\LangProvider.tt">
|
||||||
|
<Link>Properties\Langs\LangProvider.tt</Link>
|
||||||
|
<Generator>TextTemplatingFileGenerator</Generator>
|
||||||
|
<LastGenOutput>LangProvider.cs</LastGenOutput>
|
||||||
|
</Content>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="..\..\Shared\HandyControlDemo_Shared\Data\MessageToken.tt" Link="Data\MessageToken.tt">
|
||||||
|
<Generator>TextTemplatingFileGenerator</Generator>
|
||||||
|
</None>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Page Update="UserControl\Controls\CalendarWithClockDemoCtl.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Update="UserControl\Controls\DatePickerDemoCtl.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Update="UserControl\Controls\DateTimePickerDemoCtl.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Update="UserControl\Controls\PaginationDemoCtl.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Update="UserControl\Styles\CalendarDemoCtl.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Update="UserControl\Styles\DataGridDemoCtl.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Update="UserControl\Styles\NativeDatePickerDemoCtl.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="..\..\Shared\HandyControlDemo_Shared\HandyControlDemo_Shared.projitems" Label="Shared" />
|
||||||
|
<ItemGroup>
|
||||||
|
<!--<Page Remove="..\..\Shared\HandyControlDemo_Shared\Resources\Themes\Styles\Style.xaml" />-->
|
||||||
|
<Page Remove="..\..\Shared\HandyControlDemo_Shared\UserControl\Basic\Avatar.xaml" />
|
||||||
|
<Page Remove="..\..\Shared\HandyControlDemo_Shared\UserControl\Controls\CalendarWithClockDemoCtl.xaml" />
|
||||||
|
<Page Remove="..\..\Shared\HandyControlDemo_Shared\UserControl\Controls\DatePickerDemoCtl.xaml" />
|
||||||
|
<Page Remove="..\..\Shared\HandyControlDemo_Shared\UserControl\Controls\DateTimePickerDemoCtl.xaml" />
|
||||||
|
<Page Remove="..\..\Shared\HandyControlDemo_Shared\UserControl\Controls\PaginationDemoCtl.xaml" />
|
||||||
|
<Page Remove="..\..\Shared\HandyControlDemo_Shared\UserControl\Styles\CalendarDemoCtl.xaml" />
|
||||||
|
<Page Remove="..\..\Shared\HandyControlDemo_Shared\UserControl\Styles\DataGridDemoCtl.xaml" />
|
||||||
|
<Page Remove="..\..\Shared\HandyControlDemo_Shared\UserControl\Styles\NativeDatePickerDemoCtl.xaml" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Remove="..\..\Shared\HandyControlDemo_Shared\UserControl\Basic\Avatar.xaml.cs" />
|
||||||
|
<Compile Remove="..\..\Shared\HandyControlDemo_Shared\UserControl\Controls\CalendarWithClockDemoCtl.xaml.cs" />
|
||||||
|
<Compile Remove="..\..\Shared\HandyControlDemo_Shared\UserControl\Controls\DatePickerDemoCtl.xaml.cs" />
|
||||||
|
<Compile Remove="..\..\Shared\HandyControlDemo_Shared\UserControl\Controls\DateTimePickerDemoCtl.xaml.cs" />
|
||||||
|
<Compile Remove="..\..\Shared\HandyControlDemo_Shared\UserControl\Controls\PaginationDemoCtl.xaml.cs" />
|
||||||
|
<Compile Remove="..\..\Shared\HandyControlDemo_Shared\UserControl\Styles\CalendarDemoCtl.xaml.cs" />
|
||||||
|
<Compile Remove="..\..\Shared\HandyControlDemo_Shared\UserControl\Styles\DataGridDemoCtl.xaml.cs" />
|
||||||
|
<Compile Remove="..\..\Shared\HandyControlDemo_Shared\UserControl\Styles\NativeDatePickerDemoCtl.xaml.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Remove="Data\DemoInfo.json" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Folder Include="Resources\Themes\Styles\" />
|
||||||
|
<Folder Include="UserControl\Basic\" />
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<PostBuildEvent>
|
||||||
|
if not exist Langs md Langs
|
||||||
|
rd /s /q Langs\en
|
||||||
|
rd /s /q Langs\fa
|
||||||
|
rd /s /q Langs\fr
|
||||||
|
rd /s /q Langs\ko-KR
|
||||||
|
rd /s /q Langs\pt-BR
|
||||||
|
rd /s /q Langs\ru
|
||||||
|
rd /s /q Langs\tr
|
||||||
|
rd /s /q Langs\ca-Es
|
||||||
|
move en Langs
|
||||||
|
move fa Langs
|
||||||
|
move fr Langs
|
||||||
|
move ko-KR Langs
|
||||||
|
move pt-BR Langs
|
||||||
|
move ru Langs
|
||||||
|
move tr Langs
|
||||||
|
move ca-Es Langs
|
||||||
|
</PostBuildEvent>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Project>
|
@ -0,0 +1,23 @@
|
|||||||
|
<UserControl x:Class="HandyControlDemo.UserControl.Avatar"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||||
|
Margin="16"
|
||||||
|
Effect="{StaticResource EffectShadow5}"
|
||||||
|
Cursor="Hand"
|
||||||
|
mc:Ignorable="d">
|
||||||
|
<Button Style="{StaticResource ButtonCustom}" Command="hc:ControlCommands.OpenLink" CommandParameter="{Binding Link,RelativeSource={RelativeSource AncestorType=UserControl}}" >
|
||||||
|
<Border Background="{DynamicResource SecondaryRegionBrush}" CornerRadius="10">
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Image Source="{Binding Source,RelativeSource={RelativeSource AncestorType=UserControl}}" Height="120" Width="120" Stretch="Uniform" Margin="10"/>
|
||||||
|
<TextBlock TextTrimming="CharacterEllipsis" TextWrapping="NoWrap" Margin="0,0,0,10" Grid.Row="1" Style="{StaticResource TextBlockDefault}" Text="{Binding DisplayName,RelativeSource={RelativeSource AncestorType=UserControl}}"/>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
</Button>
|
||||||
|
</UserControl>
|
@ -0,0 +1,40 @@
|
|||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Media.Imaging;
|
||||||
|
|
||||||
|
namespace HandyControlDemo.UserControl
|
||||||
|
{
|
||||||
|
public partial class Avatar
|
||||||
|
{
|
||||||
|
public Avatar()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static readonly DependencyProperty SourceProperty = DependencyProperty.Register(
|
||||||
|
"Source", typeof(BitmapFrame), typeof(Avatar), new PropertyMetadata(default(BitmapFrame)));
|
||||||
|
|
||||||
|
public BitmapFrame Source
|
||||||
|
{
|
||||||
|
get => (BitmapFrame) GetValue(SourceProperty);
|
||||||
|
set => SetValue(SourceProperty, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static readonly DependencyProperty UserNameProperty = DependencyProperty.Register(
|
||||||
|
"DisplayName", typeof(string), typeof(Avatar), new PropertyMetadata(default(string)));
|
||||||
|
|
||||||
|
public string DisplayName
|
||||||
|
{
|
||||||
|
get => (string) GetValue(UserNameProperty);
|
||||||
|
set => SetValue(UserNameProperty, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static readonly DependencyProperty LinkProperty = DependencyProperty.Register(
|
||||||
|
"Link", typeof(string), typeof(Avatar), new PropertyMetadata(default(string)));
|
||||||
|
|
||||||
|
public string Link
|
||||||
|
{
|
||||||
|
get => (string) GetValue(LinkProperty);
|
||||||
|
set => SetValue(LinkProperty, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,3 @@
|
|||||||
|
<UserControl x:Class="HandyControlDemo.UserControl.CalendarWithClockDemoCtl"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"/>
|
@ -0,0 +1,7 @@
|
|||||||
|
namespace HandyControlDemo.UserControl
|
||||||
|
{
|
||||||
|
public partial class CalendarWithClockDemoCtl
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,3 @@
|
|||||||
|
<UserControl x:Class="HandyControlDemo.UserControl.DatePickerDemoCtl"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"/>
|
@ -0,0 +1,7 @@
|
|||||||
|
namespace HandyControlDemo.UserControl
|
||||||
|
{
|
||||||
|
public partial class DatePickerDemoCtl
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,3 @@
|
|||||||
|
<UserControl x:Class="HandyControlDemo.UserControl.DateTimePickerDemoCtl"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"/>
|
@ -0,0 +1,7 @@
|
|||||||
|
namespace HandyControlDemo.UserControl
|
||||||
|
{
|
||||||
|
public partial class DateTimePickerDemoCtl
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,16 @@
|
|||||||
|
<UserControl x:Class="HandyControlDemo.UserControl.PaginationDemoCtl"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
Background="{DynamicResource RegionBrush}"
|
||||||
|
DataContext="{Binding PaginationDemo,Source={StaticResource Locator}}"
|
||||||
|
xmlns:hc="https://handyorg.github.io/handycontrol">
|
||||||
|
<hc:TransitioningContentControl Margin="32">
|
||||||
|
<hc:Pagination VerticalAlignment="Top" MaxPageCount="10" PageIndex="{Binding PageIndex}" IsJumpEnabled="True">
|
||||||
|
<hc:Interaction.Triggers>
|
||||||
|
<hc:EventTrigger EventName="PageUpdated">
|
||||||
|
<hc:EventToCommand Command="{Binding PageUpdatedCmd}" PassEventArgsToCommand="True" />
|
||||||
|
</hc:EventTrigger>
|
||||||
|
</hc:Interaction.Triggers>
|
||||||
|
</hc:Pagination>
|
||||||
|
</hc:TransitioningContentControl>
|
||||||
|
</UserControl>
|
@ -0,0 +1,11 @@
|
|||||||
|
|
||||||
|
namespace HandyControlDemo.UserControl
|
||||||
|
{
|
||||||
|
public partial class PaginationDemoCtl
|
||||||
|
{
|
||||||
|
public PaginationDemoCtl()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,3 @@
|
|||||||
|
<UserControl x:Class="HandyControlDemo.UserControl.CalendarDemoCtl"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"/>
|
@ -0,0 +1,7 @@
|
|||||||
|
namespace HandyControlDemo.UserControl
|
||||||
|
{
|
||||||
|
public partial class CalendarDemoCtl
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,3 @@
|
|||||||
|
<UserControl x:Class="HandyControlDemo.UserControl.DataGridDemoCtl"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"/>
|
@ -0,0 +1,8 @@
|
|||||||
|
|
||||||
|
namespace HandyControlDemo.UserControl
|
||||||
|
{
|
||||||
|
public partial class DataGridDemoCtl
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,3 @@
|
|||||||
|
<UserControl x:Class="HandyControlDemo.UserControl.NativeDatePickerDemoCtl"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"/>
|
@ -0,0 +1,7 @@
|
|||||||
|
namespace HandyControlDemo.UserControl
|
||||||
|
{
|
||||||
|
public partial class NativeDatePickerDemoCtl
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1 @@
|
|||||||
|
|
@ -0,0 +1 @@
|
|||||||
|
|
@ -0,0 +1 @@
|
|||||||
|
|
@ -0,0 +1 @@
|
|||||||
|
|
@ -0,0 +1 @@
|
|||||||
|
|
@ -0,0 +1 @@
|
|||||||
|
|
@ -0,0 +1 @@
|
|||||||
|
|
356
src/Net_35/HandyControl_Net_35/HandyControl_Net_35.csproj
Normal file
356
src/Net_35/HandyControl_Net_35/HandyControl_Net_35.csproj
Normal file
@ -0,0 +1,356 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
|
||||||
|
<PropertyGroup>
|
||||||
|
<AssemblyName>HandyControl</AssemblyName>
|
||||||
|
<RootNamespace>HandyControl</RootNamespace>
|
||||||
|
<TargetFramework>net35</TargetFramework>
|
||||||
|
<Description>Contains some commonly used simple WPF controls</Description>
|
||||||
|
<PackageId>HandyControl</PackageId>
|
||||||
|
<IncludeSymbols>true</IncludeSymbols>
|
||||||
|
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
|
||||||
|
<NoWarn>0067;0649;1591;0108;1717</NoWarn>
|
||||||
|
<UseWPF>true</UseWPF>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release-Net35|AnyCPU' ">
|
||||||
|
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\HandyControl.xml</DocumentationFile>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Page Update="Themes\Basic\Behaviors.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Update="Themes\Basic\Brushes.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Update="Themes\Styles\Base\BadgeBaseStyle.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Update="Themes\Styles\Base\CheckComboBoxBaseStyle.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Update="Themes\Styles\Base\ColorPickerBaseStyle.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Update="Themes\Styles\Base\DateTimePickerBaseStyle.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Update="Themes\Styles\Base\ListBoxBaseStyle.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Update="Themes\Styles\Base\NavigationWindowBaseStyle.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Update="Themes\Styles\Base\NumericUpDownBaseStyle.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Update="Themes\Styles\Base\PasswordBoxBaseStyle.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Update="Themes\Styles\Base\SplitButtonBaseStyle.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Update="Themes\Styles\Base\TextBoxBaseStyle.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Update="Themes\Styles\CalendarWithClock.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Update="Themes\Styles\Base\CheckBoxBaseStyle.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Update="Themes\Styles\Base\DatePickerBaseStyle.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Update="Themes\Styles\Base\RadioButtonBaseStyle.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Update="Themes\Styles\Base\RateBaseStyle.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Update="Themes\Styles\Base\ScrollViewerBaseStyle.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Update="Themes\Styles\Base\SliderBaseStyle.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Update="Themes\Styles\Base\ToggleButtonBaseStyle.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Update="Themes\Styles\Base\ToolBarBaseStyle.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Update="Themes\Styles\Calendar.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Update="Themes\Styles\Base\ComboBoxBaseStyle.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>XamlIntelliSenseFileGenerator</Generator>
|
||||||
|
</Page>
|
||||||
|
<Page Update="Themes\Styles\Base\MenuBaseStyle.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Update="Themes\Styles\Base\ProgressBarBaseStyle.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Update="Themes\Styles\Base\TreeViewBaseStyle.xaml">
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Update="Themes\Styles\Clock.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Update="Themes\Styles\DataGrid.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>XamlIntelliSenseFileGenerator</Generator>
|
||||||
|
</Page>
|
||||||
|
<Page Update="Themes\Styles\DatePicker.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Update="Themes\Styles\DateTimePicker.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Update="Themes\Styles\ImageViewer.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Update="Themes\Styles\ListView.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>XamlIntelliSenseFileGenerator</Generator>
|
||||||
|
</Page>
|
||||||
|
<Page Update="Themes\Styles\MessageBox.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>XamlIntelliSenseFileGenerator</Generator>
|
||||||
|
</Page>
|
||||||
|
<Page Update="Themes\Styles\Pagination.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Update="Themes\Styles\PopupWindow.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Update="Themes\Styles\ProgressBar.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Update="Themes\Styles\RichTextBox.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Update="Themes\Styles\Screenshot.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Update="Themes\Styles\TabControl.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Update="Themes\Styles\TimeBar.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Update="Themes\Styles\ToggleButton.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Update="Themes\Styles\TransitioningContentControl.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Update="Themes\Styles\Window.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>XamlIntelliSenseFileGenerator</Generator>
|
||||||
|
</Page>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="..\..\Shared\HandyControl_Shared\Properties\Langs\Lang.Designer.cs">
|
||||||
|
<Link>Properties\Langs\Lang.Designer.cs</Link>
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
<DependentUpon>Lang.resx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="..\..\Shared\HandyControl_Shared\Properties\Langs\LangProvider.cs">
|
||||||
|
<Link>Properties\Langs\LangProvider.cs</Link>
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
<DependentUpon>LangProvider.tt</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Include="..\..\Shared\HandyControl_Shared\Properties\Langs\Lang.tr.resx">
|
||||||
|
<Link>Properties\Langs\Lang.tr.resx</Link>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="..\..\Shared\HandyControl_Shared\Properties\Langs\Lang.ca-ES.resx">
|
||||||
|
<Link>Properties\Langs\Lang.ca-ES.resx</Link>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="..\..\Shared\HandyControl_Shared\Properties\Langs\Lang.en.resx">
|
||||||
|
<Link>Properties\Langs\Lang.en.resx</Link>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="..\..\Shared\HandyControl_Shared\Properties\Langs\Lang.fa.resx">
|
||||||
|
<Link>Properties\Langs\Lang.fa.resx</Link>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="..\..\Shared\HandyControl_Shared\Properties\Langs\Lang.fr.resx">
|
||||||
|
<Link>Properties\Langs\Lang.fr.resx</Link>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="..\..\Shared\HandyControl_Shared\Properties\Langs\Lang.ko-KR.resx">
|
||||||
|
<Link>Properties\Langs\Lang.ko-KR.resx</Link>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="..\..\Shared\HandyControl_Shared\Properties\Langs\Lang.pt-BR.resx">
|
||||||
|
<Link>Properties\Langs\Lang.pt-BR.resx</Link>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="..\..\Shared\HandyControl_Shared\Properties\Langs\Lang.ru.resx">
|
||||||
|
<Link>Properties\Langs\Lang.ru.resx</Link>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="..\..\Shared\HandyControl_Shared\Properties\Langs\Lang.resx">
|
||||||
|
<Link>Properties\Langs\Lang.resx</Link>
|
||||||
|
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>Lang.Designer.cs</LastGenOutput>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<Compile Include="..\..\Shared\HandyControl_Shared\Properties\AssemblyInfo.cs">
|
||||||
|
<Link>Properties\AssemblyInfo.cs</Link>
|
||||||
|
</Compile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Content Include="..\..\Shared\HandyControl_Shared\Properties\Langs\LangProvider.tt">
|
||||||
|
<Link>Properties\Langs\LangProvider.tt</Link>
|
||||||
|
<Generator>TextTemplatingFileGenerator</Generator>
|
||||||
|
<LastGenOutput>LangProvider.cs</LastGenOutput>
|
||||||
|
</Content>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="..\..\Shared\HandyControl_Shared\HandyControl_Shared.projitems" Label="Shared" />
|
||||||
|
<Import Project="..\..\Shared\Microsoft.Windows.Shell\Microsoft.Windows.Shell.projitems" Label="Shared" />
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\dropper.cur">
|
||||||
|
<Link>Resources\dropper.cur</Link>
|
||||||
|
</Resource>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Effects\BrightnessEffect.ps">
|
||||||
|
<Link>Resources\Effects\BrightnessEffect.ps</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Effects\ColorComplementEffect.ps">
|
||||||
|
<Link>Resources\Effects\ColorComplementEffect.ps</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Effects\ColorMatrixEffect.ps">
|
||||||
|
<Link>Resources\Effects\ColorMatrixEffect.ps</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Effects\ContrastEffect.ps">
|
||||||
|
<Link>Resources\Effects\ContrastEffect.ps</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Effects\GrayScaleEffect.ps">
|
||||||
|
<Link>Resources\Effects\GrayScaleEffect.ps</Link>
|
||||||
|
</Resource>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\bottom.png">
|
||||||
|
<Link>Resources\Images\GlowWindow\bottom.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\bottomleft.png">
|
||||||
|
<Link>Resources\Images\GlowWindow\bottomleft.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\bottomright.png">
|
||||||
|
<Link>Resources\Images\GlowWindow\bottomright.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\cornerbottomleft.png">
|
||||||
|
<Link>Resources\Images\GlowWindow\cornerbottomleft.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\cornerbottomright.png">
|
||||||
|
<Link>Resources\Images\GlowWindow\cornerbottomright.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\cornertopleft.png">
|
||||||
|
<Link>Resources\Images\GlowWindow\cornertopleft.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\cornertopright.png">
|
||||||
|
<Link>Resources\Images\GlowWindow\cornertopright.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\left.png">
|
||||||
|
<Link>Resources\Images\GlowWindow\left.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\leftbottom.png">
|
||||||
|
<Link>Resources\Images\GlowWindow\leftbottom.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\lefttop.png">
|
||||||
|
<Link>Resources\Images\GlowWindow\lefttop.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\right.png">
|
||||||
|
<Link>Resources\Images\GlowWindow\right.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\rightbottom.png">
|
||||||
|
<Link>Resources\Images\GlowWindow\rightbottom.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\righttop.png">
|
||||||
|
<Link>Resources\Images\GlowWindow\righttop.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\top.png">
|
||||||
|
<Link>Resources\Images\GlowWindow\top.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\topleft.png">
|
||||||
|
<Link>Resources\Images\GlowWindow\topleft.png</Link>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\topright.png">
|
||||||
|
<Link>Resources\Images\GlowWindow\topright.png</Link>
|
||||||
|
</Resource>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Remove="..\..\Shared\HandyControl_Shared\Controls\Attach\DataGridAttach.cs" />
|
||||||
|
<Compile Remove="..\..\Shared\HandyControl_Shared\Controls\Attach\ImageAttach.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Remove="..\..\Shared\HandyControl_Shared\Controls\Input\DatePicker.cs" />
|
||||||
|
<Compile Remove="..\..\Shared\HandyControl_Shared\Controls\Input\DateTimePicker.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Remove="..\..\Shared\HandyControl_Shared\Controls\PropertyGrid\Editors\DatePropertyEditor.cs" />
|
||||||
|
<Compile Remove="..\..\Shared\HandyControl_Shared\Controls\PropertyGrid\Editors\DateTimePropertyEditor.cs" />
|
||||||
|
<Compile Remove="..\..\Shared\HandyControl_Shared\Controls\PropertyGrid\Editors\TimePropertyEditor.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Remove="..\..\Shared\HandyControl_Shared\Controls\Time\CalendarWithClock.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Remove="..\..\Shared\HandyControl_Shared\Interactivity\ExtendedVisualStateManager.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Remove="..\..\Shared\HandyControl_Shared\Tools\Extension\DialogExtension.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Remove="..\..\Shared\HandyControl_Shared\Media\Animation\EasingGeometryKeyFrame.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Page Remove="..\..\Shared\HandyControl_Shared\Themes\Basic\Behaviors.xaml" />
|
||||||
|
<Page Remove="..\..\Shared\HandyControl_Shared\Themes\Basic\Brushes.xaml" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Page Remove="..\..\Shared\HandyControl_Shared\Themes\Styles\Base\BadgeBaseStyle.xaml" />
|
||||||
|
<Page Remove="..\..\Shared\HandyControl_Shared\Themes\Styles\Base\CheckBoxBaseStyle.xaml" />
|
||||||
|
<Page Remove="..\..\Shared\HandyControl_Shared\Themes\Styles\Base\CheckComboBoxBaseStyle.xaml" />
|
||||||
|
<Page Remove="..\..\Shared\HandyControl_Shared\Themes\Styles\Base\ColorPickerBaseStyle.xaml" />
|
||||||
|
<Page Remove="..\..\Shared\HandyControl_Shared\Themes\Styles\Base\ComboBoxBaseStyle.xaml" />
|
||||||
|
<Page Remove="..\..\Shared\HandyControl_Shared\Themes\Styles\Base\DatePickerBaseStyle.xaml" />
|
||||||
|
<Page Remove="..\..\Shared\HandyControl_Shared\Themes\Styles\Base\DateTimePickerBaseStyle.xaml" />
|
||||||
|
<Page Remove="..\..\Shared\HandyControl_Shared\Themes\Styles\Base\ListBoxBaseStyle.xaml" />
|
||||||
|
<Page Remove="..\..\Shared\HandyControl_Shared\Themes\Styles\Base\MenuBaseStyle.xaml" />
|
||||||
|
<Page Remove="..\..\Shared\HandyControl_Shared\Themes\Styles\Base\NavigationWindowBaseStyle.xaml" />
|
||||||
|
<Page Remove="..\..\Shared\HandyControl_Shared\Themes\Styles\Base\NumericUpDownBaseStyle.xaml" />
|
||||||
|
<Page Remove="..\..\Shared\HandyControl_Shared\Themes\Styles\Base\PasswordBoxBaseStyle.xaml" />
|
||||||
|
<Page Remove="..\..\Shared\HandyControl_Shared\Themes\Styles\Base\ProgressBarBaseStyle.xaml" />
|
||||||
|
<Page Remove="..\..\Shared\HandyControl_Shared\Themes\Styles\Base\RadioButtonBaseStyle.xaml" />
|
||||||
|
<Page Remove="..\..\Shared\HandyControl_Shared\Themes\Styles\Base\RateBaseStyle.xaml" />
|
||||||
|
<Page Remove="..\..\Shared\HandyControl_Shared\Themes\Styles\Base\ScrollViewerBaseStyle.xaml" />
|
||||||
|
<Page Remove="..\..\Shared\HandyControl_Shared\Themes\Styles\Base\SliderBaseStyle.xaml" />
|
||||||
|
<Page Remove="..\..\Shared\HandyControl_Shared\Themes\Styles\Base\SplitButtonBaseStyle.xaml" />
|
||||||
|
<Page Remove="..\..\Shared\HandyControl_Shared\Themes\Styles\Base\TextBoxBaseStyle.xaml" />
|
||||||
|
<Page Remove="..\..\Shared\HandyControl_Shared\Themes\Styles\Base\ToggleButtonBaseStyle.xaml" />
|
||||||
|
<Page Remove="..\..\Shared\HandyControl_Shared\Themes\Styles\Base\ToolBarBaseStyle.xaml" />
|
||||||
|
<Page Remove="..\..\Shared\HandyControl_Shared\Themes\Styles\Base\TreeViewBaseStyle.xaml" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Page Remove="..\..\Shared\HandyControl_Shared\Themes\Styles\Calendar.xaml" />
|
||||||
|
<Page Remove="..\..\Shared\HandyControl_Shared\Themes\Styles\CalendarWithClock.xaml" />
|
||||||
|
<Page Remove="..\..\Shared\HandyControl_Shared\Themes\Styles\Clock.xaml" />
|
||||||
|
<Page Remove="..\..\Shared\HandyControl_Shared\Themes\Styles\DataGrid.xaml" />
|
||||||
|
<Page Remove="..\..\Shared\HandyControl_Shared\Themes\Styles\DatePicker.xaml" />
|
||||||
|
<Page Remove="..\..\Shared\HandyControl_Shared\Themes\Styles\DateTimePicker.xaml" />
|
||||||
|
<Page Remove="..\..\Shared\HandyControl_Shared\Themes\Styles\ImageViewer.xaml" />
|
||||||
|
<Page Remove="..\..\Shared\HandyControl_Shared\Themes\Styles\ListView.xaml" />
|
||||||
|
<Page Remove="..\..\Shared\HandyControl_Shared\Themes\Styles\MessageBox.xaml" />
|
||||||
|
<Page Remove="..\..\Shared\HandyControl_Shared\Themes\Styles\Pagination.xaml" />
|
||||||
|
<Page Remove="..\..\Shared\HandyControl_Shared\Themes\Styles\PopupWindow.xaml" />
|
||||||
|
<Page Remove="..\..\Shared\HandyControl_Shared\Themes\Styles\ProgressBar.xaml" />
|
||||||
|
<Page Remove="..\..\Shared\HandyControl_Shared\Themes\Styles\RichTextBox.xaml" />
|
||||||
|
<Page Remove="..\..\Shared\HandyControl_Shared\Themes\Styles\Screenshot.xaml" />
|
||||||
|
<Page Remove="..\..\Shared\HandyControl_Shared\Themes\Styles\TabControl.xaml" />
|
||||||
|
<Page Remove="..\..\Shared\HandyControl_Shared\Themes\Styles\TimeBar.xaml" />
|
||||||
|
<Page Remove="..\..\Shared\HandyControl_Shared\Themes\Styles\ToggleButton.xaml" />
|
||||||
|
<Page Remove="..\..\Shared\HandyControl_Shared\Themes\Styles\TransitioningContentControl.xaml" />
|
||||||
|
<Page Remove="..\..\Shared\HandyControl_Shared\Themes\Styles\Window.xaml" />
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
@ -0,0 +1,72 @@
|
|||||||
|
using System;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Controls;
|
||||||
|
using System.Windows.Controls.Primitives;
|
||||||
|
|
||||||
|
namespace HandyControl.Interactivity
|
||||||
|
{
|
||||||
|
public class ExtendedVisualStateManager
|
||||||
|
{
|
||||||
|
internal static Rect GetLayoutRect(FrameworkElement element)
|
||||||
|
{
|
||||||
|
var actualWidth = element.ActualWidth;
|
||||||
|
var actualHeight = element.ActualHeight;
|
||||||
|
if (element is Image || element is MediaElement)
|
||||||
|
if (element.Parent is Canvas)
|
||||||
|
{
|
||||||
|
actualWidth = double.IsNaN(element.Width) ? actualWidth : element.Width;
|
||||||
|
actualHeight = double.IsNaN(element.Height) ? actualHeight : element.Height;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
actualWidth = element.RenderSize.Width;
|
||||||
|
actualHeight = element.RenderSize.Height;
|
||||||
|
}
|
||||||
|
actualWidth = element.Visibility == Visibility.Collapsed ? 0.0 : actualWidth;
|
||||||
|
actualHeight = element.Visibility == Visibility.Collapsed ? 0.0 : actualHeight;
|
||||||
|
var margin = element.Margin;
|
||||||
|
var layoutSlot = LayoutInformation.GetLayoutSlot(element);
|
||||||
|
var x = 0.0;
|
||||||
|
var y = 0.0;
|
||||||
|
switch (element.HorizontalAlignment)
|
||||||
|
{
|
||||||
|
case HorizontalAlignment.Left:
|
||||||
|
x = layoutSlot.Left + margin.Left;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case HorizontalAlignment.Center:
|
||||||
|
x = (layoutSlot.Left + margin.Left + layoutSlot.Right - margin.Right) / 2.0 - actualWidth / 2.0;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case HorizontalAlignment.Right:
|
||||||
|
x = layoutSlot.Right - margin.Right - actualWidth;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case HorizontalAlignment.Stretch:
|
||||||
|
x = Math.Max(layoutSlot.Left + margin.Left,
|
||||||
|
(layoutSlot.Left + margin.Left + layoutSlot.Right - margin.Right) / 2.0 - actualWidth / 2.0);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
switch (element.VerticalAlignment)
|
||||||
|
{
|
||||||
|
case VerticalAlignment.Top:
|
||||||
|
y = layoutSlot.Top + margin.Top;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case VerticalAlignment.Center:
|
||||||
|
y = (layoutSlot.Top + margin.Top + layoutSlot.Bottom - margin.Bottom) / 2.0 - actualHeight / 2.0;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case VerticalAlignment.Bottom:
|
||||||
|
y = layoutSlot.Bottom - margin.Bottom - actualHeight;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case VerticalAlignment.Stretch:
|
||||||
|
y = Math.Max(layoutSlot.Top + margin.Top,
|
||||||
|
(layoutSlot.Top + margin.Top + layoutSlot.Bottom - margin.Bottom) / 2.0 - actualHeight / 2.0);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return new Rect(x, y, actualWidth, actualHeight);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1 @@
|
|||||||
|
|
17
src/Net_35/HandyControl_Net_35/Themes/Basic/Behaviors.xaml
Normal file
17
src/Net_35/HandyControl_Net_35/Themes/Basic/Behaviors.xaml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:interactivity="clr-namespace:HandyControl.Interactivity">
|
||||||
|
|
||||||
|
<interactivity:FluidMoveBehavior x:Key="BehaviorXY200" x:Shared="False" AppliesTo="Children" Duration="0:0:.2"/>
|
||||||
|
|
||||||
|
<interactivity:FluidMoveBehavior x:Key="BehaviorX200" x:Shared="False" AppliesTo="Children" Duration="0:0:.2"/>
|
||||||
|
|
||||||
|
<interactivity:FluidMoveBehavior x:Key="BehaviorY200" x:Shared="False" AppliesTo="Children" Duration="0:0:.2"/>
|
||||||
|
|
||||||
|
<interactivity:FluidMoveBehavior x:Key="BehaviorXY400" x:Shared="False" AppliesTo="Children" Duration="0:0:.4"/>
|
||||||
|
|
||||||
|
<interactivity:FluidMoveBehavior x:Key="BehaviorX400" x:Shared="False" AppliesTo="Children" Duration="0:0:.4"/>
|
||||||
|
|
||||||
|
<interactivity:FluidMoveBehavior x:Key="BehaviorY400" x:Shared="False" AppliesTo="Children" Duration="0:0:.4"/>
|
||||||
|
|
||||||
|
</ResourceDictionary>
|
65
src/Net_35/HandyControl_Net_35/Themes/Basic/Brushes.xaml
Normal file
65
src/Net_35/HandyControl_Net_35/Themes/Basic/Brushes.xaml
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||||
|
|
||||||
|
<SolidColorBrush x:Key="LightPrimaryBrush" Color="{DynamicResource LightPrimaryColor}"/>
|
||||||
|
<LinearGradientBrush x:Key="PrimaryBrush" EndPoint="1,0" StartPoint="0,0">
|
||||||
|
<GradientStop Color="{DynamicResource PrimaryColor}" Offset="0"/>
|
||||||
|
<GradientStop Color="{DynamicResource DarkPrimaryColor}" Offset="1"/>
|
||||||
|
</LinearGradientBrush>
|
||||||
|
<SolidColorBrush x:Key="DarkPrimaryBrush" Color="{DynamicResource DarkPrimaryColor}"/>
|
||||||
|
|
||||||
|
<SolidColorBrush x:Key="PrimaryTextBrush" Color="{DynamicResource PrimaryTextColor}"/>
|
||||||
|
<SolidColorBrush x:Key="SecondaryTextBrush" Color="{DynamicResource SecondaryTextColor}"/>
|
||||||
|
<SolidColorBrush x:Key="ThirdlyTextBrush" Color="{DynamicResource ThirdlyTextColor}"/>
|
||||||
|
<SolidColorBrush x:Key="ReverseTextBrush" Color="{DynamicResource ReverseTextColor}"/>
|
||||||
|
<SolidColorBrush x:Key="TextIconBrush" Color="{DynamicResource TextIconColor}"/>
|
||||||
|
|
||||||
|
<SolidColorBrush x:Key="BorderBrush" Color="{DynamicResource BorderColor}"/>
|
||||||
|
<SolidColorBrush x:Key="SecondaryBorderBrush" Color="{DynamicResource SecondaryBorderColor}"/>
|
||||||
|
<SolidColorBrush x:Key="BackgroundBrush" Color="{DynamicResource BackgroundColor}"/>
|
||||||
|
<SolidColorBrush x:Key="RegionBrush" Color="{DynamicResource RegionColor}"/>
|
||||||
|
<SolidColorBrush x:Key="SecondaryRegionBrush" Color="{DynamicResource SecondaryRegionColor}"/>
|
||||||
|
<SolidColorBrush x:Key="ThirdlyRegionBrush" Color="{DynamicResource ThirdlyRegionColor}"/>
|
||||||
|
<LinearGradientBrush x:Key="TitleBrush" EndPoint="1,0" StartPoint="0,0">
|
||||||
|
<GradientStop Color="{DynamicResource TitleColor}" Offset="0"/>
|
||||||
|
<GradientStop Color="{DynamicResource SecondaryTitleColor}" Offset="1"/>
|
||||||
|
</LinearGradientBrush>
|
||||||
|
|
||||||
|
<SolidColorBrush x:Key="DefaultBrush" Color="{DynamicResource DefaultColor}"/>
|
||||||
|
<SolidColorBrush x:Key="DarkDefaultBrush" Color="{DynamicResource DarkDefaultColor}"/>
|
||||||
|
|
||||||
|
<SolidColorBrush x:Key="LightDangerBrush" Color="{DynamicResource LightDangerColor}"/>
|
||||||
|
<LinearGradientBrush x:Key="DangerBrush" EndPoint="1,0" StartPoint="0,0">
|
||||||
|
<GradientStop Color="{DynamicResource DangerColor}" Offset="0"/>
|
||||||
|
<GradientStop Color="{DynamicResource DarkDangerColor}" Offset="1"/>
|
||||||
|
</LinearGradientBrush>
|
||||||
|
<SolidColorBrush x:Key="DarkDangerBrush" Color="{DynamicResource DarkDangerColor}"/>
|
||||||
|
|
||||||
|
<SolidColorBrush x:Key="LightWarningBrush" Color="{DynamicResource LightWarningColor}"/>
|
||||||
|
<LinearGradientBrush x:Key="WarningBrush" EndPoint="1,0" StartPoint="0,0">
|
||||||
|
<GradientStop Color="{DynamicResource WarningColor}" Offset="0"/>
|
||||||
|
<GradientStop Color="{DynamicResource DarkWarningColor}" Offset="1"/>
|
||||||
|
</LinearGradientBrush>
|
||||||
|
<SolidColorBrush x:Key="DarkWarningBrush" Color="{DynamicResource DarkWarningColor}"/>
|
||||||
|
|
||||||
|
<SolidColorBrush x:Key="LightInfoBrush" Color="{DynamicResource LightInfoColor}"/>
|
||||||
|
<LinearGradientBrush x:Key="InfoBrush" EndPoint="1,0" StartPoint="0,0">
|
||||||
|
<GradientStop Color="{DynamicResource InfoColor}" Offset="0"/>
|
||||||
|
<GradientStop Color="{DynamicResource DarkInfoColor}" Offset="1"/>
|
||||||
|
</LinearGradientBrush>
|
||||||
|
<SolidColorBrush x:Key="DarkInfoBrush" Color="{DynamicResource DarkInfoColor}"/>
|
||||||
|
|
||||||
|
<SolidColorBrush x:Key="LightSuccessBrush" Color="{DynamicResource LightSuccessColor}"/>
|
||||||
|
<LinearGradientBrush x:Key="SuccessBrush" EndPoint="1,0" StartPoint="0,0">
|
||||||
|
<GradientStop Color="{DynamicResource SuccessColor}" Offset="0"/>
|
||||||
|
<GradientStop Color="{DynamicResource DarkSuccessColor}" Offset="1"/>
|
||||||
|
</LinearGradientBrush>
|
||||||
|
<SolidColorBrush x:Key="DarkSuccessBrush" Color="{DynamicResource DarkSuccessColor}"/>
|
||||||
|
|
||||||
|
<SolidColorBrush x:Key="AccentBrush" Color="{DynamicResource AccentColor}"/>
|
||||||
|
<SolidColorBrush x:Key="DarkAccentBrush" Color="{DynamicResource DarkAccentColor}"/>
|
||||||
|
|
||||||
|
<SolidColorBrush x:Key="DarkMaskBrush" Color="{DynamicResource DarkMaskColor}"/>
|
||||||
|
<SolidColorBrush x:Key="DarkOpacityBrush" Color="{DynamicResource DarkOpacityColor}"/>
|
||||||
|
|
||||||
|
</ResourceDictionary>
|
@ -0,0 +1,93 @@
|
|||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:hc="clr-namespace:HandyControl.Controls"
|
||||||
|
xmlns:themes="clr-namespace:HandyControl.Themes">
|
||||||
|
|
||||||
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Styles/Border.xaml" />
|
||||||
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="BadgeTextTemplate" TargetType="hc:Badge">
|
||||||
|
<hc:SimplePanel>
|
||||||
|
<ContentPresenter />
|
||||||
|
<Border x:Name="Border" Visibility="{TemplateBinding ShowBadge,Converter={StaticResource Boolean2VisibilityConverter}}" RenderTransformOrigin="0.5 0.5" Style="{StaticResource BorderCircular}" Margin="{TemplateBinding BadgeMargin}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
|
||||||
|
<Border.RenderTransform>
|
||||||
|
<ScaleTransform />
|
||||||
|
</Border.RenderTransform>
|
||||||
|
<ContentPresenter ContentSource="Text" Margin="{TemplateBinding Padding}" />
|
||||||
|
</Border>
|
||||||
|
</hc:SimplePanel>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<EventTrigger RoutedEvent="hc:Badge.ValueChanged">
|
||||||
|
<BeginStoryboard>
|
||||||
|
<Storyboard AutoReverse="True">
|
||||||
|
<DoubleAnimation Storyboard.TargetName="Border" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)" BeginTime="0" Duration="0:0:.1" From="1" To="1.2" />
|
||||||
|
<DoubleAnimation Storyboard.TargetName="Border" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)" BeginTime="0" Duration="0:0:.1" From="1" To="1.2" />
|
||||||
|
</Storyboard>
|
||||||
|
</BeginStoryboard>
|
||||||
|
</EventTrigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="BadgeDotTemplate" TargetType="hc:Badge">
|
||||||
|
<hc:SimplePanel>
|
||||||
|
<ContentPresenter />
|
||||||
|
<Border Visibility="{TemplateBinding ShowBadge,Converter={StaticResource Boolean2VisibilityConverter}}" Margin="{TemplateBinding BadgeMargin}" Width="10" Height="10" CornerRadius="5" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" />
|
||||||
|
</hc:SimplePanel>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="BadgeProcessingTemplate" TargetType="hc:Badge">
|
||||||
|
<hc:SimplePanel>
|
||||||
|
<ContentPresenter />
|
||||||
|
<Ellipse Visibility="{TemplateBinding ShowBadge,Converter={StaticResource Boolean2VisibilityConverter}}" Height="10" Width="10" Fill="{TemplateBinding Background}" RenderTransformOrigin="0.5 0.5" Margin="{TemplateBinding BadgeMargin}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
|
||||||
|
<Ellipse.OpacityMask>
|
||||||
|
<RadialGradientBrush>
|
||||||
|
<GradientStop Offset="0" Color="Transparent" />
|
||||||
|
<GradientStop Offset="1" Color="Black" />
|
||||||
|
</RadialGradientBrush>
|
||||||
|
</Ellipse.OpacityMask>
|
||||||
|
<Ellipse.RenderTransform>
|
||||||
|
<ScaleTransform />
|
||||||
|
</Ellipse.RenderTransform>
|
||||||
|
<Ellipse.Triggers>
|
||||||
|
<EventTrigger RoutedEvent="hc:Badge.Loaded">
|
||||||
|
<BeginStoryboard>
|
||||||
|
<Storyboard RepeatBehavior="Forever" DesiredFrameRate="20">
|
||||||
|
<DoubleAnimation Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)" BeginTime="0" Duration="0:0:1" From="1" To="2" />
|
||||||
|
<DoubleAnimation Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)" BeginTime="0" Duration="0:0:1" From="1" To="2" />
|
||||||
|
<DoubleAnimation Storyboard.TargetProperty="Opacity" BeginTime="0" Duration="0:0:1" From="1" To="0" />
|
||||||
|
</Storyboard>
|
||||||
|
</BeginStoryboard>
|
||||||
|
</EventTrigger>
|
||||||
|
</Ellipse.Triggers>
|
||||||
|
</Ellipse>
|
||||||
|
<Border Visibility="{TemplateBinding ShowBadge,Converter={StaticResource Boolean2VisibilityConverter}}" Margin="{TemplateBinding BadgeMargin}" Width="10" Height="10" CornerRadius="5" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" />
|
||||||
|
</hc:SimplePanel>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<Style x:Key="BadgeBaseStyle" TargetType="hc:Badge">
|
||||||
|
<Setter Property="Focusable" Value="False"/>
|
||||||
|
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}" />
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource TextIconBrush}" />
|
||||||
|
<Setter Property="BorderThickness" Value="1" />
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource RegionBrush}" />
|
||||||
|
<Setter Property="Padding" Value="6,2" />
|
||||||
|
<Setter Property="Template" Value="{StaticResource BadgeTextTemplate}" />
|
||||||
|
<Setter Property="HorizontalContentAlignment" Value="Right" />
|
||||||
|
<Setter Property="VerticalContentAlignment" Value="Top" />
|
||||||
|
<Setter Property="BadgeMargin" Value="0,-10,-10,0" />
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="Status" Value="Dot">
|
||||||
|
<Setter Property="Template" Value="{StaticResource BadgeDotTemplate}" />
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
|
||||||
|
<Setter Property="BadgeMargin" Value="0,-5,-5,0" />
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="Status" Value="Processing">
|
||||||
|
<Setter Property="Template" Value="{StaticResource BadgeProcessingTemplate}" />
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
|
||||||
|
<Setter Property="BadgeMargin" Value="0,-5,-5,0" />
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
</ResourceDictionary>
|
@ -0,0 +1,106 @@
|
|||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:hc="clr-namespace:HandyControl.Controls"
|
||||||
|
xmlns:themes="clr-namespace:HandyControl.Themes">
|
||||||
|
|
||||||
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Styles/Base/BaseStyle.xaml"/>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Basic/Geometries.xaml"/>
|
||||||
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
|
||||||
|
<Style x:Key="CheckBoxBaseStyle" BasedOn="{StaticResource BaseStyle}" TargetType="CheckBox">
|
||||||
|
<Setter Property="FocusVisualStyle">
|
||||||
|
<Setter.Value>
|
||||||
|
<Style>
|
||||||
|
<Setter Property="Control.Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate>
|
||||||
|
<Rectangle Margin="-4" Opacity=".6" SnapsToDevicePixels="true" Stroke="{DynamicResource SecondaryBorderBrush}" StrokeThickness="2" StrokeDashArray="1 1" RadiusX="4" RadiusY="4"/>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
<Setter Property="Background" Value="White"/>
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
|
||||||
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||||
|
<Setter Property="Padding" Value="6,0,0,0"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="CheckBox">
|
||||||
|
<ControlTemplate.Resources>
|
||||||
|
<Storyboard x:Key="StoryboardCheckedTrue">
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.StrokeDashOffset)" Storyboard.TargetName="path">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="0"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
</Storyboard>
|
||||||
|
<Storyboard x:Key="StoryboardCheckedFalse">
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.StrokeDashOffset)" Storyboard.TargetName="path">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="8"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
</Storyboard>
|
||||||
|
</ControlTemplate.Resources>
|
||||||
|
<Grid x:Name="templateRoot" Background="Transparent" SnapsToDevicePixels="True">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Border Height="18" Width="18" x:Name="checkBoxBorder" Background="{TemplateBinding Background}" CornerRadius="2" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
|
||||||
|
<hc:SimplePanel Grid.Column="0" Height="18" Width="18" x:Name="markGrid">
|
||||||
|
<Path x:Name="path" StrokeDashOffset="8" StrokeDashArray="8,8" Width="12" Height="12" Data="{StaticResource CheckedGeometry}" StrokeThickness="2" Stretch="Uniform" Stroke="{DynamicResource TextIconBrush}"/>
|
||||||
|
<Rectangle x:Name="indeterminateMark" RadiusX="2" RadiusY="2" Fill="{DynamicResource PrimaryBrush}" Margin="2" Opacity="0"/>
|
||||||
|
</hc:SimplePanel>
|
||||||
|
<ContentPresenter x:Name="contentPresenter" Visibility="Collapsed" Grid.Column="1" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||||
|
</Grid>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="HasContent" Value="true">
|
||||||
|
<Setter Property="Visibility" TargetName="contentPresenter" Value="Visible"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsMouseOver" Value="true">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<MultiTrigger>
|
||||||
|
<MultiTrigger.Conditions>
|
||||||
|
<Condition Property="IsChecked" Value="true"/>
|
||||||
|
<Condition Property="IsPressed" Value="true"/>
|
||||||
|
</MultiTrigger.Conditions>
|
||||||
|
<Setter Property="Opacity" Value=".8"/>
|
||||||
|
</MultiTrigger>
|
||||||
|
<MultiTrigger>
|
||||||
|
<MultiTrigger.Conditions>
|
||||||
|
<Condition Property="IsChecked" Value="false"/>
|
||||||
|
<Condition Property="IsPressed" Value="true"/>
|
||||||
|
</MultiTrigger.Conditions>
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}"/>
|
||||||
|
</MultiTrigger>
|
||||||
|
<Trigger Property="IsChecked" Value="true">
|
||||||
|
<Trigger.EnterActions>
|
||||||
|
<BeginStoryboard Storyboard="{StaticResource StoryboardCheckedTrue}"/>
|
||||||
|
</Trigger.EnterActions>
|
||||||
|
<Trigger.ExitActions>
|
||||||
|
<BeginStoryboard Storyboard="{StaticResource StoryboardCheckedFalse}"/>
|
||||||
|
</Trigger.ExitActions>
|
||||||
|
<Setter Property="Opacity" TargetName="indeterminateMark" Value="0"/>
|
||||||
|
<Setter Property="Background" Value="{DynamicResource PrimaryBrush}"/>
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource DarkPrimaryBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsChecked" Value="false">
|
||||||
|
<Setter Property="Stroke" Value="{DynamicResource BorderBrush}" TargetName="path"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsChecked" Value="{x:Null}">
|
||||||
|
<Setter Property="Opacity" TargetName="indeterminateMark" Value="1"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsEnabled" Value="False">
|
||||||
|
<Setter Property="Opacity" Value="0.4"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
</ResourceDictionary>
|
@ -0,0 +1,585 @@
|
|||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:hc="clr-namespace:HandyControl.Controls"
|
||||||
|
xmlns:ex="clr-namespace:HandyControl.Tools.Extension"
|
||||||
|
xmlns:themes="clr-namespace:HandyControl.Themes"
|
||||||
|
xmlns:system="clr-namespace:System;assembly=System.Runtime"
|
||||||
|
xmlns:interactivity="clr-namespace:HandyControl.Interactivity"
|
||||||
|
xmlns:langs="clr-namespace:HandyControl.Properties.Langs">
|
||||||
|
|
||||||
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Styles/Tag.xaml"/>
|
||||||
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
|
||||||
|
<Style x:Key="Tag4CheckComboBoxStyle" BasedOn="{StaticResource TagBaseStyle}" TargetType="hc:Tag">
|
||||||
|
<Setter Property="Margin" Value="0,3,3,0"/>
|
||||||
|
<Setter Property="Padding" Value="6,3,4,3"/>
|
||||||
|
<Setter Property="Height" Value="Auto"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="hc:Tag">
|
||||||
|
<Border CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||||
|
<Button Focusable="False" Name="ButtonClose" Visibility="{TemplateBinding ShowCloseButton,Converter={StaticResource Boolean2VisibilityConverter}}" Command="interactivity:ControlCommands.Close" Margin="10,0,0,0" Width="16" Height="16" Padding="0,4" Grid.Column="1" Style="{StaticResource ButtonIcon}" hc:IconElement.Geometry="{StaticResource CloseGeometry}" Foreground="{TemplateBinding Foreground}"/>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True" SourceName="ButtonClose">
|
||||||
|
<Setter Property="hc:IconElement.Geometry" Value="{StaticResource DeleteFillCircleGeometry}" TargetName="ButtonClose"/>
|
||||||
|
<Setter Property="Padding" Value="0" TargetName="ButtonClose"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="CheckComboBoxToggleButton" TargetType="ToggleButton">
|
||||||
|
<Setter Property="ClickMode" Value="Release"/>
|
||||||
|
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
||||||
|
<Setter Property="IsTabStop" Value="false"/>
|
||||||
|
<Setter Property="Focusable" Value="false"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="ToggleButton">
|
||||||
|
<Border CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
|
||||||
|
<Border Margin="0,0,6,0" BorderThickness="1" BorderBrush="Transparent" HorizontalAlignment="Right" SnapsToDevicePixels="true" Width="{StaticResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}">
|
||||||
|
<Path Width="16" Height="9" x:Name="arrow" Data="{StaticResource DownGeometry}" Fill="{TemplateBinding BorderBrush}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||||
|
</Border>
|
||||||
|
</Border>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsChecked" Value="True">
|
||||||
|
<Setter Property="Data" TargetName="arrow" Value="{StaticResource UpGeometry}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsEnabled" Value="False">
|
||||||
|
<Setter Property="Opacity" Value=".4"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="CheckComboBoxWatermarkToggleButton" TargetType="ToggleButton">
|
||||||
|
<Setter Property="ClickMode" Value="Release"/>
|
||||||
|
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource ThirdlyTextBrush}"/>
|
||||||
|
<Setter Property="IsTabStop" Value="false"/>
|
||||||
|
<Setter Property="Focusable" Value="false"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="ToggleButton">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
<ColumnDefinition Width="30"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Border Grid.ColumnSpan="2" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true"/>
|
||||||
|
<Path Grid.Column="1" x:Name="arrow" Data="{StaticResource DownGeometry}" Stretch="Uniform" Fill="{TemplateBinding BorderBrush}" HorizontalAlignment="Center" Margin="7" VerticalAlignment="Center"/>
|
||||||
|
<Border Margin="1" Grid.Column="0" Visibility="{Binding SelectedItem,RelativeSource={RelativeSource AncestorType=hc:CheckComboBox},Converter={StaticResource Object2VisibilityReConverter}}">
|
||||||
|
<ContentPresenter Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsChecked" Value="True">
|
||||||
|
<Setter Property="Data" TargetName="arrow" Value="{StaticResource UpGeometry}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsEnabled" Value="False">
|
||||||
|
<Setter Property="Opacity" Value=".4"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="CheckComboBoxItemBaseStyle" TargetType="hc:CheckComboBoxItem">
|
||||||
|
<Setter Property="SnapsToDevicePixels" Value="True"/>
|
||||||
|
<Setter Property="Padding" Value="{StaticResource DefaultControlPadding}"/>
|
||||||
|
<Setter Property="Background" Value="Transparent"/>
|
||||||
|
<Setter Property="BorderBrush" Value="Transparent"/>
|
||||||
|
<Setter Property="BorderThickness" Value="0"/>
|
||||||
|
<Setter Property="MinHeight" Value="{StaticResource DefaultControlHeight}"/>
|
||||||
|
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="hc:CheckComboBoxItem">
|
||||||
|
<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{Binding Padding,RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource ThicknessSplitConverter},ConverterParameter='1,0,1,0'}" SnapsToDevicePixels="true">
|
||||||
|
<CheckBox Foreground="{TemplateBinding Foreground}" HorizontalAlignment="Stretch" MinHeight="{TemplateBinding MinHeight}" FocusVisualStyle="{x:Null}" IsChecked="{Binding IsSelected,RelativeSource={RelativeSource TemplatedParent},Mode=TwoWay}">
|
||||||
|
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||||
|
</CheckBox>
|
||||||
|
</Border>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
|
<Setter Property="Background" TargetName="Bd" Value="{DynamicResource SecondaryRegionBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="CheckComboBoxTemplate" TargetType="hc:CheckComboBox">
|
||||||
|
<Grid x:Name="templateRoot" SnapsToDevicePixels="true">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
<ColumnDefinition Width="30"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Popup x:Name="PART_Popup" PlacementTarget="{Binding ElementName=toggleButton}" StaysOpen="False" IsOpen="{Binding IsDropDownOpen,RelativeSource={RelativeSource TemplatedParent},Mode=TwoWay}" AllowsTransparency="true" Grid.ColumnSpan="2" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
||||||
|
<Border CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1" Background="{DynamicResource RegionBrush}">
|
||||||
|
<Grid Margin="0,4" ClipToBounds="False">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<hc:CheckComboBoxItem x:Name="PART_SelectAll" Style="{TemplateBinding ItemContainerStyle}" IsEnabled="{TemplateBinding ShowSelectAllButton}" Visibility="{Binding ShowSelectAllButton,RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" HorizontalContentAlignment="Stretch" Content="{ex:Lang Key={x:Static langs:LangKeys.All}}"/>
|
||||||
|
<ScrollViewer x:Name="DropDownScrollViewer" Grid.Row="1">
|
||||||
|
<hc:SimplePanel>
|
||||||
|
<Canvas HorizontalAlignment="Left" Height="0" VerticalAlignment="Top" Width="0">
|
||||||
|
<Rectangle x:Name="opaqueRect" Fill="{Binding Background, ElementName=dropDownBorder}" Height="{Binding ActualHeight, ElementName=dropDownBorder}" Width="{Binding ActualWidth, ElementName=dropDownBorder}"/>
|
||||||
|
</Canvas>
|
||||||
|
<ItemsPresenter x:Name="ItemsPresenter" KeyboardNavigation.DirectionalNavigation="Contained" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||||
|
</hc:SimplePanel>
|
||||||
|
</ScrollViewer>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
</Popup>
|
||||||
|
<ToggleButton Grid.Column="0" x:Name="toggleButton" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.ColumnSpan="2" IsChecked="{Binding IsDropDownOpen,RelativeSource={RelativeSource TemplatedParent},Mode=TwoWay}" Style="{StaticResource CheckComboBoxToggleButton}"/>
|
||||||
|
<Border Grid.Column="0" Margin="-1,1">
|
||||||
|
<WrapPanel Name="PART_Panel" Margin="5,0,5,3"/>
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="HasItems" Value="false">
|
||||||
|
<Setter Property="Height" TargetName="dropDownBorder" Value="95"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="hc:DropDownElement.ConsistentWidth" Value="True">
|
||||||
|
<Setter Property="MaxWidth" TargetName="dropDownBorder" Value="{Binding ActualWidth, ElementName=toggleButton}"/>
|
||||||
|
<Setter Property="MinWidth" TargetName="dropDownBorder" Value="{Binding ActualWidth, ElementName=toggleButton}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="ScrollViewer.CanContentScroll" SourceName="DropDownScrollViewer" Value="false">
|
||||||
|
<Setter Property="Canvas.Top" TargetName="opaqueRect" Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}"/>
|
||||||
|
<Setter Property="Canvas.Left" TargetName="opaqueRect" Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}"/>
|
||||||
|
</Trigger>
|
||||||
|
<MultiTrigger>
|
||||||
|
<MultiTrigger.Conditions>
|
||||||
|
<Condition Property="IsMouseOver" Value="true" SourceName="toggleButton"/>
|
||||||
|
<Condition Property="IsOpen" Value="false" SourceName="PART_Popup"/>
|
||||||
|
</MultiTrigger.Conditions>
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}"/>
|
||||||
|
</MultiTrigger>
|
||||||
|
<Trigger Property="IsOpen" Value="True" SourceName="PART_Popup">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsFocused" Value="True">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsEnabled" Value="false">
|
||||||
|
<Setter Property="Opacity" Value="0.4" TargetName="toggleButton"/>
|
||||||
|
<Setter Property="Opacity" Value="0.4" TargetName="PART_Panel"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<Style x:Key="CheckComboBoxBaseStyle" TargetType="hc:CheckComboBox">
|
||||||
|
<Setter Property="TagStyle" Value="{StaticResource Tag4CheckComboBoxStyle}"/>
|
||||||
|
<Setter Property="SelectionMode" Value="Multiple"/>
|
||||||
|
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
|
||||||
|
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
|
||||||
|
<Setter Property="ItemContainerStyle" Value="{StaticResource CheckComboBoxItemBaseStyle}"/>
|
||||||
|
<Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}"/>
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
|
||||||
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
|
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
|
||||||
|
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
|
||||||
|
<Setter Property="MinHeight" Value="{StaticResource DefaultControlHeight}"/>
|
||||||
|
<Setter Property="ScrollViewer.CanContentScroll" Value="true"/>
|
||||||
|
<Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
|
||||||
|
<Setter Property="Padding" Value="{StaticResource DefaultInputPadding}"/>
|
||||||
|
<Setter Property="Template" Value="{StaticResource CheckComboBoxTemplate}"/>
|
||||||
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="CheckComboBoxExtendTopTemplate" TargetType="hc:CheckComboBox">
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight),RelativeSource={RelativeSource TemplatedParent}}" Height="{Binding Path=(hc:InfoElement.ContentHeight),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
<ColumnDefinition Width="30"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<StackPanel Grid.ColumnSpan="2" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" Margin="{TemplateBinding Padding}">
|
||||||
|
<TextBlock Margin="1,0,0,0" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
|
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
||||||
|
</StackPanel>
|
||||||
|
<Popup x:Name="PART_Popup" Grid.Row="1" Grid.Column="0" PlacementTarget="{Binding ElementName=toggleButton}" AllowsTransparency="true" Grid.ColumnSpan="2" StaysOpen="False" IsOpen="{Binding IsDropDownOpen,RelativeSource={RelativeSource TemplatedParent},Mode=TwoWay}" Margin="1" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
||||||
|
<Border CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1" Background="{DynamicResource RegionBrush}">
|
||||||
|
<Grid Margin="0,4" ClipToBounds="False">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<hc:CheckComboBoxItem x:Name="PART_SelectAll" Style="{TemplateBinding ItemContainerStyle}" IsEnabled="{TemplateBinding ShowSelectAllButton}" Visibility="{Binding ShowSelectAllButton,RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" HorizontalContentAlignment="Stretch" Content="{ex:Lang Key={x:Static langs:LangKeys.All}}"/>
|
||||||
|
<ScrollViewer x:Name="DropDownScrollViewer" Grid.Row="1">
|
||||||
|
<hc:SimplePanel>
|
||||||
|
<Canvas HorizontalAlignment="Left" Height="0" VerticalAlignment="Top" Width="0">
|
||||||
|
<Rectangle x:Name="opaqueRect" Fill="{Binding Background, ElementName=dropDownBorder}" Height="{Binding ActualHeight, ElementName=dropDownBorder}" Width="{Binding ActualWidth, ElementName=dropDownBorder}"/>
|
||||||
|
</Canvas>
|
||||||
|
<ItemsPresenter x:Name="ItemsPresenter" KeyboardNavigation.DirectionalNavigation="Contained" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||||
|
</hc:SimplePanel>
|
||||||
|
</ScrollViewer>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
</Popup>
|
||||||
|
<ToggleButton Grid.Row="1" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Padding="{TemplateBinding Padding}" Content="{Binding Path=(hc:InfoElement.Placeholder),RelativeSource={RelativeSource TemplatedParent}}" Grid.Column="0" x:Name="toggleButton" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.ColumnSpan="2" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource CheckComboBoxWatermarkToggleButton}"/>
|
||||||
|
<Border Grid.Row="1" Grid.Column="0" Margin="1,0">
|
||||||
|
<WrapPanel Name="PART_Panel" Margin="3,1,3,4"/>
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="HasItems" Value="false">
|
||||||
|
<Setter Property="Height" TargetName="dropDownBorder" Value="95"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="hc:DropDownElement.ConsistentWidth" Value="True">
|
||||||
|
<Setter Property="MaxWidth" TargetName="dropDownBorder" Value="{Binding ActualWidth, ElementName=toggleButton}"/>
|
||||||
|
<Setter Property="MinWidth" TargetName="dropDownBorder" Value="{Binding ActualWidth, ElementName=toggleButton}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="ScrollViewer.CanContentScroll" SourceName="DropDownScrollViewer" Value="false">
|
||||||
|
<Setter Property="Canvas.Top" TargetName="opaqueRect" Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}"/>
|
||||||
|
<Setter Property="Canvas.Left" TargetName="opaqueRect" Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}"/>
|
||||||
|
</Trigger>
|
||||||
|
<MultiTrigger>
|
||||||
|
<MultiTrigger.Conditions>
|
||||||
|
<Condition Property="IsMouseOver" Value="true" SourceName="toggleButton"/>
|
||||||
|
<Condition Property="IsOpen" Value="false" SourceName="PART_Popup"/>
|
||||||
|
</MultiTrigger.Conditions>
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}"/>
|
||||||
|
</MultiTrigger>
|
||||||
|
<Trigger Property="IsOpen" Value="True" SourceName="PART_Popup">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsFocused" Value="True">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsEnabled" Value="false">
|
||||||
|
<Setter Property="Opacity" Value="0.4" TargetName="toggleButton"/>
|
||||||
|
<Setter Property="Opacity" Value="0.4" TargetName="PART_Panel"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="CheckComboBoxExtendLeftTemplate" TargetType="hc:CheckComboBox">
|
||||||
|
<Grid x:Name="templateRoot" SnapsToDevicePixels="true" MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight),RelativeSource={RelativeSource TemplatedParent}}" Height="{Binding Path=(hc:InfoElement.ContentHeight),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Double2GridLengthConverter}}">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="{Binding Path=(hc:InfoElement.TitleWidth),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
<ColumnDefinition Width="30"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<StackPanel VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="0,7,6,7" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal">
|
||||||
|
<TextBlock Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
|
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
||||||
|
</StackPanel>
|
||||||
|
<Popup Grid.Column="1" x:Name="PART_Popup" PlacementTarget="{Binding ElementName=toggleButton}" AllowsTransparency="true" Grid.ColumnSpan="2" StaysOpen="False" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Margin="1" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
||||||
|
<Border CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1" Background="{DynamicResource RegionBrush}">
|
||||||
|
<Grid Margin="0,4" ClipToBounds="False">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<hc:CheckComboBoxItem x:Name="PART_SelectAll" Style="{TemplateBinding ItemContainerStyle}" IsEnabled="{TemplateBinding ShowSelectAllButton}" Visibility="{Binding ShowSelectAllButton,RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" HorizontalContentAlignment="Stretch" Content="{ex:Lang Key={x:Static langs:LangKeys.All}}"/>
|
||||||
|
<ScrollViewer x:Name="DropDownScrollViewer" Grid.Row="1">
|
||||||
|
<hc:SimplePanel>
|
||||||
|
<Canvas HorizontalAlignment="Left" Height="0" VerticalAlignment="Top" Width="0">
|
||||||
|
<Rectangle x:Name="opaqueRect" Fill="{Binding Background, ElementName=dropDownBorder}" Height="{Binding ActualHeight, ElementName=dropDownBorder}" Width="{Binding ActualWidth, ElementName=dropDownBorder}"/>
|
||||||
|
</Canvas>
|
||||||
|
<ItemsPresenter x:Name="ItemsPresenter" KeyboardNavigation.DirectionalNavigation="Contained" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||||
|
</hc:SimplePanel>
|
||||||
|
</ScrollViewer>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
</Popup>
|
||||||
|
<ToggleButton Grid.Column="1" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Padding="{TemplateBinding Padding}" Content="{Binding Path=(hc:InfoElement.Placeholder),RelativeSource={RelativeSource TemplatedParent}}" x:Name="toggleButton" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.ColumnSpan="2" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource CheckComboBoxWatermarkToggleButton}"/>
|
||||||
|
<Border Grid.Column="1" Margin="1,0">
|
||||||
|
<WrapPanel Name="PART_Panel" Margin="3,1,3,4"/>
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="HasItems" Value="false">
|
||||||
|
<Setter Property="Height" TargetName="dropDownBorder" Value="95"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="hc:DropDownElement.ConsistentWidth" Value="True">
|
||||||
|
<Setter Property="MaxWidth" TargetName="dropDownBorder" Value="{Binding ActualWidth, ElementName=toggleButton}"/>
|
||||||
|
<Setter Property="MinWidth" TargetName="dropDownBorder" Value="{Binding ActualWidth, ElementName=toggleButton}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="ScrollViewer.CanContentScroll" SourceName="DropDownScrollViewer" Value="false">
|
||||||
|
<Setter Property="Canvas.Top" TargetName="opaqueRect" Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}"/>
|
||||||
|
<Setter Property="Canvas.Left" TargetName="opaqueRect" Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}"/>
|
||||||
|
</Trigger>
|
||||||
|
<MultiTrigger>
|
||||||
|
<MultiTrigger.Conditions>
|
||||||
|
<Condition Property="IsMouseOver" Value="true" SourceName="toggleButton"/>
|
||||||
|
<Condition Property="IsOpen" Value="false" SourceName="PART_Popup"/>
|
||||||
|
</MultiTrigger.Conditions>
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}"/>
|
||||||
|
</MultiTrigger>
|
||||||
|
<Trigger Property="IsOpen" Value="True" SourceName="PART_Popup">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsFocused" Value="True">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsEnabled" Value="false">
|
||||||
|
<Setter Property="Opacity" Value="0.4" TargetName="toggleButton"/>
|
||||||
|
<Setter Property="Opacity" Value="0.4" TargetName="PART_Panel"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<Style x:Key="CheckComboBoxExtendBaseStyle" BasedOn="{StaticResource CheckComboBoxBaseStyle}" TargetType="hc:CheckComboBox">
|
||||||
|
<Setter Property="Height" Value="Auto"/>
|
||||||
|
<Setter Property="Template" Value="{StaticResource CheckComboBoxExtendTopTemplate}"/>
|
||||||
|
<Setter Property="hc:InfoElement.Symbol" Value="●"/>
|
||||||
|
<Setter Property="hc:InfoElement.ContentHeight" Value="{x:Static system:Double.NaN}"/>
|
||||||
|
<Setter Property="hc:InfoElement.MinContentHeight" Value="{StaticResource DefaultControlHeight}"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="hc:InfoElement.TitlePlacement" Value="Left">
|
||||||
|
<Setter Property="Template" Value="{StaticResource CheckComboBoxExtendLeftTemplate}"/>
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="CheckComboBoxPlusTopTemplate" TargetType="hc:CheckComboBox">
|
||||||
|
<ControlTemplate.Resources>
|
||||||
|
<Storyboard x:Key="StoryboardShow">
|
||||||
|
<ThicknessAnimation Storyboard.TargetName="TextBlockError" Storyboard.TargetProperty="Margin" To="9,0,0,-18" Duration="0:0:.2"/>
|
||||||
|
</Storyboard>
|
||||||
|
<Storyboard x:Key="StoryboardHidden">
|
||||||
|
<ThicknessAnimation Storyboard.TargetName="TextBlockError" Storyboard.TargetProperty="Margin" To="9,0,0,4" Duration="0:0:0"/>
|
||||||
|
</Storyboard>
|
||||||
|
</ControlTemplate.Resources>
|
||||||
|
<Grid >
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight),RelativeSource={RelativeSource TemplatedParent}}" Height="{Binding Path=(hc:InfoElement.ContentHeight),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
<ColumnDefinition Width="Auto" MinWidth="30"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<StackPanel Grid.ColumnSpan="2" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" Margin="{TemplateBinding Padding}">
|
||||||
|
<TextBlock Margin="1,0,0,0" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
|
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
||||||
|
</StackPanel>
|
||||||
|
<Popup Grid.Row="1" Grid.Column="0" x:Name="PART_Popup" PlacementTarget="{Binding ElementName=toggleButton}" AllowsTransparency="true" Grid.ColumnSpan="2" StaysOpen="False" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Margin="1" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
||||||
|
<Border CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1" Background="{DynamicResource RegionBrush}">
|
||||||
|
<Grid Margin="0,4" ClipToBounds="False">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<hc:CheckComboBoxItem x:Name="PART_SelectAll" Style="{TemplateBinding ItemContainerStyle}" IsEnabled="{TemplateBinding ShowSelectAllButton}" Visibility="{Binding ShowSelectAllButton,RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" HorizontalContentAlignment="Stretch" Content="{ex:Lang Key={x:Static langs:LangKeys.All}}"/>
|
||||||
|
<ScrollViewer x:Name="DropDownScrollViewer" Grid.Row="1">
|
||||||
|
<hc:SimplePanel>
|
||||||
|
<Canvas HorizontalAlignment="Left" Height="0" VerticalAlignment="Top" Width="0">
|
||||||
|
<Rectangle x:Name="opaqueRect" Fill="{Binding Background, ElementName=dropDownBorder}" Height="{Binding ActualHeight, ElementName=dropDownBorder}" Width="{Binding ActualWidth, ElementName=dropDownBorder}"/>
|
||||||
|
</Canvas>
|
||||||
|
<ItemsPresenter x:Name="ItemsPresenter" KeyboardNavigation.DirectionalNavigation="Contained" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||||
|
</hc:SimplePanel>
|
||||||
|
</ScrollViewer>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
</Popup>
|
||||||
|
<TextBlock Grid.Column="0" Grid.ColumnSpan="2" FontSize="12" Text="{TemplateBinding ErrorStr}" Name="TextBlockError" VerticalAlignment="Bottom" Margin="9,0,0,4" Foreground="{DynamicResource DangerBrush}" Grid.Row="1"/>
|
||||||
|
<ToggleButton Grid.Row="1" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Padding="{TemplateBinding Padding}" Content="{Binding Path=(hc:InfoElement.Placeholder),RelativeSource={RelativeSource TemplatedParent}}" Grid.Column="0" x:Name="toggleButton" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.ColumnSpan="2" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource CheckComboBoxWatermarkToggleButton}"/>
|
||||||
|
<Border Grid.Row="1" Grid.Column="0" Margin="1,0">
|
||||||
|
<WrapPanel Name="PART_Panel" Margin="3,1,3,4"/>
|
||||||
|
</Border>
|
||||||
|
<Button Grid.Row="1" Command="interactivity:ControlCommands.Clear" Margin="0,0,26,0" Visibility="Collapsed" Name="ButtonClear" Width="16" Grid.Column="1" Style="{StaticResource ButtonIcon}" Padding="0,6" hc:IconElement.Geometry="{StaticResource DeleteFillCircleGeometry}" Foreground="{TemplateBinding BorderBrush}"/>
|
||||||
|
</Grid>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="HasItems" Value="false">
|
||||||
|
<Setter Property="Height" TargetName="dropDownBorder" Value="95"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="hc:DropDownElement.ConsistentWidth" Value="True">
|
||||||
|
<Setter Property="MaxWidth" TargetName="dropDownBorder" Value="{Binding ActualWidth, ElementName=toggleButton}"/>
|
||||||
|
<Setter Property="MinWidth" TargetName="dropDownBorder" Value="{Binding ActualWidth, ElementName=toggleButton}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="ScrollViewer.CanContentScroll" SourceName="DropDownScrollViewer" Value="false">
|
||||||
|
<Setter Property="Canvas.Top" TargetName="opaqueRect" Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}"/>
|
||||||
|
<Setter Property="Canvas.Left" TargetName="opaqueRect" Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}"/>
|
||||||
|
</Trigger>
|
||||||
|
<MultiTrigger>
|
||||||
|
<MultiTrigger.Conditions>
|
||||||
|
<Condition Property="IsMouseOver" Value="true" SourceName="toggleButton"/>
|
||||||
|
<Condition Property="IsOpen" Value="false" SourceName="PART_Popup"/>
|
||||||
|
</MultiTrigger.Conditions>
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}"/>
|
||||||
|
</MultiTrigger>
|
||||||
|
<MultiTrigger>
|
||||||
|
<MultiTrigger.Conditions>
|
||||||
|
<Condition Property="IsMouseOver" Value="true" SourceName="ButtonClear"/>
|
||||||
|
<Condition Property="IsOpen" Value="false" SourceName="PART_Popup"/>
|
||||||
|
</MultiTrigger.Conditions>
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}"/>
|
||||||
|
</MultiTrigger>
|
||||||
|
<MultiTrigger>
|
||||||
|
<MultiTrigger.Conditions>
|
||||||
|
<Condition Property="IsMouseOver" Value="true" SourceName="toggleButton"/>
|
||||||
|
<Condition Property="ShowClearButton" Value="True"/>
|
||||||
|
</MultiTrigger.Conditions>
|
||||||
|
<Setter Property="Visibility" Value="Visible" TargetName="ButtonClear"/>
|
||||||
|
</MultiTrigger>
|
||||||
|
<MultiTrigger>
|
||||||
|
<MultiTrigger.Conditions>
|
||||||
|
<Condition Property="IsMouseOver" Value="true" SourceName="ButtonClear"/>
|
||||||
|
<Condition Property="ShowClearButton" Value="True"/>
|
||||||
|
</MultiTrigger.Conditions>
|
||||||
|
<Setter Property="Visibility" Value="Visible" TargetName="ButtonClear"/>
|
||||||
|
</MultiTrigger>
|
||||||
|
<Trigger Property="IsOpen" Value="True" SourceName="PART_Popup">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsFocused" Value="True">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsError" Value="true">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource DangerBrush}"/>
|
||||||
|
<Trigger.EnterActions>
|
||||||
|
<BeginStoryboard Storyboard="{StaticResource StoryboardShow}"/>
|
||||||
|
</Trigger.EnterActions>
|
||||||
|
<Trigger.ExitActions>
|
||||||
|
<BeginStoryboard Storyboard="{StaticResource StoryboardHidden}"/>
|
||||||
|
</Trigger.ExitActions>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsEnabled" Value="false">
|
||||||
|
<Setter Property="Opacity" Value="0.4" TargetName="toggleButton"/>
|
||||||
|
<Setter Property="Opacity" Value="0.4" TargetName="PART_Panel"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="CheckComboBoxPlusLeftTemplate" TargetType="hc:CheckComboBox">
|
||||||
|
<ControlTemplate.Resources>
|
||||||
|
<Storyboard x:Key="StoryboardShow">
|
||||||
|
<ThicknessAnimation Storyboard.TargetName="TextBlockError" Storyboard.TargetProperty="Margin" To="9,0,0,-18" Duration="0:0:.2"/>
|
||||||
|
</Storyboard>
|
||||||
|
<Storyboard x:Key="StoryboardHidden">
|
||||||
|
<ThicknessAnimation Storyboard.TargetName="TextBlockError" Storyboard.TargetProperty="Margin" To="9,0,0,4" Duration="0:0:0"/>
|
||||||
|
</Storyboard>
|
||||||
|
</ControlTemplate.Resources>
|
||||||
|
<Grid x:Name="templateRoot" SnapsToDevicePixels="true" MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight),RelativeSource={RelativeSource TemplatedParent}}" Height="{Binding Path=(hc:InfoElement.ContentHeight),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Double2GridLengthConverter}}">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="{Binding Path=(hc:InfoElement.TitleWidth),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
<ColumnDefinition Width="Auto" MinWidth="30"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<StackPanel VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="0,7,6,7" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal">
|
||||||
|
<TextBlock Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
|
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
||||||
|
</StackPanel>
|
||||||
|
<Popup Grid.Column="1" x:Name="PART_Popup" PlacementTarget="{Binding ElementName=toggleButton}" AllowsTransparency="true" Grid.ColumnSpan="2" StaysOpen="False" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Margin="1" PopupAnimation="{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
|
||||||
|
<Border CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MaxHeight="{TemplateBinding MaxDropDownHeight}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1" Background="{DynamicResource RegionBrush}">
|
||||||
|
<Grid Margin="0,4" ClipToBounds="False">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<hc:CheckComboBoxItem x:Name="PART_SelectAll" Style="{TemplateBinding ItemContainerStyle}" IsEnabled="{TemplateBinding ShowSelectAllButton}" Visibility="{Binding ShowSelectAllButton,RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" HorizontalContentAlignment="Stretch" Content="{ex:Lang Key={x:Static langs:LangKeys.All}}"/>
|
||||||
|
<ScrollViewer x:Name="DropDownScrollViewer" Grid.Row="1">
|
||||||
|
<hc:SimplePanel>
|
||||||
|
<Canvas HorizontalAlignment="Left" Height="0" VerticalAlignment="Top" Width="0">
|
||||||
|
<Rectangle x:Name="opaqueRect" Fill="{Binding Background, ElementName=dropDownBorder}" Height="{Binding ActualHeight, ElementName=dropDownBorder}" Width="{Binding ActualWidth, ElementName=dropDownBorder}"/>
|
||||||
|
</Canvas>
|
||||||
|
<ItemsPresenter x:Name="ItemsPresenter" KeyboardNavigation.DirectionalNavigation="Contained" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||||
|
</hc:SimplePanel>
|
||||||
|
</ScrollViewer>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
</Popup>
|
||||||
|
<TextBlock Grid.Column="1" Grid.ColumnSpan="2" FontSize="12" Text="{TemplateBinding ErrorStr}" Name="TextBlockError" VerticalAlignment="Bottom" Margin="9,0,0,4" Foreground="{DynamicResource DangerBrush}"/>
|
||||||
|
<ToggleButton Grid.Column="1" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Padding="{TemplateBinding Padding}" Content="{Binding Path=(hc:InfoElement.Placeholder),RelativeSource={RelativeSource TemplatedParent}}" x:Name="toggleButton" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.ColumnSpan="2" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource CheckComboBoxWatermarkToggleButton}"/>
|
||||||
|
<Border Grid.Column="1" Margin="1,0">
|
||||||
|
<WrapPanel Name="PART_Panel" Margin="3,1,3,4"/>
|
||||||
|
</Border>
|
||||||
|
<Button Command="interactivity:ControlCommands.Clear" Margin="0,0,26,0" Visibility="Collapsed" Name="ButtonClear" Width="16" Grid.Column="2" Style="{StaticResource ButtonIcon}" Padding="0,6" hc:IconElement.Geometry="{StaticResource DeleteFillCircleGeometry}" Foreground="{TemplateBinding BorderBrush}"/>
|
||||||
|
</Grid>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="HasItems" Value="false">
|
||||||
|
<Setter Property="Height" TargetName="dropDownBorder" Value="95"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="hc:DropDownElement.ConsistentWidth" Value="True">
|
||||||
|
<Setter Property="MaxWidth" TargetName="dropDownBorder" Value="{Binding ActualWidth, ElementName=toggleButton}"/>
|
||||||
|
<Setter Property="MinWidth" TargetName="dropDownBorder" Value="{Binding ActualWidth, ElementName=toggleButton}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="ScrollViewer.CanContentScroll" SourceName="DropDownScrollViewer" Value="false">
|
||||||
|
<Setter Property="Canvas.Top" TargetName="opaqueRect" Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}"/>
|
||||||
|
<Setter Property="Canvas.Left" TargetName="opaqueRect" Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}"/>
|
||||||
|
</Trigger>
|
||||||
|
<MultiTrigger>
|
||||||
|
<MultiTrigger.Conditions>
|
||||||
|
<Condition Property="IsMouseOver" Value="true" SourceName="toggleButton"/>
|
||||||
|
<Condition Property="IsOpen" Value="false" SourceName="PART_Popup"/>
|
||||||
|
</MultiTrigger.Conditions>
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}"/>
|
||||||
|
</MultiTrigger>
|
||||||
|
<MultiTrigger>
|
||||||
|
<MultiTrigger.Conditions>
|
||||||
|
<Condition Property="IsMouseOver" Value="true" SourceName="ButtonClear"/>
|
||||||
|
<Condition Property="IsOpen" Value="false" SourceName="PART_Popup"/>
|
||||||
|
</MultiTrigger.Conditions>
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}"/>
|
||||||
|
</MultiTrigger>
|
||||||
|
<MultiTrigger>
|
||||||
|
<MultiTrigger.Conditions>
|
||||||
|
<Condition Property="IsMouseOver" Value="true" SourceName="toggleButton"/>
|
||||||
|
<Condition Property="ShowClearButton" Value="True"/>
|
||||||
|
</MultiTrigger.Conditions>
|
||||||
|
<Setter Property="Visibility" Value="Visible" TargetName="ButtonClear"/>
|
||||||
|
</MultiTrigger>
|
||||||
|
<MultiTrigger>
|
||||||
|
<MultiTrigger.Conditions>
|
||||||
|
<Condition Property="IsMouseOver" Value="true" SourceName="ButtonClear"/>
|
||||||
|
<Condition Property="ShowClearButton" Value="True"/>
|
||||||
|
</MultiTrigger.Conditions>
|
||||||
|
<Setter Property="Visibility" Value="Visible" TargetName="ButtonClear"/>
|
||||||
|
</MultiTrigger>
|
||||||
|
<Trigger Property="IsOpen" Value="True" SourceName="PART_Popup">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsFocused" Value="True">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsError" Value="true">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource DangerBrush}"/>
|
||||||
|
<Trigger.EnterActions>
|
||||||
|
<BeginStoryboard Storyboard="{StaticResource StoryboardShow}"/>
|
||||||
|
</Trigger.EnterActions>
|
||||||
|
<Trigger.ExitActions>
|
||||||
|
<BeginStoryboard Storyboard="{StaticResource StoryboardHidden}"/>
|
||||||
|
</Trigger.ExitActions>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsEnabled" Value="false">
|
||||||
|
<Setter Property="Opacity" Value="0.4" TargetName="toggleButton"/>
|
||||||
|
<Setter Property="Opacity" Value="0.4" TargetName="PART_Panel"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<Style x:Key="CheckComboBoxPlusBaseStyle" BasedOn="{StaticResource CheckComboBoxExtendBaseStyle}" TargetType="hc:CheckComboBox">
|
||||||
|
<Setter Property="Template" Value="{StaticResource CheckComboBoxPlusTopTemplate}"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="hc:InfoElement.TitlePlacement" Value="Left">
|
||||||
|
<Setter Property="Template" Value="{StaticResource CheckComboBoxPlusLeftTemplate}"/>
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
</ResourceDictionary>
|
@ -0,0 +1,246 @@
|
|||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:langs="clr-namespace:HandyControl.Properties.Langs"
|
||||||
|
xmlns:hc="clr-namespace:HandyControl.Controls"
|
||||||
|
xmlns:interactivity="clr-namespace:HandyControl.Interactivity"
|
||||||
|
xmlns:ex="clr-namespace:HandyControl.Tools.Extension"
|
||||||
|
xmlns:themes="clr-namespace:HandyControl.Themes">
|
||||||
|
|
||||||
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Basic/Paths.xaml"/>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Basic/Converters.xaml"/>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Styles/Slider.xaml"/>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Styles/Button.xaml"/>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Styles/ToggleButton.xaml"/>
|
||||||
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
|
||||||
|
<Style x:Key="ColorPickerSliderRepeatButtonBaseStyle" TargetType="RepeatButton">
|
||||||
|
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
||||||
|
<Setter Property="Background" Value="Transparent"/>
|
||||||
|
<Setter Property="Focusable" Value="false"/>
|
||||||
|
<Setter Property="IsTabStop" Value="false"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="RepeatButton">
|
||||||
|
<Rectangle Fill="{TemplateBinding Background}" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}"/>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="ColorPickerSliderThumbTemplate" TargetType="Thumb">
|
||||||
|
<Border Width="13" Height="13" Background="White" CornerRadius="6.5"/>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="ColorPickerSliderHorizontal" TargetType="Slider">
|
||||||
|
<hc:SimplePanel>
|
||||||
|
<Border Margin="7,0" Background="{TemplateBinding Background}" MaxHeight="11" CornerRadius="2"/>
|
||||||
|
<Border Margin="7,0" Background="{TemplateBinding Foreground}" MaxHeight="11" CornerRadius="2">
|
||||||
|
<Border.OpacityMask>
|
||||||
|
<LinearGradientBrush EndPoint="0,0.5" StartPoint="1,0.5">
|
||||||
|
<GradientStop Color="Transparent" Offset="1"/>
|
||||||
|
<GradientStop Color="White" Offset="0"/>
|
||||||
|
</LinearGradientBrush>
|
||||||
|
</Border.OpacityMask>
|
||||||
|
</Border>
|
||||||
|
<Track x:Name="PART_Track">
|
||||||
|
<Track.DecreaseRepeatButton>
|
||||||
|
<RepeatButton Command="{x:Static Slider.DecreaseLarge}" Style="{StaticResource ColorPickerSliderRepeatButtonBaseStyle}"/>
|
||||||
|
</Track.DecreaseRepeatButton>
|
||||||
|
<Track.IncreaseRepeatButton>
|
||||||
|
<RepeatButton Command="{x:Static Slider.IncreaseLarge}" Style="{StaticResource ColorPickerSliderRepeatButtonBaseStyle}"/>
|
||||||
|
</Track.IncreaseRepeatButton>
|
||||||
|
<Track.Thumb>
|
||||||
|
<Thumb x:Name="Thumb" Focusable="False" Height="13" Width="13" OverridesDefaultStyle="True" Template="{StaticResource ColorPickerSliderThumbTemplate}" VerticalAlignment="Center">
|
||||||
|
<Thumb.Effect>
|
||||||
|
<DropShadowEffect ShadowDepth="0" Opacity=".6"/>
|
||||||
|
</Thumb.Effect>
|
||||||
|
</Thumb>
|
||||||
|
</Track.Thumb>
|
||||||
|
</Track>
|
||||||
|
</hc:SimplePanel>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="ColorPickerSliderVertical" TargetType="Slider">
|
||||||
|
<hc:SimplePanel>
|
||||||
|
<Border Margin="0,7" CornerRadius="2" MaxWidth="11" Background="{TemplateBinding Background}"/>
|
||||||
|
<Border Margin="0,7" CornerRadius="2" MaxWidth="11" Background="{TemplateBinding Foreground}">
|
||||||
|
<Border.OpacityMask>
|
||||||
|
<LinearGradientBrush EndPoint="0,0.5" StartPoint="1,0.5">
|
||||||
|
<GradientStop Color="Transparent" Offset="1"/>
|
||||||
|
<GradientStop Color="White" Offset="0"/>
|
||||||
|
</LinearGradientBrush>
|
||||||
|
</Border.OpacityMask>
|
||||||
|
</Border>
|
||||||
|
<Track x:Name="PART_Track">
|
||||||
|
<Track.DecreaseRepeatButton>
|
||||||
|
<RepeatButton Command="{x:Static Slider.DecreaseLarge}" Style="{StaticResource ColorPickerSliderRepeatButtonBaseStyle}"/>
|
||||||
|
</Track.DecreaseRepeatButton>
|
||||||
|
<Track.IncreaseRepeatButton>
|
||||||
|
<RepeatButton Command="{x:Static Slider.IncreaseLarge}" Style="{StaticResource ColorPickerSliderRepeatButtonBaseStyle}"/>
|
||||||
|
</Track.IncreaseRepeatButton>
|
||||||
|
<Track.Thumb>
|
||||||
|
<Thumb x:Name="Thumb" Focusable="False" Height="13" OverridesDefaultStyle="True" Template="{StaticResource ColorPickerSliderThumbTemplate}" VerticalAlignment="Top" Width="13">
|
||||||
|
<Thumb.Effect>
|
||||||
|
<DropShadowEffect ShadowDepth="0" Opacity=".6"/>
|
||||||
|
</Thumb.Effect>
|
||||||
|
</Thumb>
|
||||||
|
</Track.Thumb>
|
||||||
|
</Track>
|
||||||
|
</hc:SimplePanel>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<Style x:Key="ColorPickerSlider" BasedOn="{StaticResource BaseStyle}" TargetType="Slider">
|
||||||
|
<Setter Property="Stylus.IsPressAndHoldEnabled" Value="false"/>
|
||||||
|
<Setter Property="Background" Value="Transparent"/>
|
||||||
|
<Setter Property="BorderBrush" Value="Transparent"/>
|
||||||
|
<Setter Property="Foreground" Value="Transparent"/>
|
||||||
|
<Setter Property="Template" Value="{StaticResource ColorPickerSliderHorizontal}"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="Orientation" Value="Vertical">
|
||||||
|
<Setter Property="Template" Value="{StaticResource ColorPickerSliderVertical}"/>
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<LinearGradientBrush x:Key="ColorPickerRainbowBrush">
|
||||||
|
<GradientStop Color="#ff0000"/>
|
||||||
|
<GradientStop Color="#ff00ff" Offset="0.167"/>
|
||||||
|
<GradientStop Color="#0000ff" Offset="0.334"/>
|
||||||
|
<GradientStop Color="#00ffff" Offset="0.501"/>
|
||||||
|
<GradientStop Color="#00ff00" Offset="0.668"/>
|
||||||
|
<GradientStop Color="#ffff00" Offset="0.835"/>
|
||||||
|
<GradientStop Color="#ff0000" Offset="1"/>
|
||||||
|
</LinearGradientBrush>
|
||||||
|
|
||||||
|
<DrawingBrush x:Key="ColorPickerOpacityBrush" Viewport="0,0,12,11" ViewportUnits="Absolute" Stretch="None" TileMode="Tile">
|
||||||
|
<DrawingBrush.Drawing>
|
||||||
|
<DrawingGroup>
|
||||||
|
<GeometryDrawing Brush="#d0cec7">
|
||||||
|
<GeometryDrawing.Geometry>
|
||||||
|
<GeometryGroup>
|
||||||
|
<RectangleGeometry Rect="0,0,6,5" />
|
||||||
|
<RectangleGeometry Rect="6,6,6,5" />
|
||||||
|
</GeometryGroup>
|
||||||
|
</GeometryDrawing.Geometry>
|
||||||
|
</GeometryDrawing>
|
||||||
|
<GeometryDrawing Brush="#e7e7e2">
|
||||||
|
<GeometryDrawing.Geometry>
|
||||||
|
<RectangleGeometry Rect="0,5,12,1" />
|
||||||
|
</GeometryDrawing.Geometry>
|
||||||
|
</GeometryDrawing>
|
||||||
|
</DrawingGroup>
|
||||||
|
</DrawingBrush.Drawing>
|
||||||
|
</DrawingBrush>
|
||||||
|
|
||||||
|
<Style x:Key="ColorPickerBaseStyle" TargetType="hc:ColorPicker">
|
||||||
|
<Setter Property="Focusable" Value="False"/>
|
||||||
|
<Setter Property="Width" Value="230"/>
|
||||||
|
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="hc:ColorPicker">
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="122"/>
|
||||||
|
<RowDefinition Height="110"/>
|
||||||
|
<RowDefinition Height="62"/>
|
||||||
|
<RowDefinition Height="62"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Border BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}" Grid.RowSpan="4" Background="{TemplateBinding Background}"/>
|
||||||
|
<hc:SimplePanel Margin="1" Grid.Row="0">
|
||||||
|
<Border Background="{TemplateBinding BackColor}"/>
|
||||||
|
<Border>
|
||||||
|
<Border.Background>
|
||||||
|
<LinearGradientBrush EndPoint="0,0.5" StartPoint="1,0.5">
|
||||||
|
<GradientStop Color="White" Offset="1"/>
|
||||||
|
<GradientStop Color="#80ffffff" Offset=".5"/>
|
||||||
|
<GradientStop Color="#00ffffff"/>
|
||||||
|
</LinearGradientBrush>
|
||||||
|
</Border.Background>
|
||||||
|
</Border>
|
||||||
|
<Border>
|
||||||
|
<Border.Background>
|
||||||
|
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
|
||||||
|
<GradientStop Color="Black" Offset="1"/>
|
||||||
|
<GradientStop Color="#80000000" Offset=".5"/>
|
||||||
|
<GradientStop Color="#00000000"/>
|
||||||
|
</LinearGradientBrush>
|
||||||
|
</Border.Background>
|
||||||
|
</Border>
|
||||||
|
</hc:SimplePanel>
|
||||||
|
<Border Name="PART_BorderColor" Grid.Row="0" CornerRadius="2,2,0,0" ClipToBounds="True">
|
||||||
|
<Canvas Margin="-6">
|
||||||
|
<Border Name="PART_BorderPicker" Background="Transparent" Height="12" CornerRadius="6" Width="12" BorderThickness="1" BorderBrush="White">
|
||||||
|
<Border.Effect>
|
||||||
|
<DropShadowEffect ShadowDepth="0" Opacity=".4"/>
|
||||||
|
</Border.Effect>
|
||||||
|
</Border>
|
||||||
|
</Canvas>
|
||||||
|
</Border>
|
||||||
|
<Border Grid.Row="0" Background="Transparent" Name="PART_BorderDrag"/>
|
||||||
|
<Grid Margin="16,16,10,0" Grid.Row="1">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
<ColumnDefinition Width="28"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<ToggleButton Name="PART_ButtonDropper" Width="16" Height="16" Margin="0,0,10,0" Style="{StaticResource ToggleButtonCustom}" hc:StatusSwitchElement.HideUncheckedElement="True">
|
||||||
|
<Path Data="{StaticResource DropperGeometry}" Fill="{DynamicResource PrimaryTextBrush}"/>
|
||||||
|
<hc:StatusSwitchElement.CheckedElement>
|
||||||
|
<Path Data="{StaticResource DropperGeometry}" Fill="{DynamicResource DarkPrimaryBrush}"/>
|
||||||
|
</hc:StatusSwitchElement.CheckedElement>
|
||||||
|
</ToggleButton>
|
||||||
|
<Border Grid.Row="0" Grid.Column="1" Width="32" Height="32" CornerRadius="16" Background="{StaticResource ColorPickerOpacityBrush}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1"/>
|
||||||
|
<Border Grid.Row="0" Grid.Column="1" Width="32" Height="32" CornerRadius="16" Background="{TemplateBinding SelectedBrush}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1"/>
|
||||||
|
<Slider Name="PART_SliderColor" LargeChange="0.01" SmallChange="0.01" Grid.ColumnSpan="2" Value="6" Maximum="6" Background="{StaticResource ColorPickerRainbowBrush}" Margin="2,1,0,0" Grid.Row="0" Grid.Column="2" VerticalAlignment="Top" Style="{StaticResource ColorPickerSlider}" IsMoveToPointEnabled="True"/>
|
||||||
|
<Slider Name="PART_SliderOpacity" Grid.ColumnSpan="2" IsSnapToTickEnabled="True" Value="{Binding ChannelA,RelativeSource={RelativeSource TemplatedParent},Mode=TwoWay}" Maximum="255" SmallChange="1" Foreground="{TemplateBinding SelectedBrushWithoutOpacity}" Background="{StaticResource ColorPickerOpacityBrush}" Margin="2,0,0,0" Grid.Row="0" Grid.Column="2" VerticalAlignment="Bottom" Style="{StaticResource ColorPickerSlider}" IsMoveToPointEnabled="True"/>
|
||||||
|
<StackPanel Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="3" Margin="0,14,0,0" VerticalAlignment="Top" Visibility="{Binding ShowList[0],RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}">
|
||||||
|
<TextBox Padding="0" HorizontalContentAlignment="Center" Width="176" Text="{Binding SelectedBrush,RelativeSource={RelativeSource TemplatedParent},Mode=TwoWay,Converter={StaticResource Color2HexStringConverter},UpdateSourceTrigger=LostFocus}" FontSize="10" MaxLength="10" Height="24" />
|
||||||
|
<TextBlock Foreground="{DynamicResource ThirdlyTextBrush}" Margin="0,2,0,0" FontSize="10" Text="HEX" HorizontalAlignment="Center"/>
|
||||||
|
</StackPanel>
|
||||||
|
<UniformGrid Name="PART_PanelRgb" Visibility="{Binding ShowList[1],RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" Rows="1" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="3" Margin="-2,14,-2,0" VerticalAlignment="Top">
|
||||||
|
<StackPanel Margin="2,0">
|
||||||
|
<hc:NumericUpDown HorizontalContentAlignment="Center" Padding="2,0" Tag="R" Value="{Binding ChannelR,RelativeSource={RelativeSource TemplatedParent},Mode=TwoWay}" ShowUpDownButton="False" Maximum="255" Minimum="0" FontSize="10" Height="24" />
|
||||||
|
<TextBlock Foreground="{DynamicResource ThirdlyTextBrush}" Margin="0,2,0,0" FontSize="10" Text="R" HorizontalAlignment="Center"/>
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Margin="2,0">
|
||||||
|
<hc:NumericUpDown HorizontalContentAlignment="Center" Padding="0" Tag="G" Value="{Binding ChannelG,RelativeSource={RelativeSource TemplatedParent},Mode=TwoWay}" ShowUpDownButton="False" Maximum="255" Minimum="0" FontSize="10" Height="24" />
|
||||||
|
<TextBlock Foreground="{DynamicResource ThirdlyTextBrush}" Margin="0,2,0,0" FontSize="10" Text="G" HorizontalAlignment="Center"/>
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Margin="2,0">
|
||||||
|
<hc:NumericUpDown HorizontalContentAlignment="Center" Padding="0" Tag="B" Value="{Binding ChannelB,RelativeSource={RelativeSource TemplatedParent},Mode=TwoWay}" ShowUpDownButton="False" Maximum="255" Minimum="0" FontSize="10" Height="24" />
|
||||||
|
<TextBlock Foreground="{DynamicResource ThirdlyTextBrush}" Margin="0,2,0,0" FontSize="10" Text="B" HorizontalAlignment="Center"/>
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Margin="2,0">
|
||||||
|
<hc:NumericUpDown HorizontalContentAlignment="Center" Padding="0" Value="{Binding ChannelA,RelativeSource={RelativeSource TemplatedParent},Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" ShowUpDownButton="False" Maximum="255" Minimum="0" FontSize="10" Height="24" />
|
||||||
|
<TextBlock Foreground="{DynamicResource ThirdlyTextBrush}" Margin="0,2,0,0" FontSize="10" Text="A" HorizontalAlignment="Center"/>
|
||||||
|
</StackPanel>
|
||||||
|
</UniformGrid>
|
||||||
|
<Button Command="interactivity:ControlCommands.Switch" Padding="6" FontSize="8" BorderThickness="0" HorizontalAlignment="Right" Height="24" Width="20" Grid.Column="3" Grid.Row="1">
|
||||||
|
<Button.Content>
|
||||||
|
<Path Fill="#323534" Style="{StaticResource UpDownPathStyle}"/>
|
||||||
|
</Button.Content>
|
||||||
|
</Button>
|
||||||
|
</Grid>
|
||||||
|
<Border Grid.Row="2" BorderThickness="0,1,0,0" BorderBrush="{DynamicResource BorderBrush}">
|
||||||
|
<WrapPanel Name="PART_PanelColor" Margin="6" HorizontalAlignment="Center"/>
|
||||||
|
</Border>
|
||||||
|
<Border Grid.Row="3" BorderThickness="0,1,0,0" BorderBrush="{DynamicResource BorderBrush}">
|
||||||
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||||
|
<Button Command="interactivity:ControlCommands.Cancel" Content="{ex:Lang Key={x:Static langs:LangKeys.Cancel}}" Width="80" Margin="0,0,16,0"/>
|
||||||
|
<Button Command="interactivity:ControlCommands.Confirm" Content="{ex:Lang Key={x:Static langs:LangKeys.Confirm}}" Width="80" Style="{StaticResource ButtonPrimary}"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
</ResourceDictionary>
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1 @@
|
|||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"/>
|
@ -0,0 +1 @@
|
|||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"/>
|
@ -0,0 +1,91 @@
|
|||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:hc="clr-namespace:HandyControl.Controls"
|
||||||
|
xmlns:themes="clr-namespace:HandyControl.Themes">
|
||||||
|
|
||||||
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Styles/Base/BaseStyle.xaml"/>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Basic/Sizes.xaml"/>
|
||||||
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
|
||||||
|
<!--默认ListBoxItem样式-->
|
||||||
|
<Style x:Key="ListBoxItemBaseStyle" BasedOn="{StaticResource BaseStyle}" TargetType="ListBoxItem">
|
||||||
|
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisualRadius0Margin0}"/>
|
||||||
|
<Setter Property="SnapsToDevicePixels" Value="True"/>
|
||||||
|
<Setter Property="Padding" Value="10,0"/>
|
||||||
|
<Setter Property="MinHeight" Value="{StaticResource DefaultControlHeight}"/>
|
||||||
|
<Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType=ItemsControl}}"/>
|
||||||
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||||
|
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
|
||||||
|
<Setter Property="BorderBrush" Value="Transparent"/>
|
||||||
|
<Setter Property="BorderThickness" Value="0"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="ListBoxItem">
|
||||||
|
<Border x:Name="Bd" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
|
||||||
|
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||||
|
</Border>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="true">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsSelected" Value="true">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource PrimaryBrush}"/>
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource TextIconBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<MultiTrigger>
|
||||||
|
<MultiTrigger.Conditions>
|
||||||
|
<Condition Property="IsSelected" Value="true"/>
|
||||||
|
<Condition Property="Selector.IsSelectionActive" Value="false"/>
|
||||||
|
</MultiTrigger.Conditions>
|
||||||
|
<Setter Property="Background" Value="{DynamicResource DarkDefaultBrush}"/>
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
|
||||||
|
</MultiTrigger>
|
||||||
|
<Trigger Property="IsEnabled" Value="false">
|
||||||
|
<Setter Property="Opacity" Value=".4"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="hc:EdgeElement.ShowEdgeContent" Value="true">
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="ListBoxItem">
|
||||||
|
<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<ContentControl Width="16" Height="16" Content="{Binding Path=(hc:EdgeElement.LeftContent),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
|
<ContentPresenter Margin="6,0,0,0" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ListBoxBaseStyle" TargetType="ListBox">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
|
||||||
|
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
|
||||||
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
|
<Setter Property="hc:ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
|
||||||
|
<Setter Property="hc:ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
|
||||||
|
<Setter Property="hc:ScrollViewer.CanContentScroll" Value="true"/>
|
||||||
|
<Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
|
||||||
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||||
|
<Setter Property="ItemContainerStyle" Value="{StaticResource ListBoxItemBaseStyle}"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="ListBox">
|
||||||
|
<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="true">
|
||||||
|
<hc:ScrollViewer Focusable="false">
|
||||||
|
<ItemsPresenter Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||||
|
</hc:ScrollViewer>
|
||||||
|
</Border>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
</ResourceDictionary>
|
@ -0,0 +1,216 @@
|
|||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:hc="clr-namespace:HandyControl.Controls"
|
||||||
|
xmlns:themes="clr-namespace:HandyControl.Themes">
|
||||||
|
|
||||||
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Basic/Effects.xaml"/>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Basic/Geometries.xaml"/>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Styles/ScrollViewer.xaml"/>
|
||||||
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
|
||||||
|
<Style x:Key="MenuItemBaseStyle" TargetType="MenuItem">
|
||||||
|
<Setter Property="Padding" Value="{StaticResource DefaultControlPadding}"/>
|
||||||
|
<Setter Property="OverridesDefaultStyle" Value="True"/>
|
||||||
|
<Setter Property="Background" Value="Transparent"/>
|
||||||
|
<Setter Property="BorderThickness" Value="0"/>
|
||||||
|
<Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="MenuItem">
|
||||||
|
<Border x:Name="Bd" MinWidth="240" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
|
||||||
|
<Grid x:Name="Grid" Margin="{TemplateBinding Padding}">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="26"/>
|
||||||
|
<ColumnDefinition Width="*"/>
|
||||||
|
<ColumnDefinition Width="30"/>
|
||||||
|
<ColumnDefinition SharedSizeGroup="MenuItemIGTColumnGroup" Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="20"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<ContentPresenter Margin="0,0,10,0" x:Name="Icon" ContentSource="Icon" HorizontalAlignment="Right" Height="16" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="Center" Width="16"/>
|
||||||
|
<Border Margin="0,0,10,0" IsHitTestVisible="False" Grid.Column="0" x:Name="GlyphPanel" CornerRadius="2" Background="{DynamicResource PrimaryBrush}" ClipToBounds="False" HorizontalAlignment="Right" Height="16" Visibility="Hidden" VerticalAlignment="Center" Width="16">
|
||||||
|
<Path Width="12" Height="12" Data="{StaticResource CheckedGeometry}" StrokeThickness="2" Stretch="Uniform" Stroke="{DynamicResource TextIconBrush}"/>
|
||||||
|
</Border>
|
||||||
|
<ContentPresenter Grid.Column="1" x:Name="ContentPresenter" ContentTemplate="{TemplateBinding HeaderTemplate}" ContentSource="Header" Margin="0,3" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||||
|
<TextBlock x:Name="InputGestureText" Margin="0,0,10,0" Grid.Column="3" VerticalAlignment="Center" HorizontalAlignment="Left" Text="{TemplateBinding InputGestureText}"/>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsChecked" Value="True">
|
||||||
|
<Setter Property="Visibility" TargetName="GlyphPanel" Value="Visible"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="Icon" Value="{x:Null}">
|
||||||
|
<Setter Property="Visibility" TargetName="Icon" Value="Collapsed"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="Role" Value="TopLevelHeader">
|
||||||
|
<Setter Property="Margin" Value="0"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="MenuItem">
|
||||||
|
<Border MinWidth="44" x:Name="templateRoot" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1,1,1,0" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
|
||||||
|
<Grid VerticalAlignment="Center" Margin="{TemplateBinding Padding}">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<ContentPresenter Margin="0,0,10,0" x:Name="Icon" Visibility="Collapsed" ContentSource="Icon" HorizontalAlignment="Right" Height="16" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="Center" Width="16"/>
|
||||||
|
<Border Margin="0,0,10,0" Grid.Column="0" x:Name="GlyphPanel" CornerRadius="2" Background="{DynamicResource PrimaryBrush}" ClipToBounds="False" HorizontalAlignment="Right" Height="16" Visibility="Collapsed" VerticalAlignment="Center" Width="16">
|
||||||
|
<Path Width="12" Height="12" Data="{StaticResource CheckedGeometry}" StrokeThickness="2" Stretch="Uniform" Stroke="{DynamicResource TextIconBrush}"/>
|
||||||
|
</Border>
|
||||||
|
<ContentPresenter x:Name="menuHeaderContainer" ContentTemplate="{TemplateBinding HeaderTemplate}" Grid.Column="1" ContentStringFormat="{TemplateBinding HeaderStringFormat}" ContentSource="Header" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||||
|
<Popup Grid.Column="0" x:Name="PART_Popup" PlacementTarget="{Binding ElementName=templateRoot}" AllowsTransparency="True" Focusable="False" IsOpen="{Binding IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}" Placement="Bottom">
|
||||||
|
<hc:SimplePanel Effect="{StaticResource EffectShadow2}" Margin="8,0,8,8">
|
||||||
|
<Border CornerRadius="0,0,2,2" x:Name="SubMenuBorder" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}">
|
||||||
|
<ScrollViewer Style="{StaticResource ScrollViewerUpDown}" Margin="0,6">
|
||||||
|
<ItemsPresenter x:Name="ItemsPresenter" KeyboardNavigation.DirectionalNavigation="Cycle" Grid.IsSharedSizeScope="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" KeyboardNavigation.TabNavigation="Cycle"/>
|
||||||
|
</ScrollViewer>
|
||||||
|
</Border>
|
||||||
|
<Border hc:MenuTopLineAttach.Popup="{Binding ElementName=PART_Popup}" Height="1" Background="{DynamicResource RegionBrush}" VerticalAlignment="Top" BorderThickness="1,0" BorderBrush="{DynamicResource BorderBrush}" HorizontalAlignment="Left"/>
|
||||||
|
</hc:SimplePanel>
|
||||||
|
</Popup>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="Icon" Value="{x:Null}">
|
||||||
|
<Setter Property="Visibility" TargetName="Icon" Value="Collapsed"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsChecked" Value="True">
|
||||||
|
<Setter Property="Visibility" TargetName="GlyphPanel" Value="Visible"/>
|
||||||
|
<Setter Property="Visibility" TargetName="Icon" Value="Collapsed"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsHighlighted" Value="True">
|
||||||
|
<Setter Property="Background" TargetName="templateRoot" Value="{DynamicResource SecondaryRegionBrush}"/>
|
||||||
|
<Setter Property="TextElement.Foreground" TargetName="menuHeaderContainer" Value="{DynamicResource PrimaryTextBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsSubmenuOpen" Value="True">
|
||||||
|
<Setter Property="BorderBrush" TargetName="templateRoot" Value="{DynamicResource BorderBrush}"/>
|
||||||
|
<Setter Property="Background" TargetName="templateRoot" Value="{DynamicResource RegionBrush}"/>
|
||||||
|
<Setter Property="TextElement.Foreground" TargetName="menuHeaderContainer" Value="{DynamicResource PrimaryTextBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="Role" Value="TopLevelItem">
|
||||||
|
<Setter Property="Margin" Value="0"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="MenuItem">
|
||||||
|
<Border x:Name="templateRoot" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1,1,1,0" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
|
||||||
|
<Grid Margin="{TemplateBinding Padding}">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<ContentPresenter Margin="0,0,10,0" x:Name="Icon" Visibility="Collapsed" HorizontalAlignment="Left" ContentSource="Icon" Height="16" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="Center" Width="16"/>
|
||||||
|
<Border Margin="0,0,10,0" IsHitTestVisible="False" Grid.Column="0" x:Name="GlyphPanel" CornerRadius="2" Background="{DynamicResource PrimaryBrush}" ClipToBounds="False" HorizontalAlignment="Right" Height="16" Visibility="Collapsed" VerticalAlignment="Center" Width="16">
|
||||||
|
<Path Width="12" Height="12" Data="{StaticResource CheckedGeometry}" StrokeThickness="2" Stretch="Uniform" Stroke="{DynamicResource TextIconBrush}"/>
|
||||||
|
</Border>
|
||||||
|
<ContentPresenter x:Name="menuHeaderContainer" ContentTemplate="{TemplateBinding HeaderTemplate}" Grid.Column="1" ContentStringFormat="{TemplateBinding HeaderStringFormat}" ContentSource="Header" HorizontalAlignment="Left" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="Center"/>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="Icon" Value="{x:Null}">
|
||||||
|
<Setter Property="Visibility" TargetName="Icon" Value="Collapsed"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsChecked" Value="True">
|
||||||
|
<Setter Property="Visibility" TargetName="GlyphPanel" Value="Visible"/>
|
||||||
|
<Setter Property="Visibility" TargetName="Icon" Value="Collapsed"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsHighlighted" Value="True">
|
||||||
|
<Setter Property="Background" TargetName="templateRoot" Value="{DynamicResource SecondaryRegionBrush}"/>
|
||||||
|
<Setter Property="TextElement.Foreground" TargetName="menuHeaderContainer" Value="{DynamicResource PrimaryTextBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsSubmenuOpen" Value="True">
|
||||||
|
<Setter Property="Background" TargetName="templateRoot" Value="White"/>
|
||||||
|
<Setter Property="TextElement.Foreground" TargetName="menuHeaderContainer" Value="{DynamicResource PrimaryTextBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<MultiTrigger>
|
||||||
|
<MultiTrigger.Conditions>
|
||||||
|
<Condition Property="IsHighlighted" Value="True"/>
|
||||||
|
<Condition Property="IsEnabled" Value="False"/>
|
||||||
|
</MultiTrigger.Conditions>
|
||||||
|
<Setter Property="Background" TargetName="templateRoot" Value="#0A000000"/>
|
||||||
|
<Setter Property="BorderBrush" TargetName="templateRoot" Value="#21000000"/>
|
||||||
|
</MultiTrigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="Role" Value="SubmenuHeader">
|
||||||
|
<Setter Property="DockPanel.Dock" Value="Top"/>
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="MenuItem">
|
||||||
|
<Border x:Name="Bd" MinWidth="240" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
|
||||||
|
<Grid x:Name="Grid" Margin="{TemplateBinding Padding}">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="26"/>
|
||||||
|
<ColumnDefinition Width="*"/>
|
||||||
|
<ColumnDefinition Width="30"/>
|
||||||
|
<ColumnDefinition SharedSizeGroup="MenuItemIGTColumnGroup" Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="20"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<ContentPresenter Margin="0,0,10,0" x:Name="Icon" ContentSource="Icon" HorizontalAlignment="Right" Height="16" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="Center" Width="16"/>
|
||||||
|
<Border Margin="0,0,10,0" IsHitTestVisible="False" Grid.Column="0" x:Name="GlyphPanel" CornerRadius="2" Background="{DynamicResource PrimaryBrush}" ClipToBounds="False" HorizontalAlignment="Right" Height="16" Visibility="Hidden" VerticalAlignment="Center" Width="16">
|
||||||
|
<Path Width="12" Height="12" Data="{StaticResource CheckedGeometry}" StrokeThickness="2" Stretch="Uniform" Stroke="{DynamicResource TextIconBrush}"/>
|
||||||
|
</Border>
|
||||||
|
<ContentPresenter TextElement.Foreground="{TemplateBinding Foreground}" Margin="0,3" x:Name="ContentPresenter" ContentTemplate="{TemplateBinding HeaderTemplate}" Grid.Column="1" ContentSource="Header" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||||
|
<Path x:Name="Path" Grid.Column="4" Width="10" Height="10" HorizontalAlignment="Left" Data="{StaticResource RightGeometry}" Stretch="Uniform" Fill="{TemplateBinding Foreground}" VerticalAlignment="Center"/>
|
||||||
|
<Popup Grid.Column="1" x:Name="PART_Popup" AllowsTransparency="True" Focusable="False" IsOpen="{Binding IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}" Placement="Right" VerticalOffset="-13" HorizontalOffset="10">
|
||||||
|
<Border Effect="{StaticResource EffectShadow2}" Margin="8" CornerRadius="2" x:Name="SubMenuBorder" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}">
|
||||||
|
<ScrollViewer Style="{StaticResource ScrollViewerUpDown}" Margin="0,6">
|
||||||
|
<ItemsPresenter x:Name="ItemsPresenter" KeyboardNavigation.DirectionalNavigation="Cycle" Grid.IsSharedSizeScope="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" KeyboardNavigation.TabNavigation="Cycle"/>
|
||||||
|
</ScrollViewer>
|
||||||
|
</Border>
|
||||||
|
</Popup>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsChecked" Value="True">
|
||||||
|
<Setter Property="Visibility" TargetName="GlyphPanel" Value="Visible"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsHighlighted" Value="True">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsEnabled" Value="False">
|
||||||
|
<Setter Property="Opacity" Value=".4"/>
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="MenuBaseStyle" TargetType="Menu">
|
||||||
|
<Setter Property="OverridesDefaultStyle" Value="True"/>
|
||||||
|
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
|
||||||
|
<Setter Property="FontSize" Value="12"/>
|
||||||
|
<Setter Property="FontStyle" Value="Normal"/>
|
||||||
|
<Setter Property="FontWeight" Value="Normal"/>
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
|
||||||
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||||
|
<Setter Property="ItemContainerStyle" Value="{StaticResource MenuItemBaseStyle}"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="Menu">
|
||||||
|
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
|
||||||
|
<ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||||
|
</Border>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
</ResourceDictionary>
|
@ -0,0 +1,72 @@
|
|||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:hc="clr-namespace:HandyControl.Controls"
|
||||||
|
xmlns:themes="clr-namespace:HandyControl.Themes">
|
||||||
|
|
||||||
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Basic/Geometries.xaml"/>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Styles/Base/MenuBaseStyle.xaml"/>
|
||||||
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
|
||||||
|
<Style x:Key="MenuItem4NavigationWindowStyle" BasedOn="{StaticResource MenuItemBaseStyle}" TargetType="MenuItem">
|
||||||
|
<Setter Property="Header" Value="{Binding (JournalEntry.Name)}"/>
|
||||||
|
<Setter Property="Command" Value="NavigationCommands.NavigateJournal"/>
|
||||||
|
<Setter Property="CommandTarget" Value="{Binding TemplatedParent, RelativeSource={RelativeSource AncestorType=ContextMenu}}"/>
|
||||||
|
<Setter Property="CommandParameter" Value="{Binding RelativeSource={RelativeSource Self}}"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="NavigationWindowBaseStyle" TargetType="NavigationWindow">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}"/>
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="NavigationWindow">
|
||||||
|
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
||||||
|
<DockPanel LastChildFill="True">
|
||||||
|
<Border DockPanel.Dock="Top" BorderThickness="0,0,0,1" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource DarkDefaultBrush}">
|
||||||
|
<hc:ButtonGroup x:Name="NavChrome" Width="90" Margin="10,6" HorizontalAlignment="Left">
|
||||||
|
<Button Padding="6" hc:IconElement.Geometry="{StaticResource LeftGeometry}" Command="NavigationCommands.BrowseBack">
|
||||||
|
<Button.ContextMenu>
|
||||||
|
<ContextMenu x:Name="BackNavMenu" ItemContainerStyle="{StaticResource MenuItem4NavigationWindowStyle}" ItemsSource="{Binding Path=(NavigationWindow.BackStack), RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
|
</Button.ContextMenu>
|
||||||
|
</Button>
|
||||||
|
<Button Padding="6" hc:IconElement.Geometry="{StaticResource RightGeometry}" Command="NavigationCommands.BrowseForward">
|
||||||
|
<Button.ContextMenu>
|
||||||
|
<ContextMenu x:Name="ForwardNavMenu" ItemContainerStyle="{StaticResource MenuItem4NavigationWindowStyle}" ItemsSource="{Binding Path=(NavigationWindow.ForwardStack), RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
|
</Button.ContextMenu>
|
||||||
|
</Button>
|
||||||
|
<Button Padding="6" hc:IconElement.Geometry="{StaticResource RotateRightGeometry}" Command="NavigationCommands.Refresh"/>
|
||||||
|
</hc:ButtonGroup>
|
||||||
|
</Border>
|
||||||
|
<hc:SimplePanel>
|
||||||
|
<AdornerDecorator>
|
||||||
|
<ContentPresenter x:Name="PART_NavWinCP" ClipToBounds="true"/>
|
||||||
|
</AdornerDecorator>
|
||||||
|
<ResizeGrip x:Name="WindowResizeGrip" HorizontalAlignment="Right" IsTabStop="false" Visibility="Collapsed" VerticalAlignment="Bottom"/>
|
||||||
|
</hc:SimplePanel>
|
||||||
|
</DockPanel>
|
||||||
|
</Border>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="ShowsNavigationUI" Value="False">
|
||||||
|
<Setter Property="Visibility" TargetName="NavChrome" Value="Collapsed"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="CanGoBack" Value="False">
|
||||||
|
<Setter Property="IsEnabled" TargetName="BackNavMenu" Value="false"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="CanGoForward" Value="False">
|
||||||
|
<Setter Property="IsEnabled" TargetName="ForwardNavMenu" Value="false"/>
|
||||||
|
</Trigger>
|
||||||
|
<MultiTrigger>
|
||||||
|
<MultiTrigger.Conditions>
|
||||||
|
<Condition Property="ResizeMode" Value="CanResizeWithGrip"/>
|
||||||
|
<Condition Property="WindowState" Value="Normal"/>
|
||||||
|
</MultiTrigger.Conditions>
|
||||||
|
<Setter Property="Visibility" TargetName="WindowResizeGrip" Value="Visible"/>
|
||||||
|
</MultiTrigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
</ResourceDictionary>
|
@ -0,0 +1,302 @@
|
|||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:hc="clr-namespace:HandyControl.Controls"
|
||||||
|
xmlns:interactivity="clr-namespace:HandyControl.Interactivity"
|
||||||
|
xmlns:system="clr-namespace:System;assembly=mscorlib"
|
||||||
|
xmlns:themes="clr-namespace:HandyControl.Themes">
|
||||||
|
|
||||||
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Basic/Geometries.xaml"/>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Basic/Converters.xaml"/>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Styles/Button.xaml"/>
|
||||||
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
|
||||||
|
<Style x:Key="NumericUpDownBaseStyle" TargetType="hc:NumericUpDown">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
|
||||||
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
|
<Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}"/>
|
||||||
|
<Setter Property="KeyboardNavigation.TabNavigation" Value="Once"/>
|
||||||
|
<Setter Property="IsTabStop" Value="False"/>
|
||||||
|
<Setter Property="HorizontalContentAlignment" Value="Left"/>
|
||||||
|
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
|
||||||
|
<Setter Property="AllowDrop" Value="true"/>
|
||||||
|
<Setter Property="Padding" Value="{StaticResource DefaultInputPadding}"/>
|
||||||
|
<Setter Property="MinHeight" Value="{StaticResource DefaultControlHeight}"/>
|
||||||
|
<Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
|
||||||
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="hc:NumericUpDown">
|
||||||
|
<Border x:Name="templateRoot" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<hc:WatermarkTextBox Focusable="True" Foreground="{TemplateBinding Foreground}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" x:Name="PART_TextBox" Padding="{TemplateBinding Padding}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" IsReadOnly="{TemplateBinding IsReadOnly}"/>
|
||||||
|
<Button x:Name="UpButton" Visibility="{TemplateBinding ShowUpDownButton,Converter={StaticResource Boolean2VisibilityConverter}}" Command="interactivity:ControlCommands.Prev" Padding="5,7,5,1" Margin="0,0,0,14" Focusable="False" Grid.Column="1" Foreground="{Binding BorderBrush,ElementName=templateRoot}" hc:IconElement.Geometry="{StaticResource UpGeometry}" Style="{StaticResource ButtonIcon}" Width="30" VerticalAlignment="Center" Height="14"/>
|
||||||
|
<Button x:Name="DownButton" Visibility="{TemplateBinding ShowUpDownButton,Converter={StaticResource Boolean2VisibilityConverter}}" Command="interactivity:ControlCommands.Next" Padding="5,1,5,7" Margin="0,14,0,0" Focusable="False" Grid.Column="1" Foreground="{Binding BorderBrush,ElementName=templateRoot}" hc:IconElement.Geometry="{StaticResource DownGeometry}" Style="{StaticResource ButtonIcon}" Width="30" VerticalAlignment="Center" Height="14"/>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsEnabled" Value="false">
|
||||||
|
<Setter Property="Opacity" Value="0.4"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsMouseOver" Value="true">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsFocused" Value="true" SourceName="PART_TextBox">
|
||||||
|
<Setter Property="BorderBrush" TargetName="templateRoot" Value="{DynamicResource PrimaryBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="ShowUpDownButton" Value="False">
|
||||||
|
<Setter Property="Margin" TargetName="PART_TextBox" Value="2,0,2,1"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsReadOnly" Value="True">
|
||||||
|
<Setter Property="IsEnabled" TargetName="UpButton" Value="False"/>
|
||||||
|
<Setter Property="IsEnabled" TargetName="DownButton" Value="False"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="NumericUpDownExtendTopTemplate" TargetType="hc:NumericUpDown">
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight),RelativeSource={RelativeSource TemplatedParent}}" Height="{Binding Path=(hc:InfoElement.ContentHeight),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Double2GridLengthConverter}}"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<StackPanel Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" Margin="{TemplateBinding Padding}">
|
||||||
|
<TextBlock Foreground="{TemplateBinding Foreground}" Margin="1,0,0,0" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
|
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
||||||
|
</StackPanel>
|
||||||
|
<Border Grid.Row="1" x:Name="templateRoot" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<hc:WatermarkTextBox Margin="-2,0" Focusable="True" Foreground="{TemplateBinding Foreground}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" x:Name="PART_TextBox" Padding="{TemplateBinding Padding}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" IsReadOnly="{TemplateBinding IsReadOnly}"/>
|
||||||
|
<Button x:Name="UpButton" Visibility="{TemplateBinding ShowUpDownButton,Converter={StaticResource Boolean2VisibilityConverter}}" Command="interactivity:ControlCommands.Prev" Padding="5,7,5,1" Margin="0,0,0,14" Focusable="False" Grid.Column="1" Foreground="{Binding BorderBrush,ElementName=templateRoot}" hc:IconElement.Geometry="{StaticResource UpGeometry}" Style="{StaticResource ButtonIcon}" Width="30" VerticalAlignment="Center" Height="14"/>
|
||||||
|
<Button x:Name="DownButton" Visibility="{TemplateBinding ShowUpDownButton,Converter={StaticResource Boolean2VisibilityConverter}}" Command="interactivity:ControlCommands.Next" Padding="5,1,5,7" Margin="0,14,0,0" Focusable="False" Grid.Column="1" Foreground="{Binding BorderBrush,ElementName=templateRoot}" hc:IconElement.Geometry="{StaticResource DownGeometry}" Style="{StaticResource ButtonIcon}" Width="30" VerticalAlignment="Center" Height="14"/>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsEnabled" Value="false">
|
||||||
|
<Setter Property="Opacity" TargetName="templateRoot" Value="0.4"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsMouseOver" Value="true" SourceName="templateRoot">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsFocused" Value="true" SourceName="PART_TextBox">
|
||||||
|
<Setter Property="BorderBrush" TargetName="templateRoot" Value="{DynamicResource PrimaryBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsReadOnly" Value="True">
|
||||||
|
<Setter Property="IsEnabled" TargetName="UpButton" Value="False"/>
|
||||||
|
<Setter Property="IsEnabled" TargetName="DownButton" Value="False"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="NumericUpDownExtendLeftTemplate" TargetType="hc:NumericUpDown">
|
||||||
|
<Grid MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight),RelativeSource={RelativeSource TemplatedParent}}" Height="{Binding Path=(hc:InfoElement.ContentHeight),RelativeSource={RelativeSource TemplatedParent}}">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="{Binding Path=(hc:InfoElement.TitleWidth),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<StackPanel Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="0,7,6,7">
|
||||||
|
<TextBlock Foreground="{TemplateBinding Foreground}" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
|
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
||||||
|
</StackPanel>
|
||||||
|
<Border Grid.Column="1" x:Name="templateRoot" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<hc:WatermarkTextBox Margin="-2,0" Focusable="True" Foreground="{TemplateBinding Foreground}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" x:Name="PART_TextBox" Padding="{TemplateBinding Padding}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" IsReadOnly="{TemplateBinding IsReadOnly}"/>
|
||||||
|
<Button x:Name="UpButton" Visibility="{TemplateBinding ShowUpDownButton,Converter={StaticResource Boolean2VisibilityConverter}}" Command="interactivity:ControlCommands.Prev" Padding="5,7,5,1" Margin="0,0,0,14" Focusable="False" Grid.Column="1" Foreground="{Binding BorderBrush,ElementName=templateRoot}" hc:IconElement.Geometry="{StaticResource UpGeometry}" Style="{StaticResource ButtonIcon}" Width="30" VerticalAlignment="Center" Height="14"/>
|
||||||
|
<Button x:Name="DownButton" Visibility="{TemplateBinding ShowUpDownButton,Converter={StaticResource Boolean2VisibilityConverter}}" Command="interactivity:ControlCommands.Next" Padding="5,1,5,7" Margin="0,14,0,0" Focusable="False" Grid.Column="1" Foreground="{Binding BorderBrush,ElementName=templateRoot}" hc:IconElement.Geometry="{StaticResource DownGeometry}" Style="{StaticResource ButtonIcon}" Width="30" VerticalAlignment="Center" Height="14"/>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsEnabled" Value="false">
|
||||||
|
<Setter Property="Opacity" TargetName="templateRoot" Value="0.4"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsMouseOver" Value="true" SourceName="templateRoot">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsFocused" Value="true" SourceName="PART_TextBox">
|
||||||
|
<Setter Property="BorderBrush" TargetName="templateRoot" Value="{DynamicResource PrimaryBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsReadOnly" Value="True">
|
||||||
|
<Setter Property="IsEnabled" TargetName="UpButton" Value="False"/>
|
||||||
|
<Setter Property="IsEnabled" TargetName="DownButton" Value="False"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<Style x:Key="NumericUpDownExtendBaseStyle" BasedOn="{StaticResource NumericUpDownBaseStyle}" TargetType="hc:NumericUpDown">
|
||||||
|
<Setter Property="hc:InfoElement.Symbol" Value="●"/>
|
||||||
|
<Setter Property="hc:InfoElement.ContentHeight" Value="{x:Static system:Double.NaN}"/>
|
||||||
|
<Setter Property="hc:InfoElement.MinContentHeight" Value="{StaticResource DefaultControlHeight}"/>
|
||||||
|
<Setter Property="Height" Value="Auto"/>
|
||||||
|
<Setter Property="Template" Value="{StaticResource NumericUpDownExtendTopTemplate}"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="hc:InfoElement.TitlePlacement" Value="Left">
|
||||||
|
<Setter Property="Template" Value="{StaticResource NumericUpDownExtendLeftTemplate}"/>
|
||||||
|
<Setter Property="Width" Value="Auto"/>
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="NumericUpDownPlusTopTemplate" TargetType="hc:NumericUpDown">
|
||||||
|
<ControlTemplate.Resources>
|
||||||
|
<Storyboard x:Key="StoryboardShow">
|
||||||
|
<ThicknessAnimation Storyboard.TargetName="PART_ErrorTip" Storyboard.TargetProperty="Margin" To="9,0,0,-18" Duration="0:0:.2"/>
|
||||||
|
</Storyboard>
|
||||||
|
<Storyboard x:Key="StoryboardHidden">
|
||||||
|
<ThicknessAnimation Storyboard.TargetName="PART_ErrorTip" Storyboard.TargetProperty="Margin" To="9,0,0,4" Duration="0:0:0"/>
|
||||||
|
</Storyboard>
|
||||||
|
</ControlTemplate.Resources>
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight),RelativeSource={RelativeSource TemplatedParent}}" Height="{Binding Path=(hc:InfoElement.ContentHeight),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Double2GridLengthConverter}}"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<TextBlock FontSize="12" Text="{TemplateBinding ErrorStr}" Name="PART_ErrorTip" VerticalAlignment="Bottom" Margin="9,0,0,4" Foreground="{DynamicResource DangerBrush}" Grid.Row="1"/>
|
||||||
|
<StackPanel Grid.Row="0" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" Margin="{TemplateBinding Padding}">
|
||||||
|
<TextBlock Foreground="{TemplateBinding Foreground}" Margin="1,0,0,0" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
|
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
||||||
|
</StackPanel>
|
||||||
|
<Border Grid.Row="1" x:Name="templateRoot" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="25"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<hc:WatermarkTextBox Padding="{TemplateBinding Padding}" x:Name="PART_TextBox" Watermark="{Binding Path=(hc:InfoElement.Placeholder),RelativeSource={RelativeSource TemplatedParent}}" HorizontalAlignment="Stretch" Grid.Column="0" Focusable="{TemplateBinding Focusable}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Grid.Row="0" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" IsReadOnly="{TemplateBinding IsReadOnly}"/>
|
||||||
|
<Button Height="{x:Static system:Double.NaN}" Command="interactivity:ControlCommands.Clear" Name="ButtonClear" Width="16" Visibility="Collapsed" Grid.Column="1" Style="{StaticResource ButtonIcon}" Padding="0,6" hc:IconElement.Geometry="{StaticResource DeleteFillCircleGeometry}" Foreground="{Binding BorderBrush,ElementName=templateRoot}"/>
|
||||||
|
<Button x:Name="UpButton" Command="interactivity:ControlCommands.Prev" Padding="0,7,5,1" Margin="0,0,0,14" Focusable="False" Grid.Column="2" Foreground="{Binding BorderBrush,ElementName=templateRoot}" hc:IconElement.Geometry="{StaticResource UpGeometry}" Style="{StaticResource ButtonIcon}" Width="30" VerticalAlignment="Center" Height="14"/>
|
||||||
|
<Button x:Name="DownButton" Command="interactivity:ControlCommands.Next" Padding="0,1,5,7" Margin="0,14,0,0" Focusable="False" Grid.Column="2" Foreground="{Binding BorderBrush,ElementName=templateRoot}" hc:IconElement.Geometry="{StaticResource DownGeometry}" Style="{StaticResource ButtonIcon}" Width="30" VerticalAlignment="Center" Height="14"/>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsEnabled" Value="false">
|
||||||
|
<Setter Property="Opacity" TargetName="templateRoot" Value="0.4"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsMouseOver" Value="true" SourceName="templateRoot">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsReadOnly" Value="True">
|
||||||
|
<Setter Property="IsEnabled" TargetName="UpButton" Value="False"/>
|
||||||
|
<Setter Property="IsEnabled" TargetName="DownButton" Value="False"/>
|
||||||
|
</Trigger>
|
||||||
|
<MultiTrigger>
|
||||||
|
<MultiTrigger.Conditions>
|
||||||
|
<Condition Property="IsMouseOver" Value="true"/>
|
||||||
|
<Condition Property="ShowClearButton" Value="True"/>
|
||||||
|
<Condition Property="IsReadOnly" Value="False"/>
|
||||||
|
</MultiTrigger.Conditions>
|
||||||
|
<Setter Property="Visibility" Value="Visible" TargetName="ButtonClear"/>
|
||||||
|
</MultiTrigger>
|
||||||
|
<Trigger Property="IsFocused" Value="true" SourceName="PART_TextBox">
|
||||||
|
<Setter Property="BorderBrush" TargetName="templateRoot" Value="{DynamicResource PrimaryBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsError" Value="true">
|
||||||
|
<Setter Property="BorderBrush" TargetName="templateRoot" Value="{DynamicResource DangerBrush}"/>
|
||||||
|
<Trigger.EnterActions>
|
||||||
|
<BeginStoryboard Storyboard="{StaticResource StoryboardShow}"/>
|
||||||
|
</Trigger.EnterActions>
|
||||||
|
<Trigger.ExitActions>
|
||||||
|
<BeginStoryboard Storyboard="{StaticResource StoryboardHidden}"/>
|
||||||
|
</Trigger.ExitActions>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="NumericUpDownPlusLeftTemplate" TargetType="hc:NumericUpDown">
|
||||||
|
<ControlTemplate.Resources>
|
||||||
|
<Storyboard x:Key="StoryboardShow">
|
||||||
|
<ThicknessAnimation Storyboard.TargetName="PART_ErrorTip" Storyboard.TargetProperty="Margin" To="9,0,0,-18" Duration="0:0:.2"/>
|
||||||
|
</Storyboard>
|
||||||
|
<Storyboard x:Key="StoryboardHidden">
|
||||||
|
<ThicknessAnimation Storyboard.TargetName="PART_ErrorTip" Storyboard.TargetProperty="Margin" To="9,0,0,4" Duration="0:0:0"/>
|
||||||
|
</Storyboard>
|
||||||
|
</ControlTemplate.Resources>
|
||||||
|
<Grid MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight),RelativeSource={RelativeSource TemplatedParent}}" Height="{Binding Path=(hc:InfoElement.ContentHeight),RelativeSource={RelativeSource TemplatedParent}}">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="{Binding Path=(hc:InfoElement.TitleWidth),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<TextBlock FontSize="12" Text="{TemplateBinding ErrorStr}" Name="PART_ErrorTip" VerticalAlignment="Bottom" Margin="9,0,0,4" Foreground="{DynamicResource DangerBrush}" Grid.Column="1"/>
|
||||||
|
<StackPanel Grid.Column="0" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="0,7,6,8">
|
||||||
|
<TextBlock Foreground="{TemplateBinding Foreground}" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
|
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
||||||
|
</StackPanel>
|
||||||
|
<Border Grid.Column="1" x:Name="templateRoot" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
||||||
|
<Grid x:Name="PART_Root" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="25"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<hc:WatermarkTextBox x:Name="PART_TextBox" Padding="{TemplateBinding Padding}" Watermark="{Binding Path=(hc:InfoElement.Placeholder),RelativeSource={RelativeSource TemplatedParent}}" HorizontalAlignment="Stretch" Grid.Column="0" Focusable="{TemplateBinding Focusable}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Grid.Row="0" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" IsReadOnly="{TemplateBinding IsReadOnly}"/>
|
||||||
|
<Button Height="{x:Static system:Double.NaN}" Command="interactivity:ControlCommands.Clear" Name="PART_ButtonClear" Width="16" Visibility="Collapsed" Grid.Column="1" Style="{StaticResource ButtonIcon}" Padding="0,6" hc:IconElement.Geometry="{StaticResource DeleteFillCircleGeometry}" Foreground="{Binding BorderBrush,ElementName=templateRoot}"/>
|
||||||
|
<Button x:Name="UpButton" Visibility="{TemplateBinding ShowUpDownButton,Converter={StaticResource Boolean2VisibilityConverter}}" Command="interactivity:ControlCommands.Prev" Padding="0,7,5,1" Margin="0,0,0,14" Focusable="False" Grid.Column="2" Foreground="{Binding BorderBrush,ElementName=templateRoot}" hc:IconElement.Geometry="{StaticResource UpGeometry}" Style="{StaticResource ButtonIcon}" Width="30" VerticalAlignment="Center" Height="14"/>
|
||||||
|
<Button x:Name="DownButton" Visibility="{TemplateBinding ShowUpDownButton,Converter={StaticResource Boolean2VisibilityConverter}}" Command="interactivity:ControlCommands.Next" Padding="0,1,5,7" Margin="0,14,0,0" Focusable="False" Grid.Column="2" Foreground="{Binding BorderBrush,ElementName=templateRoot}" hc:IconElement.Geometry="{StaticResource DownGeometry}" Style="{StaticResource ButtonIcon}" Width="30" VerticalAlignment="Center" Height="14"/>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsEnabled" Value="false">
|
||||||
|
<Setter Property="Opacity" TargetName="templateRoot" Value="0.4"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsMouseOver" Value="true" SourceName="templateRoot">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsReadOnly" Value="True">
|
||||||
|
<Setter Property="IsEnabled" TargetName="UpButton" Value="False"/>
|
||||||
|
<Setter Property="IsEnabled" TargetName="DownButton" Value="False"/>
|
||||||
|
</Trigger>
|
||||||
|
<MultiTrigger>
|
||||||
|
<MultiTrigger.Conditions>
|
||||||
|
<Condition Property="IsMouseOver" Value="true"/>
|
||||||
|
<Condition Property="ShowClearButton" Value="True"/>
|
||||||
|
<Condition Property="IsReadOnly" Value="False"/>
|
||||||
|
</MultiTrigger.Conditions>
|
||||||
|
<Setter Property="Visibility" Value="Visible" TargetName="PART_ButtonClear"/>
|
||||||
|
</MultiTrigger>
|
||||||
|
<Trigger Property="IsFocused" Value="true" SourceName="PART_TextBox">
|
||||||
|
<Setter Property="BorderBrush" TargetName="templateRoot" Value="{DynamicResource PrimaryBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsError" Value="true">
|
||||||
|
<Setter Property="BorderBrush" TargetName="templateRoot" Value="{DynamicResource DangerBrush}"/>
|
||||||
|
<Trigger.EnterActions>
|
||||||
|
<BeginStoryboard Storyboard="{StaticResource StoryboardShow}"/>
|
||||||
|
</Trigger.EnterActions>
|
||||||
|
<Trigger.ExitActions>
|
||||||
|
<BeginStoryboard Storyboard="{StaticResource StoryboardHidden}"/>
|
||||||
|
</Trigger.ExitActions>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<Style x:Key="NumericUpDownPlusBaseStyle" BasedOn="{StaticResource NumericUpDownExtendBaseStyle}" TargetType="hc:NumericUpDown">
|
||||||
|
<Setter Property="Template" Value="{StaticResource NumericUpDownPlusTopTemplate}"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="hc:InfoElement.TitlePlacement" Value="Left">
|
||||||
|
<Setter Property="Template" Value="{StaticResource NumericUpDownPlusLeftTemplate}"/>
|
||||||
|
<Setter Property="Width" Value="Auto"/>
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
</ResourceDictionary>
|
@ -0,0 +1,308 @@
|
|||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:hc="clr-namespace:HandyControl.Controls"
|
||||||
|
xmlns:interactivity="clr-namespace:HandyControl.Interactivity"
|
||||||
|
xmlns:system="clr-namespace:System;assembly=mscorlib"
|
||||||
|
xmlns:themes="clr-namespace:HandyControl.Themes">
|
||||||
|
|
||||||
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Basic/Converters.xaml"/>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Basic/Geometries.xaml"/>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Styles/TextBlock.xaml"/>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Styles/Button.xaml"/>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Styles/ToggleButton.xaml"/>
|
||||||
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
|
||||||
|
<Style x:Key="PasswordBoxBaseStyle" TargetType="PasswordBox">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
|
||||||
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
|
<Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}"/>
|
||||||
|
<Setter Property="PasswordChar" Value="●"/>
|
||||||
|
<Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>
|
||||||
|
<Setter Property="HorizontalContentAlignment" Value="Left"/>
|
||||||
|
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
|
||||||
|
<Setter Property="AllowDrop" Value="true"/>
|
||||||
|
<Setter Property="Padding" Value="{StaticResource DefaultInputPadding}"/>
|
||||||
|
<Setter Property="MinHeight" Value="{StaticResource DefaultControlHeight}"/>
|
||||||
|
<Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
|
||||||
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="PasswordBox">
|
||||||
|
<Border x:Name="border" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
|
||||||
|
<ScrollViewer Margin="-2,0" Padding="{TemplateBinding Padding}" x:Name="PART_ContentHost" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
|
||||||
|
</Border>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsEnabled" Value="false">
|
||||||
|
<Setter Property="Opacity" TargetName="border" Value="0.4"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsMouseOver" Value="true">
|
||||||
|
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource SecondaryBorderBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsFocused" Value="true">
|
||||||
|
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource PrimaryBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="PasswordBoxExtendTopTemplate" TargetType="PasswordBox">
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight),RelativeSource={RelativeSource TemplatedParent}}" Height="{Binding Path=(hc:InfoElement.ContentHeight),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Double2GridLengthConverter}}"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<StackPanel Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" Margin="{TemplateBinding Padding}">
|
||||||
|
<TextBlock Margin="1,0,0,0" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
|
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
||||||
|
</StackPanel>
|
||||||
|
<Border x:Name="border" Grid.Row="1" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True"/>
|
||||||
|
<TextBlock x:Name="placeholder" Padding="1" Visibility="Collapsed" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}" Grid.Row="1" HorizontalAlignment="Stretch" Style="{StaticResource TextBlockDefaultThiLight}" Text="{Binding Path=(hc:InfoElement.Placeholder),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
|
<ScrollViewer Margin="-1,1" Padding="{TemplateBinding Padding}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" Grid.Row="1" x:Name="PART_ContentHost" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
|
||||||
|
</Grid>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="hc:PasswordBoxAttach.PasswordLength" Value="0">
|
||||||
|
<Setter Property="Visibility" TargetName="placeholder" Value="Visible"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsEnabled" Value="false">
|
||||||
|
<Setter Property="Opacity" Value="0.4" TargetName="border"/>
|
||||||
|
<Setter Property="Opacity" Value="0.4" TargetName="placeholder"/>
|
||||||
|
<Setter Property="Opacity" Value="0.4" TargetName="PART_ContentHost"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsMouseOver" Value="true" SourceName="PART_ContentHost">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsFocused" Value="true">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="PasswordBoxExtendLeftTemplate" TargetType="PasswordBox">
|
||||||
|
<Grid MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight),RelativeSource={RelativeSource TemplatedParent}}" Height="{Binding Path=(hc:InfoElement.ContentHeight),RelativeSource={RelativeSource TemplatedParent}}">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="{Binding Path=(hc:InfoElement.TitleWidth),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<StackPanel Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="0,7,6,7">
|
||||||
|
<TextBlock Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
|
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
||||||
|
</StackPanel>
|
||||||
|
<Border x:Name="border" Grid.Column="1" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True"/>
|
||||||
|
<TextBlock Padding="1" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}" x:Name="placeholder" Visibility="Collapsed" Grid.Column="1" HorizontalAlignment="Stretch" Style="{StaticResource TextBlockDefaultThiLight}" Text="{Binding Path=(hc:InfoElement.Placeholder),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
|
<ScrollViewer Margin="-1,1" Padding="{TemplateBinding Padding}" Grid.Column="1" x:Name="PART_ContentHost" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
|
||||||
|
</Grid>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="hc:PasswordBoxAttach.PasswordLength" Value="0">
|
||||||
|
<Setter Property="Visibility" TargetName="placeholder" Value="Visible"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsEnabled" Value="false">
|
||||||
|
<Setter Property="Opacity" Value="0.4" TargetName="border"/>
|
||||||
|
<Setter Property="Opacity" Value="0.4" TargetName="placeholder"/>
|
||||||
|
<Setter Property="Opacity" Value="0.4" TargetName="PART_ContentHost"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsMouseOver" Value="true" SourceName="PART_ContentHost">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsFocused" Value="true">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<Style x:Key="PasswordBoxExtendBaseStyle" BasedOn="{StaticResource PasswordBoxBaseStyle}" TargetType="PasswordBox">
|
||||||
|
<Setter Property="Height" Value="Auto"/>
|
||||||
|
<Setter Property="hc:InfoElement.Symbol" Value="●"/>
|
||||||
|
<Setter Property="hc:InfoElement.ContentHeight" Value="{x:Static system:Double.NaN}"/>
|
||||||
|
<Setter Property="hc:InfoElement.MinContentHeight" Value="{StaticResource DefaultControlHeight}"/>
|
||||||
|
<Setter Property="hc:PasswordBoxAttach.IsMonitoring" Value="True"/>
|
||||||
|
<Setter Property="Template" Value="{StaticResource PasswordBoxExtendTopTemplate}"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="hc:InfoElement.TitlePlacement" Value="Left">
|
||||||
|
<Setter Property="Template" Value="{StaticResource PasswordBoxExtendLeftTemplate}"/>
|
||||||
|
<Setter Property="Width" Value="Auto"/>
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="PasswordBoxPlusInternalStyle" TargetType="PasswordBox">
|
||||||
|
<Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>
|
||||||
|
<Setter Property="HorizontalContentAlignment" Value="Left"/>
|
||||||
|
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
|
||||||
|
<Setter Property="AllowDrop" Value="true"/>
|
||||||
|
<Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
|
||||||
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||||
|
<Setter Property="Padding" Value="{StaticResource DefaultInputPadding}"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="PasswordBox">
|
||||||
|
<hc:SimplePanel>
|
||||||
|
<TextBlock Margin="2,-1" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Padding="{TemplateBinding Padding}" x:Name="placeholder" Visibility="Collapsed" HorizontalAlignment="Stretch" Style="{StaticResource TextBlockDefaultThiLight}" Text="{Binding Path=(hc:InfoElement.Placeholder),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
|
<ScrollViewer Padding="{TemplateBinding Padding}" x:Name="PART_ContentHost" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
|
||||||
|
</hc:SimplePanel>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="hc:PasswordBoxAttach.PasswordLength" Value="0">
|
||||||
|
<Setter Property="Visibility" TargetName="placeholder" Value="Visible"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsEnabled" Value="false">
|
||||||
|
<Setter Property="Opacity" Value="0.4"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="PasswordBoxPlusTopTemplate" TargetType="hc:PasswordBox">
|
||||||
|
<ControlTemplate.Resources>
|
||||||
|
<Storyboard x:Key="StoryboardShow">
|
||||||
|
<ThicknessAnimation Storyboard.TargetName="TextBlockError" Storyboard.TargetProperty="Margin" To="9,0,0,-18" Duration="0:0:.2"/>
|
||||||
|
</Storyboard>
|
||||||
|
<Storyboard x:Key="StoryboardHidden">
|
||||||
|
<ThicknessAnimation Storyboard.TargetName="TextBlockError" Storyboard.TargetProperty="Margin" To="9,0,0,4" Duration="0:0:0"/>
|
||||||
|
</Storyboard>
|
||||||
|
</ControlTemplate.Resources>
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight),RelativeSource={RelativeSource TemplatedParent}}" Height="{Binding Path=(hc:InfoElement.ContentHeight),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Double2GridLengthConverter}}"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<StackPanel Grid.ColumnSpan="2" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" Margin="{TemplateBinding Padding}">
|
||||||
|
<TextBlock Margin="1,0,0,0" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
|
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
||||||
|
</StackPanel>
|
||||||
|
<TextBlock FontSize="12" Grid.Column="0" Grid.ColumnSpan="3" Text="{TemplateBinding ErrorStr}" Name="TextBlockError" VerticalAlignment="Bottom" Margin="9,0,0,4" Foreground="{DynamicResource DangerBrush}" Grid.Row="1"/>
|
||||||
|
<Border Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="3" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True"/>
|
||||||
|
<PasswordBox Margin="-1,1,0,1" Visibility="{Binding ShowPassword,RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityReConverter}}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" Padding="{TemplateBinding Padding}" Background="{TemplateBinding Background}" Foreground="{TemplateBinding Foreground}" Grid.Column="0" Grid.Row="1" x:Name="PART_PasswordBox" PasswordChar="{TemplateBinding PasswordChar}" Style="{StaticResource PasswordBoxPlusInternalStyle}"/>
|
||||||
|
<hc:WatermarkTextBox Margin="1,1,0,1" Visibility="{Binding ShowPassword,RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" x:Name="PART_TextBox" Padding="{TemplateBinding Padding}" Watermark="{Binding Path=(hc:InfoElement.Placeholder),RelativeSource={RelativeSource TemplatedParent}}" HorizontalAlignment="Stretch" Grid.Column="0" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Grid.Row="1" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||||
|
<Button Grid.Row="1" Grid.Column="1" Command="interactivity:ControlCommands.Clear" Margin="0,0,7,0" Visibility="Collapsed" Name="ButtonClear" Width="16" Style="{StaticResource ButtonIcon}" Padding="0,6" hc:IconElement.Geometry="{StaticResource DeleteFillCircleGeometry}" Foreground="{TemplateBinding BorderBrush}"/>
|
||||||
|
<ToggleButton IsChecked="{Binding ShowPassword,RelativeSource={RelativeSource TemplatedParent},Mode=TwoWay}" Width="25" Style="{StaticResource ToggleButtonIconTransparent}" Visibility="{TemplateBinding ShowEyeButton,Converter={StaticResource Boolean2VisibilityConverter}}" Padding="2,7,7,7" hc:IconSwitchElement.Geometry="{StaticResource EyeCloseGeometry}" hc:IconSwitchElement.GeometrySelected="{StaticResource EyeOpenGeometry}" x:Name="ButtonEye" Grid.Column="2" Foreground="{TemplateBinding BorderBrush}" Focusable="False" Grid.Row="1"/>
|
||||||
|
</Grid>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="true">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsFocused" Value="true" SourceName="PART_PasswordBox">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsFocused" Value="true" SourceName="PART_TextBox">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<MultiTrigger>
|
||||||
|
<MultiTrigger.Conditions>
|
||||||
|
<Condition Property="IsMouseOver" Value="true"/>
|
||||||
|
<Condition Property="ShowClearButton" Value="True"/>
|
||||||
|
</MultiTrigger.Conditions>
|
||||||
|
<Setter Property="Visibility" Value="Visible" TargetName="ButtonClear"/>
|
||||||
|
</MultiTrigger>
|
||||||
|
<Trigger Property="IsError" Value="true">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource DangerBrush}"/>
|
||||||
|
<Trigger.EnterActions>
|
||||||
|
<BeginStoryboard Storyboard="{StaticResource StoryboardShow}"/>
|
||||||
|
</Trigger.EnterActions>
|
||||||
|
<Trigger.ExitActions>
|
||||||
|
<BeginStoryboard Storyboard="{StaticResource StoryboardHidden}"/>
|
||||||
|
</Trigger.ExitActions>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="ShowEyeButton" Value="true">
|
||||||
|
<Setter Property="Margin" Value="0" TargetName="ButtonClear"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="PasswordBoxPlusLeftTemplate" TargetType="hc:PasswordBox">
|
||||||
|
<ControlTemplate.Resources>
|
||||||
|
<Storyboard x:Key="StoryboardShow">
|
||||||
|
<ThicknessAnimation Storyboard.TargetName="TextBlockError" Storyboard.TargetProperty="Margin" To="9,0,0,-18" Duration="0:0:.2"/>
|
||||||
|
</Storyboard>
|
||||||
|
<Storyboard x:Key="StoryboardHidden">
|
||||||
|
<ThicknessAnimation Storyboard.TargetName="TextBlockError" Storyboard.TargetProperty="Margin" To="9,0,0,4" Duration="0:0:0"/>
|
||||||
|
</Storyboard>
|
||||||
|
</ControlTemplate.Resources>
|
||||||
|
<Grid MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight),RelativeSource={RelativeSource TemplatedParent}}" Height="{Binding Path=(hc:InfoElement.ContentHeight),RelativeSource={RelativeSource TemplatedParent}}">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="{Binding Path=(hc:InfoElement.TitleWidth),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<StackPanel Grid.Column="0" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" Margin="0,7,6,7">
|
||||||
|
<TextBlock Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
|
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
||||||
|
</StackPanel>
|
||||||
|
<TextBlock FontSize="12" Grid.ColumnSpan="3" Text="{TemplateBinding ErrorStr}" Name="TextBlockError" VerticalAlignment="Bottom" Margin="9,0,0,4" Foreground="{DynamicResource DangerBrush}" Grid.Column="1"/>
|
||||||
|
<Border Grid.Column="1" Grid.ColumnSpan="3" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True"/>
|
||||||
|
<PasswordBox Margin="-1,1,0,1" Visibility="{Binding ShowPassword,RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityReConverter}}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" Padding="{TemplateBinding Padding}" Background="{TemplateBinding Background}" Foreground="{TemplateBinding Foreground}" Grid.Column="1" x:Name="PART_PasswordBox" PasswordChar="{TemplateBinding PasswordChar}" Style="{StaticResource PasswordBoxPlusInternalStyle}"/>
|
||||||
|
<hc:WatermarkTextBox Margin="1,1,0,1" Visibility="{Binding ShowPassword,RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" x:Name="PART_TextBox" Padding="{TemplateBinding Padding}" Watermark="{Binding Path=(hc:InfoElement.Placeholder),RelativeSource={RelativeSource TemplatedParent}}" HorizontalAlignment="Stretch" Grid.Column="1" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||||
|
<Button Grid.Column="2" Command="interactivity:ControlCommands.Clear" Margin="0,0,7,0" Visibility="Collapsed" Name="ButtonClear" Width="16" Style="{StaticResource ButtonIcon}" Padding="0,6" hc:IconElement.Geometry="{StaticResource DeleteFillCircleGeometry}" Foreground="{TemplateBinding BorderBrush}"/>
|
||||||
|
<ToggleButton IsChecked="{Binding ShowPassword,RelativeSource={RelativeSource TemplatedParent},Mode=TwoWay}" Width="25" Style="{StaticResource ToggleButtonIconTransparent}" Visibility="{TemplateBinding ShowEyeButton,Converter={StaticResource Boolean2VisibilityConverter}}" Padding="2,7,7,7" hc:IconSwitchElement.Geometry="{StaticResource EyeCloseGeometry}" hc:IconSwitchElement.GeometrySelected="{StaticResource EyeOpenGeometry}" x:Name="ButtonEye" Grid.Column="3" Foreground="{TemplateBinding BorderBrush}" Focusable="False"/>
|
||||||
|
</Grid>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="true">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsFocused" Value="true" SourceName="PART_PasswordBox">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsFocused" Value="true" SourceName="PART_TextBox">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<MultiTrigger>
|
||||||
|
<MultiTrigger.Conditions>
|
||||||
|
<Condition Property="IsMouseOver" Value="true"/>
|
||||||
|
<Condition Property="ShowClearButton" Value="True"/>
|
||||||
|
</MultiTrigger.Conditions>
|
||||||
|
<Setter Property="Visibility" Value="Visible" TargetName="ButtonClear"/>
|
||||||
|
</MultiTrigger>
|
||||||
|
<Trigger Property="IsError" Value="true">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource DangerBrush}"/>
|
||||||
|
<Trigger.EnterActions>
|
||||||
|
<BeginStoryboard Storyboard="{StaticResource StoryboardShow}"/>
|
||||||
|
</Trigger.EnterActions>
|
||||||
|
<Trigger.ExitActions>
|
||||||
|
<BeginStoryboard Storyboard="{StaticResource StoryboardHidden}"/>
|
||||||
|
</Trigger.ExitActions>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="ShowEyeButton" Value="true">
|
||||||
|
<Setter Property="Margin" Value="0" TargetName="ButtonClear"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<Style x:Key="PasswordBoxPlusBaseStyle" TargetType="hc:PasswordBox">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
|
||||||
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
|
<Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}"/>
|
||||||
|
<Setter Property="PasswordChar" Value="●"/>
|
||||||
|
<Setter Property="HorizontalContentAlignment" Value="Left"/>
|
||||||
|
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
|
||||||
|
<Setter Property="AllowDrop" Value="true"/>
|
||||||
|
<Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
|
||||||
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||||
|
<Setter Property="Height" Value="Auto"/>
|
||||||
|
<Setter Property="Padding" Value="{StaticResource DefaultInputPadding}"/>
|
||||||
|
<Setter Property="hc:InfoElement.Symbol" Value="●"/>
|
||||||
|
<Setter Property="hc:InfoElement.ContentHeight" Value="{x:Static system:Double.NaN}"/>
|
||||||
|
<Setter Property="hc:PasswordBoxAttach.IsMonitoring" Value="True"/>
|
||||||
|
<Setter Property="Focusable" Value="False"/>
|
||||||
|
<Setter Property="Template" Value="{StaticResource PasswordBoxPlusTopTemplate}"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="hc:InfoElement.TitlePlacement" Value="Left">
|
||||||
|
<Setter Property="Template" Value="{StaticResource PasswordBoxPlusLeftTemplate}"/>
|
||||||
|
<Setter Property="Width" Value="Auto"/>
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
</ResourceDictionary>
|
@ -0,0 +1,207 @@
|
|||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:hc="clr-namespace:HandyControl.Controls"
|
||||||
|
xmlns:shapes="clr-namespace:HandyControl.Expression.Shapes"
|
||||||
|
xmlns:system="clr-namespace:System;assembly=mscorlib"
|
||||||
|
xmlns:themes="clr-namespace:HandyControl.Themes">
|
||||||
|
|
||||||
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Basic/Sizes.xaml"/>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Basic/Converters.xaml"/>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Styles/Border.xaml"/>
|
||||||
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
|
||||||
|
<LinearGradientBrush x:Key="ProgressBarIndicatorAnimatedFill" StartPoint="0,0" EndPoint="1,0">
|
||||||
|
<GradientStop Color="#00FFFFFF" Offset="0"/>
|
||||||
|
<GradientStop Color="#60FFFFFF" Offset="0.4"/>
|
||||||
|
<GradientStop Color="#60FFFFFF" Offset="0.6"/>
|
||||||
|
<GradientStop Color="#00FFFFFF" Offset="1"/>
|
||||||
|
</LinearGradientBrush>
|
||||||
|
|
||||||
|
<Style x:Key="ProgressBarBaseStyle" TargetType="ProgressBar">
|
||||||
|
<Setter Property="hc:VisualElement.Text">
|
||||||
|
<Setter.Value>
|
||||||
|
<MultiBinding Converter="{StaticResource Number2PercentageConverter}" StringFormat="{}{0} %">
|
||||||
|
<Binding Path="Value" RelativeSource="{RelativeSource Self}"/>
|
||||||
|
<Binding Path="Maximum" RelativeSource="{RelativeSource Self}"/>
|
||||||
|
</MultiBinding>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
<Setter Property="Height" Value="20"/>
|
||||||
|
<Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}"/>
|
||||||
|
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}"/>
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
|
||||||
|
<Setter Property="BorderThickness" Value="0"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="ProgressBar">
|
||||||
|
<ControlTemplate.Resources>
|
||||||
|
<Storyboard x:Key="IsIndeterminate" RepeatBehavior="Forever">
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="Animation">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0" Value="0.25"/>
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0:0:1" Value="0.25"/>
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0:0:2" Value="0.25"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
<PointAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransformOrigin)" Storyboard.TargetName="Animation">
|
||||||
|
<SplinePointKeyFrame KeyTime="0" Value="-0.5,0.5"/>
|
||||||
|
<SplinePointKeyFrame KeyTime="0:0:1" Value="0.5,0.5"/>
|
||||||
|
<SplinePointKeyFrame KeyTime="0:0:2" Value="1.5,0.5"/>
|
||||||
|
</PointAnimationUsingKeyFrames>
|
||||||
|
</Storyboard>
|
||||||
|
</ControlTemplate.Resources>
|
||||||
|
<Border x:Name="TemplateRoot" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
||||||
|
<hc:SimplePanel>
|
||||||
|
<Rectangle x:Name="PART_Track"/>
|
||||||
|
<Border Style="{StaticResource BorderClip}" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="PART_Indicator" HorizontalAlignment="Left">
|
||||||
|
<hc:SimplePanel>
|
||||||
|
<Border x:Name="Indicator" Background="{TemplateBinding Foreground}">
|
||||||
|
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{DynamicResource TextIconBrush}" Text="{Binding Path=(hc:VisualElement.Text),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
|
</Border>
|
||||||
|
<Rectangle x:Name="PART_GlowRect" Fill="{StaticResource ProgressBarIndicatorAnimatedFill}" HorizontalAlignment="Left" Margin="-100,0,0,0" Width="100"/>
|
||||||
|
<Rectangle x:Name="Animation" Visibility="Collapsed" Fill="{TemplateBinding Foreground}" RenderTransformOrigin="0.5,0.5">
|
||||||
|
<Rectangle.RenderTransform>
|
||||||
|
<TransformGroup>
|
||||||
|
<ScaleTransform/>
|
||||||
|
</TransformGroup>
|
||||||
|
</Rectangle.RenderTransform>
|
||||||
|
</Rectangle>
|
||||||
|
</hc:SimplePanel>
|
||||||
|
</Border>
|
||||||
|
</hc:SimplePanel>
|
||||||
|
</Border>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="Orientation" Value="Vertical">
|
||||||
|
<Setter Property="Height" Value="{x:Static system:Double.NaN}"/>
|
||||||
|
<Setter Property="LayoutTransform" TargetName="TemplateRoot">
|
||||||
|
<Setter.Value>
|
||||||
|
<RotateTransform Angle="-90"/>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsIndeterminate" Value="true">
|
||||||
|
<Trigger.EnterActions>
|
||||||
|
<BeginStoryboard Storyboard="{StaticResource IsIndeterminate}"/>
|
||||||
|
</Trigger.EnterActions>
|
||||||
|
<Setter Property="Visibility" TargetName="Indicator" Value="Collapsed"/>
|
||||||
|
<Setter Property="Visibility" TargetName="PART_GlowRect" Value="Collapsed"/>
|
||||||
|
<Setter Property="Visibility" TargetName="Animation" Value="Visible"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ProgressBarStripeBaseStyle" TargetType="ProgressBar">
|
||||||
|
<Setter Property="Height" Value="20"/>
|
||||||
|
<Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}"/>
|
||||||
|
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}"/>
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
|
||||||
|
<Setter Property="BorderThickness" Value="0"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="ProgressBar">
|
||||||
|
<ControlTemplate.Resources>
|
||||||
|
<Storyboard x:Key="OnLoaded">
|
||||||
|
<DoubleAnimationUsingKeyFrames RepeatBehavior="Forever" Storyboard.TargetProperty="(Border.Background).(Brush.Transform).(TransformGroup.Children)[1].(TranslateTransform.X)" Storyboard.TargetName="Indicator">
|
||||||
|
<LinearDoubleKeyFrame KeyTime="0" Value="0"/>
|
||||||
|
<LinearDoubleKeyFrame KeyTime="0:0:.25" Value="21"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
</Storyboard>
|
||||||
|
</ControlTemplate.Resources>
|
||||||
|
<hc:SimplePanel x:Name="TemplateRoot" SnapsToDevicePixels="true">
|
||||||
|
<Border CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}"/>
|
||||||
|
<Rectangle x:Name="PART_Track"/>
|
||||||
|
<Decorator x:Name="PART_Indicator" HorizontalAlignment="Left">
|
||||||
|
<Border x:Name="Indicator" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" Background="{TemplateBinding Foreground}"/>
|
||||||
|
</Decorator>
|
||||||
|
</hc:SimplePanel>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="Orientation" Value="Vertical">
|
||||||
|
<Setter Property="Height" Value="{x:Static system:Double.NaN}"/>
|
||||||
|
<Setter Property="LayoutTransform" TargetName="TemplateRoot">
|
||||||
|
<Setter.Value>
|
||||||
|
<RotateTransform Angle="-90"/>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Trigger>
|
||||||
|
<EventTrigger RoutedEvent="FrameworkElement.Loaded" SourceName="Indicator">
|
||||||
|
<BeginStoryboard Storyboard="{StaticResource OnLoaded}"/>
|
||||||
|
</EventTrigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ProgressBarCircleBaseStyle" TargetType="hc:CircleProgressBar">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}"/>
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
|
||||||
|
<Setter Property="Height" Value="100"/>
|
||||||
|
<Setter Property="Width" Value="100"/>
|
||||||
|
<Setter Property="ArcThickness" Value="4"/>
|
||||||
|
<Setter Property="Text" Value="{Binding Value,RelativeSource={RelativeSource Self},StringFormat={}{0:F0} %}"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="hc:CircleProgressBar">
|
||||||
|
<hc:SimplePanel x:Name="TemplateRoot">
|
||||||
|
<shapes:Arc ArcThickness="{TemplateBinding ArcThickness}" Stretch="None" EndAngle="360" Width="{TemplateBinding ActualWidth}" Height="{TemplateBinding ActualHeight}" Stroke="{TemplateBinding BorderBrush}" Fill="{TemplateBinding Background}" StrokeThickness="0"/>
|
||||||
|
<shapes:Arc ArcThickness="{TemplateBinding ArcThickness}" Stretch="None" Width="{TemplateBinding ActualWidth}" StrokeThickness="0" Height="{TemplateBinding ActualHeight}" x:Name="PART_Indicator" Fill="{TemplateBinding Foreground}"/>
|
||||||
|
<TextBlock Visibility="{Binding ShowText,RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{TemplateBinding Foreground}" Text="{TemplateBinding Text}"/>
|
||||||
|
</hc:SimplePanel>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ProgressBarWaveBaseStyle" TargetType="hc:WaveProgressBar">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}"/>
|
||||||
|
<Setter Property="Width" Value="100"/>
|
||||||
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
|
||||||
|
<Setter Property="Text" Value="{Binding Value,RelativeSource={RelativeSource Self},StringFormat={}{0:F0} %}"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="hc:WaveProgressBar">
|
||||||
|
<ControlTemplate.Resources>
|
||||||
|
<Storyboard x:Key="StoryboardOnLoaded" RepeatBehavior="Forever">
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(TranslateTransform.X)" Storyboard.TargetName="PART_Wave">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0:0:2" Value="-400"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
</Storyboard>
|
||||||
|
</ControlTemplate.Resources>
|
||||||
|
<StackPanel>
|
||||||
|
<Border Style="{StaticResource BorderCircular}" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
|
||||||
|
<Viewbox>
|
||||||
|
<Border x:Name="PART_Clip" Style="{StaticResource BorderCircularClip}" CornerRadius="100" Width="200" Height="200">
|
||||||
|
<Path x:Name="PART_Wave" Stroke="{TemplateBinding WaveStroke}" StrokeThickness="{TemplateBinding WaveThickness}" HorizontalAlignment="Left" VerticalAlignment="Top" Width="600" Height="250" Fill="{TemplateBinding WaveFill}" Stretch="Fill" RenderTransformOrigin="0.5,0.5" Margin="0,0,-400,-20">
|
||||||
|
<Path.Data>
|
||||||
|
<PathGeometry>
|
||||||
|
<PathFigure StartPoint="0,1">
|
||||||
|
<PolyBezierSegment Points="0.5,1 0.5,0 1,0"/>
|
||||||
|
<PolyBezierSegment Points="1.5,0 1.5,1 2,1"/>
|
||||||
|
<PolyBezierSegment Points="2.5,1 2.5,0 3,0"/>
|
||||||
|
<PolyLineSegment Points="3,0 3,10, 0,10 0,1"/>
|
||||||
|
</PathFigure>
|
||||||
|
</PathGeometry>
|
||||||
|
</Path.Data>
|
||||||
|
</Path>
|
||||||
|
</Border>
|
||||||
|
</Viewbox>
|
||||||
|
</Border>
|
||||||
|
<TextBlock Margin="0,10,0,0" Visibility="{Binding ShowText,RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{TemplateBinding Foreground}" Text="{TemplateBinding Text}"/>
|
||||||
|
</StackPanel>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<EventTrigger RoutedEvent="FrameworkElement.Loaded" SourceName="PART_Wave">
|
||||||
|
<BeginStoryboard Name="BeginStoryboardWave" Storyboard="{StaticResource StoryboardOnLoaded}"/>
|
||||||
|
</EventTrigger>
|
||||||
|
<EventTrigger RoutedEvent="FrameworkElement.Unloaded" SourceName="PART_Wave">
|
||||||
|
<StopStoryboard BeginStoryboardName="BeginStoryboardWave"/>
|
||||||
|
</EventTrigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
</ResourceDictionary>
|
@ -0,0 +1,222 @@
|
|||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:hc="clr-namespace:HandyControl.Controls"
|
||||||
|
xmlns:system="clr-namespace:System;assembly=mscorlib"
|
||||||
|
xmlns:themes="clr-namespace:HandyControl.Themes">
|
||||||
|
|
||||||
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Styles/Base/BaseStyle.xaml"/>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Basic/Sizes.xaml"/>
|
||||||
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
|
||||||
|
<Style x:Key="RadioButtonBaseStyle" BasedOn="{StaticResource BaseStyle}" TargetType="RadioButton">
|
||||||
|
<Setter Property="FocusVisualStyle">
|
||||||
|
<Setter.Value>
|
||||||
|
<Style>
|
||||||
|
<Setter Property="Control.Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate>
|
||||||
|
<Rectangle Margin="-4" Opacity=".6" SnapsToDevicePixels="true" Stroke="{DynamicResource SecondaryBorderBrush}" StrokeThickness="2" StrokeDashArray="1 1" RadiusX="4" RadiusY="4"/>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}"/>
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
|
||||||
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||||
|
<Setter Property="Padding" Value="6,0,0,0"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="RadioButton">
|
||||||
|
<ControlTemplate.Resources>
|
||||||
|
<Storyboard x:Key="StoryboardCheckedTrue">
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="optionMark">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0:0:0.1" Value="0.5"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="optionMark">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0:0:0.1" Value="0.5"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
</Storyboard>
|
||||||
|
<Storyboard x:Key="StoryboardCheckedFalse">
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="optionMark">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0:0:0.1" Value="1"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="optionMark">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0:0:0.1" Value="1"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
</Storyboard>
|
||||||
|
</ControlTemplate.Resources>
|
||||||
|
<Grid x:Name="templateRoot" Background="Transparent" SnapsToDevicePixels="True">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Border Height="18" Width="18" x:Name="radioButtonBorder" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="100" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
|
||||||
|
<Ellipse x:Name="optionMark" Fill="White" MinWidth="6" MinHeight="6" RenderTransformOrigin="0.5,0.5">
|
||||||
|
<Ellipse.RenderTransform>
|
||||||
|
<TransformGroup>
|
||||||
|
<ScaleTransform/>
|
||||||
|
</TransformGroup>
|
||||||
|
</Ellipse.RenderTransform>
|
||||||
|
</Ellipse>
|
||||||
|
</Border>
|
||||||
|
<ContentPresenter x:Name="contentPresenter" Visibility="Collapsed" Grid.Column="1" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||||
|
</Grid>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="HasContent" Value="true">
|
||||||
|
<Setter Property="Visibility" TargetName="contentPresenter" Value="Visible"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsMouseOver" Value="true">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<MultiTrigger>
|
||||||
|
<MultiTrigger.Conditions>
|
||||||
|
<Condition Property="IsChecked" Value="true"/>
|
||||||
|
<Condition Property="IsPressed" Value="true"/>
|
||||||
|
</MultiTrigger.Conditions>
|
||||||
|
<Setter Property="Opacity" Value=".8"/>
|
||||||
|
</MultiTrigger>
|
||||||
|
<MultiTrigger>
|
||||||
|
<MultiTrigger.Conditions>
|
||||||
|
<Condition Property="IsChecked" Value="false"/>
|
||||||
|
<Condition Property="IsPressed" Value="true"/>
|
||||||
|
</MultiTrigger.Conditions>
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}"/>
|
||||||
|
</MultiTrigger>
|
||||||
|
<Trigger Property="IsChecked" Value="true">
|
||||||
|
<Trigger.EnterActions>
|
||||||
|
<BeginStoryboard Storyboard="{StaticResource StoryboardCheckedTrue}"/>
|
||||||
|
</Trigger.EnterActions>
|
||||||
|
<Trigger.ExitActions>
|
||||||
|
<BeginStoryboard Storyboard="{StaticResource StoryboardCheckedFalse}"/>
|
||||||
|
</Trigger.ExitActions>
|
||||||
|
<Setter Property="Background" Value="{DynamicResource PrimaryBrush}"/>
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource DarkPrimaryBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsEnabled" Value="False">
|
||||||
|
<Setter Property="Opacity" Value="0.4"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="RadioButtonIconBaseStyle" BasedOn="{StaticResource BaseStyle}" TargetType="RadioButton">
|
||||||
|
<Setter Property="Height" Value="{StaticResource DefaultControlHeight}"/>
|
||||||
|
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisualRadius0}"/>
|
||||||
|
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
|
||||||
|
<Setter Property="BorderThickness" Value="0"/>
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
|
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||||
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||||
|
<Setter Property="hc:BorderElement.CornerRadius" Value="0"/>
|
||||||
|
<Setter Property="Padding" Value="10,0"/>
|
||||||
|
<Setter Property="hc:VisualElement.HighlightBrush" Value="{DynamicResource PrimaryBrush}"/>
|
||||||
|
<Setter Property="hc:IconElement.Width" Value="16"/>
|
||||||
|
<Setter Property="hc:IconElement.Height" Value="16"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="RadioButton">
|
||||||
|
<Border CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
|
||||||
|
<Border Name="BorderHighlight" BorderThickness="3,0,0,0" BorderBrush="Transparent">
|
||||||
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}">
|
||||||
|
<Path x:Name="PathMain" Height="{Binding Path=(hc:IconElement.Height),RelativeSource={RelativeSource TemplatedParent}}" Width="{Binding Path=(hc:IconElement.Width),RelativeSource={RelativeSource TemplatedParent}}" Fill="{TemplateBinding Foreground}" SnapsToDevicePixels="True" Stretch="Uniform" Data="{TemplateBinding hc:IconElement.Geometry}"/>
|
||||||
|
<ContentPresenter x:Name="ContentPresenterMain" RecognizesAccessKey="True" VerticalAlignment="Center" Margin="6,0,0,0" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
</Border>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="Content" Value="{x:Null}">
|
||||||
|
<Setter Property="Visibility" Value="Collapsed" TargetName="ContentPresenterMain"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="hc:IconElement.Geometry" Value="{x:Null}">
|
||||||
|
<Setter Property="Visibility" Value="Collapsed" TargetName="PathMain"/>
|
||||||
|
<Setter Property="Margin" Value="0" TargetName="ContentPresenterMain"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsChecked" Value="True">
|
||||||
|
<Setter Property="BorderBrush" Value="{Binding Path=(hc:VisualElement.HighlightBrush),RelativeSource={RelativeSource TemplatedParent}}" TargetName="BorderHighlight"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
|
<Setter Property="Opacity" Value=".9"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsPressed" Value="True">
|
||||||
|
<Setter Property="Opacity" Value=".6"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsEnabled" Value="False">
|
||||||
|
<Setter Property="Opacity" Value="0.4"/>
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="RadioGroupItemBaseStyle" BasedOn="{StaticResource BaseStyle}" TargetType="RadioButton">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
|
||||||
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||||
|
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||||
|
<Setter Property="hc:BorderElement.CornerRadius" Value="0"/>
|
||||||
|
<Setter Property="Height" Value="{StaticResource DefaultControlHeight}"/>
|
||||||
|
<Setter Property="Padding" Value="10,0"/>
|
||||||
|
<Setter Property="Margin" Value="-1,0,0,0"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="RadioButton">
|
||||||
|
<Border x:Name="BorderRoot" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
|
||||||
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}">
|
||||||
|
<Path x:Name="PathMain" Width="{TemplateBinding hc:IconElement.Width}" Height="{TemplateBinding hc:IconElement.Height}" Fill="{TemplateBinding Foreground}" SnapsToDevicePixels="True" Stretch="Uniform" Data="{TemplateBinding hc:IconElement.Geometry}"/>
|
||||||
|
<ContentPresenter x:Name="contentPresenter" RecognizesAccessKey="True" VerticalAlignment="Center" Margin="6,0,0,0" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
|
<Setter Property="TextElement.Foreground" Value="{DynamicResource PrimaryBrush}" TargetName="contentPresenter"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsChecked" Value="true">
|
||||||
|
<Setter Property="BorderBrush" Value="{Binding Path=(hc:VisualElement.HighlightBorderBrush),RelativeSource={RelativeSource TemplatedParent}}" TargetName="BorderRoot"/>
|
||||||
|
<Setter Property="Background" Value="{Binding Path=(hc:VisualElement.HighlightBackground),RelativeSource={RelativeSource TemplatedParent}}" TargetName="BorderRoot"/>
|
||||||
|
<Setter Property="TextElement.Foreground" Value="{Binding Path=(hc:VisualElement.HighlightForeground),RelativeSource={RelativeSource TemplatedParent}}" TargetName="contentPresenter"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="Content" Value="{x:Null}">
|
||||||
|
<Setter Property="Visibility" Value="Collapsed" TargetName="contentPresenter"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="hc:IconElement.Geometry" Value="{x:Null}">
|
||||||
|
<Setter Property="Visibility" Value="Collapsed" TargetName="PathMain"/>
|
||||||
|
<Setter Property="Margin" Value="0" TargetName="contentPresenter"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="IsEnabled" Value="False">
|
||||||
|
<Setter Property="Opacity" Value="0.4"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsChecked" Value="True">
|
||||||
|
<Setter Property="Panel.ZIndex" Value="{x:Static system:Int32.MaxValue}"/>
|
||||||
|
</Trigger>
|
||||||
|
<DataTrigger Binding="{Binding Orientation,RelativeSource={RelativeSource AncestorType=hc:ButtonGroup}}" Value="Vertical">
|
||||||
|
<Setter Property="Margin" Value="0,-1,0,0"/>
|
||||||
|
</DataTrigger>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsPressed" Value="True">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource BorderBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
</ResourceDictionary>
|
@ -0,0 +1,89 @@
|
|||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:hc="clr-namespace:HandyControl.Controls"
|
||||||
|
xmlns:themes="clr-namespace:HandyControl.Themes">
|
||||||
|
|
||||||
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Basic/Geometries.xaml"/>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Basic/Converters.xaml"/>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Styles/Base/BaseStyle.xaml"/>
|
||||||
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
|
||||||
|
<Style x:Key="RateRateItemBaseStyle" TargetType="hc:RateItem">
|
||||||
|
<Setter Property="Focusable" Value="False"/>
|
||||||
|
<Setter Property="Margin" Value="{Binding ItemMargin,RelativeSource={RelativeSource AncestorType=hc:Rate}}"/>
|
||||||
|
<Setter Property="Width" Value="{Binding ItemWidth,RelativeSource={RelativeSource AncestorType=hc:Rate}}"/>
|
||||||
|
<Setter Property="Height" Value="{Binding ItemHeight,RelativeSource={RelativeSource AncestorType=hc:Rate}}"/>
|
||||||
|
<Setter Property="AllowHalf" Value="{Binding AllowHalf,RelativeSource={RelativeSource AncestorType=hc:Rate}}"/>
|
||||||
|
<Setter Property="AllowClear" Value="{Binding AllowClear,RelativeSource={RelativeSource AncestorType=hc:Rate}}"/>
|
||||||
|
<Setter Property="Icon" Value="{Binding Icon,RelativeSource={RelativeSource AncestorType=hc:Rate}}"/>
|
||||||
|
<Setter Property="IsReadOnly" Value="{Binding IsReadOnly,RelativeSource={RelativeSource AncestorType=hc:Rate}}"/>
|
||||||
|
<Setter Property="Background" Value="{Binding Background,RelativeSource={RelativeSource AncestorType=hc:Rate}}"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="hc:RateItem">
|
||||||
|
<ControlTemplate.Resources>
|
||||||
|
<Storyboard x:Key="OnMouseEnter">
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="CanvasRoot">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0" Value="1.1"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="CanvasRoot">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0" Value="1.1"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
</Storyboard>
|
||||||
|
<Storyboard x:Key="OnMouseLeave">
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="CanvasRoot">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0" Value="1"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="CanvasRoot">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0" Value="1"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
</Storyboard>
|
||||||
|
</ControlTemplate.Resources>
|
||||||
|
<Canvas x:Name="CanvasRoot" RenderTransformOrigin="0.5,0.5">
|
||||||
|
<Canvas.RenderTransform>
|
||||||
|
<TransformGroup>
|
||||||
|
<ScaleTransform/>
|
||||||
|
</TransformGroup>
|
||||||
|
</Canvas.RenderTransform>
|
||||||
|
<Path Width="{Binding ActualWidth,ElementName=CanvasRoot}" Height="{Binding ActualHeight,ElementName=CanvasRoot}" Data="{TemplateBinding Icon}" Fill="{TemplateBinding Background}" Stretch="Uniform"/>
|
||||||
|
<Border x:Name="PART_Icon" Visibility="Collapsed">
|
||||||
|
<Path Width="{Binding ActualWidth,ElementName=CanvasRoot}" HorizontalAlignment="Left" Height="{Binding ActualHeight,ElementName=CanvasRoot}" Data="{TemplateBinding Icon}" Fill="{TemplateBinding Foreground}" Stretch="Uniform"/>
|
||||||
|
</Border>
|
||||||
|
</Canvas>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<EventTrigger RoutedEvent="UIElement.MouseEnter" SourceName="CanvasRoot">
|
||||||
|
<BeginStoryboard Storyboard="{StaticResource OnMouseEnter}"/>
|
||||||
|
</EventTrigger>
|
||||||
|
<EventTrigger RoutedEvent="UIElement.MouseLeave" SourceName="CanvasRoot">
|
||||||
|
<BeginStoryboard Storyboard="{StaticResource OnMouseLeave}"/>
|
||||||
|
</EventTrigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="RateBaseStyle" TargetType="hc:Rate">
|
||||||
|
<Setter Property="Focusable" Value="False"/>
|
||||||
|
<Setter Property="ItemMargin" Value="5,0"/>
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||||
|
<Setter Property="VerticalAlignment" Value="Top"/>
|
||||||
|
<Setter Property="Icon" Value="{StaticResource StarGeometry}"/>
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryBrush}"/>
|
||||||
|
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}"/>
|
||||||
|
<Setter Property="ItemContainerStyle" Value="{StaticResource RateRateItemBaseStyle}"/>
|
||||||
|
<Setter Property="Text" Value="{Binding Value,RelativeSource={RelativeSource Self},StringFormat={}{0:0.0}}"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="hc:Rate">
|
||||||
|
<StackPanel Background="Transparent" Orientation="Horizontal">
|
||||||
|
<UniformGrid Rows="1" Margin="-5,0" x:Name="PART_Panel"/>
|
||||||
|
<TextBlock Visibility="{TemplateBinding ShowText,Converter={StaticResource Boolean2VisibilityConverter}}" Text="{TemplateBinding Text}" Margin="10,0,0,0" VerticalAlignment="Center"/>
|
||||||
|
</StackPanel>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
</ResourceDictionary>
|
@ -0,0 +1,307 @@
|
|||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:hc="clr-namespace:HandyControl.Controls">
|
||||||
|
|
||||||
|
<Style x:Key="ScrollBarBaseRepeatButton" TargetType="RepeatButton">
|
||||||
|
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
||||||
|
<Setter Property="Background" Value="Transparent"/>
|
||||||
|
<Setter Property="Focusable" Value="false"/>
|
||||||
|
<Setter Property="IsTabStop" Value="false"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="RepeatButton">
|
||||||
|
<Rectangle Fill="{TemplateBinding Background}" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}"/>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ScrollBarBaseThumbVertical" TargetType="Thumb">
|
||||||
|
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
||||||
|
<Setter Property="IsTabStop" Value="false"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="Thumb">
|
||||||
|
<ControlTemplate.Resources>
|
||||||
|
<Storyboard x:Key="Storyboard1">
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Width" Storyboard.TargetName="rectangle">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0:0:.1" Value="8"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(Rectangle.RadiusX)" Storyboard.TargetName="rectangle">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0:0:.1" Value="4"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(Rectangle.RadiusY)" Storyboard.TargetName="rectangle">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0:0:.1" Value="4"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(TranslateTransform.X)" Storyboard.TargetName="rectangle">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0:0:.1" Value="0"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
</Storyboard>
|
||||||
|
<Storyboard x:Key="Storyboard2">
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Width" Storyboard.TargetName="rectangle">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0:0:.2" Value="2"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(Rectangle.RadiusX)" Storyboard.TargetName="rectangle">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0:0:.2" Value="1"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(Rectangle.RadiusY)" Storyboard.TargetName="rectangle">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0:0:.2" Value="1"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(TranslateTransform.X)" Storyboard.TargetName="rectangle">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0:0:.2" Value="-2"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
</Storyboard>
|
||||||
|
</ControlTemplate.Resources>
|
||||||
|
<Border Width="{TemplateBinding Width}" Background="Transparent">
|
||||||
|
<Rectangle x:Name="rectangle" RadiusX="1" RadiusY="1" HorizontalAlignment="Right" Height="{TemplateBinding Height}" SnapsToDevicePixels="True" Width="2" Fill="{TemplateBinding Background}">
|
||||||
|
<Rectangle.RenderTransform>
|
||||||
|
<TransformGroup>
|
||||||
|
<TranslateTransform X="-2"/>
|
||||||
|
</TransformGroup>
|
||||||
|
</Rectangle.RenderTransform>
|
||||||
|
</Rectangle>
|
||||||
|
</Border>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="true">
|
||||||
|
<Setter Property="Fill" TargetName="rectangle" Value="{DynamicResource SecondaryTextBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsDragging" Value="true">
|
||||||
|
<Setter Property="Fill" TargetName="rectangle" Value="{DynamicResource PrimaryTextBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<EventTrigger RoutedEvent="Thumb.MouseEnter">
|
||||||
|
<BeginStoryboard Storyboard="{StaticResource Storyboard1}"/>
|
||||||
|
</EventTrigger>
|
||||||
|
<EventTrigger RoutedEvent="Thumb.MouseLeave">
|
||||||
|
<BeginStoryboard Storyboard="{StaticResource Storyboard2}"/>
|
||||||
|
</EventTrigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ScrollBarBaseThumbHorizontal" TargetType="Thumb">
|
||||||
|
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
||||||
|
<Setter Property="IsTabStop" Value="false"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="Thumb">
|
||||||
|
<ControlTemplate.Resources>
|
||||||
|
<Storyboard x:Key="Storyboard1">
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Height" Storyboard.TargetName="rectangle">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0:0:.1" Value="8"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(Rectangle.RadiusX)" Storyboard.TargetName="rectangle">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0:0:.1" Value="4"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(Rectangle.RadiusY)" Storyboard.TargetName="rectangle">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0:0:.1" Value="4"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(TranslateTransform.Y)" Storyboard.TargetName="rectangle">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0:0:.1" Value="0"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
</Storyboard>
|
||||||
|
<Storyboard x:Key="Storyboard2">
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Height" Storyboard.TargetName="rectangle">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0:0:.2" Value="2"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(Rectangle.RadiusX)" Storyboard.TargetName="rectangle">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0:0:.2" Value="1"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(Rectangle.RadiusY)" Storyboard.TargetName="rectangle">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0:0:.2" Value="1"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(TranslateTransform.Y)" Storyboard.TargetName="rectangle">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0:0:.2" Value="-2"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
</Storyboard>
|
||||||
|
</ControlTemplate.Resources>
|
||||||
|
<Border Height="{TemplateBinding Height}" Background="Transparent">
|
||||||
|
<Rectangle x:Name="rectangle" RadiusX="4" RadiusY="4" VerticalAlignment="Bottom" Height="2" SnapsToDevicePixels="True" Width="{TemplateBinding Width}" Fill="{TemplateBinding Background}">
|
||||||
|
<Rectangle.RenderTransform>
|
||||||
|
<TransformGroup>
|
||||||
|
<TranslateTransform Y="-2"/>
|
||||||
|
</TransformGroup>
|
||||||
|
</Rectangle.RenderTransform>
|
||||||
|
</Rectangle>
|
||||||
|
</Border>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="true">
|
||||||
|
<Setter Property="Fill" TargetName="rectangle" Value="{DynamicResource SecondaryTextBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsDragging" Value="true">
|
||||||
|
<Setter Property="Fill" TargetName="rectangle" Value="{DynamicResource PrimaryTextBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<EventTrigger RoutedEvent="Thumb.MouseEnter">
|
||||||
|
<BeginStoryboard Storyboard="{StaticResource Storyboard1}"/>
|
||||||
|
</EventTrigger>
|
||||||
|
<EventTrigger RoutedEvent="Thumb.MouseLeave">
|
||||||
|
<BeginStoryboard Storyboard="{StaticResource Storyboard2}"/>
|
||||||
|
</EventTrigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ScrollBarBaseStyle" TargetType="ScrollBar">
|
||||||
|
<Setter Property="Stylus.IsPressAndHoldEnabled" Value="false"/>
|
||||||
|
<Setter Property="Stylus.IsFlicksEnabled" Value="false"/>
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource ThirdlyTextBrush}"/>
|
||||||
|
<Setter Property="Background" Value="Transparent"/>
|
||||||
|
<Setter Property="Focusable" Value="False"/>
|
||||||
|
<Setter Property="BorderThickness" Value="0"/>
|
||||||
|
<Setter Property="Width" Value="8"/>
|
||||||
|
<Setter Property="MinWidth" Value="8"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="ScrollBar">
|
||||||
|
<hc:SimplePanel x:Name="Bg" SnapsToDevicePixels="true">
|
||||||
|
<Border Background="{TemplateBinding Background}" />
|
||||||
|
<Track x:Name="PART_Track" IsDirectionReversed="true" IsEnabled="{TemplateBinding IsMouseOver}">
|
||||||
|
<Track.DecreaseRepeatButton>
|
||||||
|
<RepeatButton Command="{x:Static ScrollBar.PageUpCommand}" Style="{StaticResource ScrollBarBaseRepeatButton}"/>
|
||||||
|
</Track.DecreaseRepeatButton>
|
||||||
|
<Track.IncreaseRepeatButton>
|
||||||
|
<RepeatButton Command="{x:Static ScrollBar.PageDownCommand}" Style="{StaticResource ScrollBarBaseRepeatButton}"/>
|
||||||
|
</Track.IncreaseRepeatButton>
|
||||||
|
<Track.Thumb>
|
||||||
|
<Thumb Background="{TemplateBinding Foreground}" Style="{StaticResource ScrollBarBaseThumbVertical}"/>
|
||||||
|
</Track.Thumb>
|
||||||
|
</Track>
|
||||||
|
</hc:SimplePanel>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="Orientation" Value="Horizontal">
|
||||||
|
<Setter Property="Width" Value="Auto"/>
|
||||||
|
<Setter Property="MinWidth" Value="0"/>
|
||||||
|
<Setter Property="Height" Value="8"/>
|
||||||
|
<Setter Property="MinHeight" Value="8"/>
|
||||||
|
<Setter Property="BorderThickness" Value="0,1"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="ScrollBar">
|
||||||
|
<hc:SimplePanel x:Name="Bg" SnapsToDevicePixels="true">
|
||||||
|
<Border Background="{TemplateBinding Background}" />
|
||||||
|
<Track x:Name="PART_Track" IsEnabled="{TemplateBinding IsMouseOver}">
|
||||||
|
<Track.DecreaseRepeatButton>
|
||||||
|
<RepeatButton Command="{x:Static ScrollBar.PageLeftCommand}" Style="{StaticResource ScrollBarBaseRepeatButton}"/>
|
||||||
|
</Track.DecreaseRepeatButton>
|
||||||
|
<Track.IncreaseRepeatButton>
|
||||||
|
<RepeatButton Command="{x:Static ScrollBar.PageRightCommand}" Style="{StaticResource ScrollBarBaseRepeatButton}"/>
|
||||||
|
</Track.IncreaseRepeatButton>
|
||||||
|
<Track.Thumb>
|
||||||
|
<Thumb Background="{TemplateBinding Foreground}" Style="{StaticResource ScrollBarBaseThumbHorizontal}"/>
|
||||||
|
</Track.Thumb>
|
||||||
|
</Track>
|
||||||
|
</hc:SimplePanel>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="ScrollViewerNativeBaseControlTemplate" TargetType="ScrollViewer">
|
||||||
|
<ControlTemplate.Resources>
|
||||||
|
<Storyboard x:Key="Storyboard1">
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PART_VerticalScrollBar">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0:0:.1" Value=".8"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PART_HorizontalScrollBar">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0:0:.1" Value=".8"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
</Storyboard>
|
||||||
|
<Storyboard x:Key="Storyboard2">
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PART_VerticalScrollBar">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0:0:.2" Value="0"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PART_HorizontalScrollBar">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0:0:.2" Value="0"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
</Storyboard>
|
||||||
|
</ControlTemplate.Resources>
|
||||||
|
<Grid x:Name="Grid" Background="{TemplateBinding Background}">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="*"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<ScrollContentPresenter x:Name="PART_ScrollContentPresenter" Grid.RowSpan="2" Grid.ColumnSpan="2" CanContentScroll="{TemplateBinding CanContentScroll}" CanHorizontallyScroll="False" CanVerticallyScroll="False" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Grid.Column="0" Margin="{TemplateBinding Padding}" Grid.Row="0"/>
|
||||||
|
<ScrollBar x:Name="PART_VerticalScrollBar" Opacity="0" Style="{StaticResource ScrollBarBaseStyle}" AutomationProperties.AutomationId="VerticalScrollBar" Cursor="Arrow" Grid.Column="1" Maximum="{TemplateBinding ScrollableHeight}" Minimum="0" Grid.Row="0" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportHeight}"/>
|
||||||
|
<ScrollBar x:Name="PART_HorizontalScrollBar" Opacity="0" Style="{StaticResource ScrollBarBaseStyle}" AutomationProperties.AutomationId="HorizontalScrollBar" Cursor="Arrow" Grid.Column="0" Maximum="{TemplateBinding ScrollableWidth}" Minimum="0" Orientation="Horizontal" Grid.Row="1" Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" Value="{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportWidth}"/>
|
||||||
|
</Grid>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
|
<Trigger.EnterActions>
|
||||||
|
<BeginStoryboard Storyboard="{StaticResource Storyboard1}"/>
|
||||||
|
</Trigger.EnterActions>
|
||||||
|
<Trigger.ExitActions>
|
||||||
|
<BeginStoryboard Storyboard="{StaticResource Storyboard2}"/>
|
||||||
|
</Trigger.ExitActions>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<Style x:Key="ScrollViewerNativeBaseStyle" TargetType="ScrollViewer">
|
||||||
|
<Setter Property="VerticalScrollBarVisibility" Value="Auto"/>
|
||||||
|
<Setter Property="Focusable" Value="False"/>
|
||||||
|
<Setter Property="Template" Value="{StaticResource ScrollViewerNativeBaseControlTemplate}"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="ScrollViewerBaseControlTemplate" TargetType="hc:ScrollViewer">
|
||||||
|
<ControlTemplate.Resources>
|
||||||
|
<Storyboard x:Key="Storyboard1">
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PART_VerticalScrollBar">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0:0:.1" Value=".8"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PART_HorizontalScrollBar">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0:0:.1" Value=".8"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
</Storyboard>
|
||||||
|
<Storyboard x:Key="Storyboard2">
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PART_VerticalScrollBar">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0:0:.2" Value="0"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PART_HorizontalScrollBar">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0:0:.2" Value="0"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
</Storyboard>
|
||||||
|
</ControlTemplate.Resources>
|
||||||
|
<Grid x:Name="Grid" Background="{TemplateBinding Background}">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="*"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<ScrollContentPresenter x:Name="PART_ScrollContentPresenter" Grid.RowSpan="2" Grid.ColumnSpan="2" CanContentScroll="{TemplateBinding CanContentScroll}" CanHorizontallyScroll="False" CanVerticallyScroll="False" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Grid.Column="0" Margin="{TemplateBinding Padding}" Grid.Row="0"/>
|
||||||
|
<ScrollBar x:Name="PART_VerticalScrollBar" Opacity="0" Style="{StaticResource ScrollBarBaseStyle}" AutomationProperties.AutomationId="VerticalScrollBar" Cursor="Arrow" Grid.Column="1" Maximum="{TemplateBinding ScrollableHeight}" Minimum="0" Grid.Row="0" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportHeight}"/>
|
||||||
|
<ScrollBar x:Name="PART_HorizontalScrollBar" Opacity="0" Style="{StaticResource ScrollBarBaseStyle}" AutomationProperties.AutomationId="HorizontalScrollBar" Cursor="Arrow" Grid.Column="0" Maximum="{TemplateBinding ScrollableWidth}" Minimum="0" Orientation="Horizontal" Grid.Row="1" Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" Value="{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportWidth}"/>
|
||||||
|
</Grid>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
|
<Trigger.EnterActions>
|
||||||
|
<BeginStoryboard Storyboard="{StaticResource Storyboard1}"/>
|
||||||
|
</Trigger.EnterActions>
|
||||||
|
<Trigger.ExitActions>
|
||||||
|
<BeginStoryboard Storyboard="{StaticResource Storyboard2}"/>
|
||||||
|
</Trigger.ExitActions>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<Style x:Key="ScrollViewerBaseStyle" TargetType="hc:ScrollViewer">
|
||||||
|
<Setter Property="VerticalScrollBarVisibility" Value="Auto"/>
|
||||||
|
<Setter Property="Focusable" Value="False"/>
|
||||||
|
<Setter Property="Template" Value="{StaticResource ScrollViewerBaseControlTemplate}"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
</ResourceDictionary>
|
@ -0,0 +1,969 @@
|
|||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:hc="clr-namespace:HandyControl.Controls"
|
||||||
|
xmlns:themes="clr-namespace:HandyControl.Themes">
|
||||||
|
|
||||||
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Styles/Base/BaseStyle.xaml"/>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Basic/Geometries.xaml"/>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Basic/Effects.xaml"/>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Styles/Label.xaml"/>
|
||||||
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
|
||||||
|
<!--region Common-->
|
||||||
|
|
||||||
|
<Style x:Key="SliderRepeatButtonHorizontalStyle" TargetType="RepeatButton">
|
||||||
|
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
||||||
|
<Setter Property="Background" Value="Transparent"/>
|
||||||
|
<Setter Property="Focusable" Value="false"/>
|
||||||
|
<Setter Property="IsTabStop" Value="false"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="RepeatButton">
|
||||||
|
<Border Background="Transparent" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}">
|
||||||
|
<Rectangle StrokeThickness="0" Fill="{TemplateBinding Background}" Height="2"/>
|
||||||
|
</Border>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="SliderRepeatButtonVerticalStyle" TargetType="RepeatButton">
|
||||||
|
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
||||||
|
<Setter Property="Background" Value="Transparent"/>
|
||||||
|
<Setter Property="Focusable" Value="false"/>
|
||||||
|
<Setter Property="IsTabStop" Value="false"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="RepeatButton">
|
||||||
|
<Border Background="Transparent" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}">
|
||||||
|
<Rectangle StrokeThickness="0" Fill="{TemplateBinding Background}" Width="2"/>
|
||||||
|
</Border>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="SliderThumb" TargetType="Thumb">
|
||||||
|
<Border Effect="{StaticResource EffectShadow1}" Name="BorderDot" BorderThickness="0" BorderBrush="{DynamicResource PrimaryBrush}" Width="18" Height="18" Background="White" CornerRadius="9"/>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
|
<Setter Property="Effect" Value="{StaticResource EffectShadow2}"/>
|
||||||
|
</Trigger>
|
||||||
|
<EventTrigger RoutedEvent="Thumb.PreviewMouseLeftButtonDown">
|
||||||
|
<EventTrigger.Actions>
|
||||||
|
<BeginStoryboard>
|
||||||
|
<Storyboard>
|
||||||
|
<ThicknessAnimation To="2" Duration="0:0:.1" Storyboard.TargetName="BorderDot" Storyboard.TargetProperty="BorderThickness"/>
|
||||||
|
</Storyboard>
|
||||||
|
</BeginStoryboard>
|
||||||
|
</EventTrigger.Actions>
|
||||||
|
</EventTrigger>
|
||||||
|
<EventTrigger RoutedEvent="Thumb.PreviewMouseLeftButtonUp">
|
||||||
|
<EventTrigger.Actions>
|
||||||
|
<BeginStoryboard>
|
||||||
|
<Storyboard>
|
||||||
|
<ThicknessAnimation To="0" Duration="0:0:.1" Storyboard.TargetName="BorderDot" Storyboard.TargetProperty="BorderThickness"/>
|
||||||
|
</Storyboard>
|
||||||
|
</BeginStoryboard>
|
||||||
|
</EventTrigger.Actions>
|
||||||
|
</EventTrigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="TipSliderThumbHorizontalTop" TargetType="Thumb">
|
||||||
|
<hc:InternalCanvas>
|
||||||
|
<Label Name="LabelValue" IsHitTestVisible="False" Opacity="0" Canvas.Bottom="28" Style="{StaticResource LabelPrimary}" Content="{Binding Value,RelativeSource={RelativeSource AncestorType=Slider}}" ContentStringFormat="{Binding Path=(hc:TipElement.StringFormat),RelativeSource={RelativeSource AncestorType=Slider}}"/>
|
||||||
|
<Border Canvas.Bottom="0" Effect="{StaticResource EffectShadow1}" Name="BorderDot" BorderThickness="0" BorderBrush="{DynamicResource PrimaryBrush}" Width="18" Height="18" Background="White" CornerRadius="9"/>
|
||||||
|
</hc:InternalCanvas>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
|
<Setter Property="Effect" Value="{StaticResource EffectShadow2}" TargetName="BorderDot"/>
|
||||||
|
<Setter Property="Opacity" Value="1" TargetName="LabelValue"/>
|
||||||
|
</Trigger>
|
||||||
|
<EventTrigger RoutedEvent="Thumb.PreviewMouseLeftButtonDown">
|
||||||
|
<EventTrigger.Actions>
|
||||||
|
<BeginStoryboard>
|
||||||
|
<Storyboard>
|
||||||
|
<ThicknessAnimation To="2" Duration="0:0:.1" Storyboard.TargetName="BorderDot" Storyboard.TargetProperty="BorderThickness"/>
|
||||||
|
</Storyboard>
|
||||||
|
</BeginStoryboard>
|
||||||
|
</EventTrigger.Actions>
|
||||||
|
</EventTrigger>
|
||||||
|
<EventTrigger RoutedEvent="Thumb.PreviewMouseLeftButtonUp">
|
||||||
|
<EventTrigger.Actions>
|
||||||
|
<BeginStoryboard>
|
||||||
|
<Storyboard>
|
||||||
|
<ThicknessAnimation To="0" Duration="0:0:.1" Storyboard.TargetName="BorderDot" Storyboard.TargetProperty="BorderThickness"/>
|
||||||
|
</Storyboard>
|
||||||
|
</BeginStoryboard>
|
||||||
|
</EventTrigger.Actions>
|
||||||
|
</EventTrigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="TipSliderThumbHorizontalBottom" TargetType="Thumb">
|
||||||
|
<hc:InternalCanvas>
|
||||||
|
<Label Name="LabelValue" IsHitTestVisible="False" Opacity="0" Canvas.Top="28" Style="{StaticResource LabelPrimary}" Content="{Binding Value,RelativeSource={RelativeSource AncestorType=Slider}}" ContentStringFormat="{Binding Path=(hc:TipElement.StringFormat),RelativeSource={RelativeSource AncestorType=Slider}}"/>
|
||||||
|
<Border Canvas.Bottom="0" Effect="{StaticResource EffectShadow1}" Name="BorderDot" BorderThickness="0" BorderBrush="{DynamicResource PrimaryBrush}" Width="18" Height="18" Background="White" CornerRadius="9"/>
|
||||||
|
</hc:InternalCanvas>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
|
<Setter Property="Effect" Value="{StaticResource EffectShadow2}" TargetName="BorderDot"/>
|
||||||
|
<Setter Property="Opacity" Value="1" TargetName="LabelValue"/>
|
||||||
|
</Trigger>
|
||||||
|
<EventTrigger RoutedEvent="Thumb.PreviewMouseLeftButtonDown">
|
||||||
|
<EventTrigger.Actions>
|
||||||
|
<BeginStoryboard>
|
||||||
|
<Storyboard>
|
||||||
|
<ThicknessAnimation To="2" Duration="0:0:.1" Storyboard.TargetName="BorderDot" Storyboard.TargetProperty="BorderThickness"/>
|
||||||
|
</Storyboard>
|
||||||
|
</BeginStoryboard>
|
||||||
|
</EventTrigger.Actions>
|
||||||
|
</EventTrigger>
|
||||||
|
<EventTrigger RoutedEvent="Thumb.PreviewMouseLeftButtonUp">
|
||||||
|
<EventTrigger.Actions>
|
||||||
|
<BeginStoryboard>
|
||||||
|
<Storyboard>
|
||||||
|
<ThicknessAnimation To="0" Duration="0:0:.1" Storyboard.TargetName="BorderDot" Storyboard.TargetProperty="BorderThickness"/>
|
||||||
|
</Storyboard>
|
||||||
|
</BeginStoryboard>
|
||||||
|
</EventTrigger.Actions>
|
||||||
|
</EventTrigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="TipSliderThumbVerticalLeft" TargetType="Thumb">
|
||||||
|
<hc:InternalCanvas Orientation="Vertical">
|
||||||
|
<Label Name="LabelValue" IsHitTestVisible="False" Opacity="0" Canvas.Right="28" Style="{StaticResource LabelPrimary}" Content="{Binding Value,RelativeSource={RelativeSource AncestorType=Slider}}" ContentStringFormat="{Binding Path=(hc:TipElement.StringFormat),RelativeSource={RelativeSource AncestorType=Slider}}"/>
|
||||||
|
<Border Canvas.Right="0" Effect="{StaticResource EffectShadow1}" Name="BorderDot" BorderThickness="0" BorderBrush="{DynamicResource PrimaryBrush}" Width="18" Height="18" Background="White" CornerRadius="9"/>
|
||||||
|
</hc:InternalCanvas>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
|
<Setter Property="Effect" Value="{StaticResource EffectShadow2}" TargetName="BorderDot"/>
|
||||||
|
<Setter Property="Opacity" Value="1" TargetName="LabelValue"/>
|
||||||
|
</Trigger>
|
||||||
|
<EventTrigger RoutedEvent="Thumb.PreviewMouseLeftButtonDown">
|
||||||
|
<EventTrigger.Actions>
|
||||||
|
<BeginStoryboard>
|
||||||
|
<Storyboard>
|
||||||
|
<ThicknessAnimation To="2" Duration="0:0:.1" Storyboard.TargetName="BorderDot" Storyboard.TargetProperty="BorderThickness"/>
|
||||||
|
</Storyboard>
|
||||||
|
</BeginStoryboard>
|
||||||
|
</EventTrigger.Actions>
|
||||||
|
</EventTrigger>
|
||||||
|
<EventTrigger RoutedEvent="Thumb.PreviewMouseLeftButtonUp">
|
||||||
|
<EventTrigger.Actions>
|
||||||
|
<BeginStoryboard>
|
||||||
|
<Storyboard>
|
||||||
|
<ThicknessAnimation To="0" Duration="0:0:.1" Storyboard.TargetName="BorderDot" Storyboard.TargetProperty="BorderThickness"/>
|
||||||
|
</Storyboard>
|
||||||
|
</BeginStoryboard>
|
||||||
|
</EventTrigger.Actions>
|
||||||
|
</EventTrigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="TipSliderThumbVerticalRight" TargetType="Thumb">
|
||||||
|
<hc:InternalCanvas Orientation="Vertical">
|
||||||
|
<Label Name="LabelValue" IsHitTestVisible="False" Opacity="0" Canvas.Left="28" Style="{StaticResource LabelPrimary}" Content="{Binding Value,RelativeSource={RelativeSource AncestorType=Slider}}" ContentStringFormat="{Binding Path=(hc:TipElement.StringFormat),RelativeSource={RelativeSource AncestorType=Slider}}"/>
|
||||||
|
<Border Canvas.Right="0" Effect="{StaticResource EffectShadow1}" Name="BorderDot" BorderThickness="0" BorderBrush="{DynamicResource PrimaryBrush}" Width="18" Height="18" Background="White" CornerRadius="9"/>
|
||||||
|
</hc:InternalCanvas>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
|
<Setter Property="Effect" Value="{StaticResource EffectShadow2}" TargetName="BorderDot"/>
|
||||||
|
<Setter Property="Opacity" Value="1" TargetName="LabelValue"/>
|
||||||
|
</Trigger>
|
||||||
|
<EventTrigger RoutedEvent="Thumb.PreviewMouseLeftButtonDown">
|
||||||
|
<EventTrigger.Actions>
|
||||||
|
<BeginStoryboard>
|
||||||
|
<Storyboard>
|
||||||
|
<ThicknessAnimation To="2" Duration="0:0:.1" Storyboard.TargetName="BorderDot" Storyboard.TargetProperty="BorderThickness"/>
|
||||||
|
</Storyboard>
|
||||||
|
</BeginStoryboard>
|
||||||
|
</EventTrigger.Actions>
|
||||||
|
</EventTrigger>
|
||||||
|
<EventTrigger RoutedEvent="Thumb.PreviewMouseLeftButtonUp">
|
||||||
|
<EventTrigger.Actions>
|
||||||
|
<BeginStoryboard>
|
||||||
|
<Storyboard>
|
||||||
|
<ThicknessAnimation To="0" Duration="0:0:.1" Storyboard.TargetName="BorderDot" Storyboard.TargetProperty="BorderThickness"/>
|
||||||
|
</Storyboard>
|
||||||
|
</BeginStoryboard>
|
||||||
|
</EventTrigger.Actions>
|
||||||
|
</EventTrigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="SliderHorizontal" TargetType="Slider">
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto" MinHeight="{TemplateBinding MinHeight}"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<TickBar x:Name="TopTick" Fill="{TemplateBinding Foreground}" Height="4" Margin="0,0,0,2" Placement="Top" Grid.Row="0" Visibility="Collapsed"/>
|
||||||
|
<TickBar x:Name="BottomTick" Fill="{TemplateBinding Foreground}" Height="4" Margin="0,2,0,0" Placement="Bottom" Grid.Row="2" Visibility="Collapsed"/>
|
||||||
|
<Border x:Name="TrackBackground" Background="{TemplateBinding Background}" Grid.Row="1" Height="2" VerticalAlignment="center" Margin="9,0">
|
||||||
|
<Canvas x:Name="Canvas_SelectionRange" Visibility="Hidden">
|
||||||
|
<Rectangle x:Name="PART_SelectionRange" Fill="{DynamicResource AccentBrush}" Height="2"/>
|
||||||
|
</Canvas>
|
||||||
|
</Border>
|
||||||
|
<Track Margin="9,0" x:Name="PART_Track" Grid.Row="1">
|
||||||
|
<Track.DecreaseRepeatButton>
|
||||||
|
<RepeatButton Command="{x:Static Slider.DecreaseLarge}" Background="{DynamicResource PrimaryBrush}" Style="{StaticResource SliderRepeatButtonHorizontalStyle}"/>
|
||||||
|
</Track.DecreaseRepeatButton>
|
||||||
|
<Track.IncreaseRepeatButton>
|
||||||
|
<RepeatButton Command="{x:Static Slider.IncreaseLarge}" Style="{StaticResource SliderRepeatButtonHorizontalStyle}"/>
|
||||||
|
</Track.IncreaseRepeatButton>
|
||||||
|
<Track.Thumb>
|
||||||
|
<Thumb ClipToBounds="False" Width="18" Margin="-9,0" Height="18" x:Name="Thumb" Focusable="False" OverridesDefaultStyle="True" Template="{StaticResource SliderThumb}" VerticalAlignment="Center"/>
|
||||||
|
</Track.Thumb>
|
||||||
|
</Track>
|
||||||
|
</Grid>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<MultiTrigger>
|
||||||
|
<MultiTrigger.Conditions>
|
||||||
|
<Condition Property="hc:TipElement.Placement" Value="Top"/>
|
||||||
|
<Condition Property="hc:TipElement.Visibility" Value="Visible"/>
|
||||||
|
</MultiTrigger.Conditions>
|
||||||
|
<Setter Property="Template" TargetName="Thumb" Value="{StaticResource TipSliderThumbHorizontalTop}"/>
|
||||||
|
</MultiTrigger>
|
||||||
|
<MultiTrigger>
|
||||||
|
<MultiTrigger.Conditions>
|
||||||
|
<Condition Property="hc:TipElement.Placement" Value="Bottom"/>
|
||||||
|
<Condition Property="hc:TipElement.Visibility" Value="Visible"/>
|
||||||
|
</MultiTrigger.Conditions>
|
||||||
|
<Setter Property="Template" TargetName="Thumb" Value="{StaticResource TipSliderThumbHorizontalBottom}"/>
|
||||||
|
</MultiTrigger>
|
||||||
|
<Trigger Property="TickPlacement" Value="TopLeft">
|
||||||
|
<Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="TickPlacement" Value="BottomRight">
|
||||||
|
<Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="TickPlacement" Value="Both">
|
||||||
|
<Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
|
||||||
|
<Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsSelectionRangeEnabled" Value="true">
|
||||||
|
<Setter Property="Visibility" TargetName="Canvas_SelectionRange" Value="Visible"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="SliderVertical" TargetType="Slider">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition MinWidth="{TemplateBinding MinWidth}" Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<TickBar x:Name="TopTick" Grid.Column="0" Fill="{TemplateBinding Foreground}" Margin="0,0,2,0" Placement="Left" Visibility="Collapsed" Width="4"/>
|
||||||
|
<TickBar x:Name="BottomTick" Grid.Column="2" Fill="{TemplateBinding Foreground}" Margin="2,0,0,0" Placement="Right" Visibility="Collapsed" Width="4"/>
|
||||||
|
<Border x:Name="TrackBackground" Background="{TemplateBinding Background}" Grid.Column="1" HorizontalAlignment="center" Margin="0,9" Width="2">
|
||||||
|
<Canvas x:Name="Canvas_SelectionRange" Visibility="Hidden">
|
||||||
|
<Rectangle x:Name="PART_SelectionRange" Fill="{DynamicResource AccentBrush}" Width="2"/>
|
||||||
|
</Canvas>
|
||||||
|
</Border>
|
||||||
|
<Track Margin="0,9" x:Name="PART_Track" Grid.Column="1">
|
||||||
|
<Track.DecreaseRepeatButton>
|
||||||
|
<RepeatButton Command="{x:Static Slider.DecreaseLarge}" Background="{DynamicResource PrimaryBrush}" Style="{StaticResource SliderRepeatButtonVerticalStyle}"/>
|
||||||
|
</Track.DecreaseRepeatButton>
|
||||||
|
<Track.IncreaseRepeatButton>
|
||||||
|
<RepeatButton Command="{x:Static Slider.IncreaseLarge}" Style="{StaticResource SliderRepeatButtonVerticalStyle}"/>
|
||||||
|
</Track.IncreaseRepeatButton>
|
||||||
|
<Track.Thumb>
|
||||||
|
<Thumb Margin="0,-9" x:Name="Thumb" Focusable="False" Height="18" OverridesDefaultStyle="True" Template="{StaticResource SliderThumb}" HorizontalAlignment="Center" Width="18"/>
|
||||||
|
</Track.Thumb>
|
||||||
|
</Track>
|
||||||
|
</Grid>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<MultiTrigger>
|
||||||
|
<MultiTrigger.Conditions>
|
||||||
|
<Condition Property="hc:TipElement.Placement" Value="Left"/>
|
||||||
|
<Condition Property="hc:TipElement.Visibility" Value="Visible"/>
|
||||||
|
</MultiTrigger.Conditions>
|
||||||
|
<Setter Property="Template" TargetName="Thumb" Value="{StaticResource TipSliderThumbVerticalLeft}"/>
|
||||||
|
</MultiTrigger>
|
||||||
|
<MultiTrigger>
|
||||||
|
<MultiTrigger.Conditions>
|
||||||
|
<Condition Property="hc:TipElement.Placement" Value="Right"/>
|
||||||
|
<Condition Property="hc:TipElement.Visibility" Value="Visible"/>
|
||||||
|
</MultiTrigger.Conditions>
|
||||||
|
<Setter Property="Template" TargetName="Thumb" Value="{StaticResource TipSliderThumbVerticalRight}"/>
|
||||||
|
</MultiTrigger>
|
||||||
|
<Trigger Property="TickPlacement" Value="TopLeft">
|
||||||
|
<Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="TickPlacement" Value="BottomRight">
|
||||||
|
<Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="TickPlacement" Value="Both">
|
||||||
|
<Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
|
||||||
|
<Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsSelectionRangeEnabled" Value="true">
|
||||||
|
<Setter Property="Visibility" TargetName="Canvas_SelectionRange" Value="Visible"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<Style x:Key="SliderBaseStyle" BasedOn="{StaticResource BaseStyle}" TargetType="Slider">
|
||||||
|
<Setter Property="Stylus.IsPressAndHoldEnabled" Value="false"/>
|
||||||
|
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}"/>
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource DarkPrimaryBrush}"/>
|
||||||
|
<Setter Property="Template" Value="{StaticResource SliderHorizontal}"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="Orientation" Value="Vertical">
|
||||||
|
<Setter Property="Template" Value="{StaticResource SliderVertical}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsEnabled" Value="False">
|
||||||
|
<Setter Property="Opacity" Value=".4"/>
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!--endregion-->
|
||||||
|
|
||||||
|
<!--region CompareSlider-->
|
||||||
|
|
||||||
|
<Style x:Key="CompareSliderRepeatButtonTransparent" TargetType="RepeatButton">
|
||||||
|
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
||||||
|
<Setter Property="Background" Value="Transparent"/>
|
||||||
|
<Setter Property="Focusable" Value="false"/>
|
||||||
|
<Setter Property="IsTabStop" Value="false"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="RepeatButton">
|
||||||
|
<ContentPresenter Content="{TemplateBinding Content}" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}"/>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="CompareSliderThumbHorizontal" TargetType="Thumb">
|
||||||
|
<ControlTemplate.Resources>
|
||||||
|
<Storyboard x:Key="Storyboard1">
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(TranslateTransform.X)" Storyboard.TargetName="PathLeft">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0" Value="-2"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(TranslateTransform.X)" Storyboard.TargetName="PathRight">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0" Value="2"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
</Storyboard>
|
||||||
|
<Storyboard x:Key="Storyboard2">
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(TranslateTransform.X)" Storyboard.TargetName="PathLeft">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0" Value="0"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(TranslateTransform.X)" Storyboard.TargetName="PathRight">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0" Value="0"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
</Storyboard>
|
||||||
|
</ControlTemplate.Resources>
|
||||||
|
<hc:SimplePanel>
|
||||||
|
<Border Width="1" HorizontalAlignment="Center">
|
||||||
|
<Border.Background>
|
||||||
|
<DrawingBrush RenderOptions.CachingHint="Cache" Viewport="0,0,1,8" ViewportUnits="Absolute" Stretch="None" TileMode="Tile">
|
||||||
|
<DrawingBrush.Drawing>
|
||||||
|
<DrawingGroup>
|
||||||
|
<GeometryDrawing Brush="{DynamicResource BorderBrush}">
|
||||||
|
<GeometryDrawing.Geometry>
|
||||||
|
<GeometryGroup>
|
||||||
|
<RectangleGeometry Rect="0,0,1,4" />
|
||||||
|
</GeometryGroup>
|
||||||
|
</GeometryDrawing.Geometry>
|
||||||
|
</GeometryDrawing>
|
||||||
|
</DrawingGroup>
|
||||||
|
</DrawingBrush.Drawing>
|
||||||
|
</DrawingBrush>
|
||||||
|
</Border.Background>
|
||||||
|
</Border>
|
||||||
|
<Border x:Name="grip" Width="30" Height="30" CornerRadius="15" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}" Background="White">
|
||||||
|
<hc:SimplePanel Width="30" Height="30" Margin="-1,-1,0,0">
|
||||||
|
<Path x:Name="PathLeft" Data="{StaticResource LeftGeometry}" StrokeThickness="1" Stroke="{DynamicResource PrimaryBrush}" Margin="6,8" HorizontalAlignment="Left" Stretch="Uniform" Width="12" Height="12" RenderTransformOrigin="0.5,0.5">
|
||||||
|
<Path.RenderTransform>
|
||||||
|
<TransformGroup>
|
||||||
|
<TranslateTransform/>
|
||||||
|
</TransformGroup>
|
||||||
|
</Path.RenderTransform>
|
||||||
|
</Path>
|
||||||
|
<Path x:Name="PathRight" Data="{StaticResource RightGeometry}" StrokeThickness="1" Stroke="{DynamicResource PrimaryBrush}" Margin="6,8" HorizontalAlignment="Right" Stretch="Uniform" Width="12" Height="12" RenderTransformOrigin="0.5,0.5">
|
||||||
|
<Path.RenderTransform>
|
||||||
|
<TransformGroup>
|
||||||
|
<TranslateTransform/>
|
||||||
|
</TransformGroup>
|
||||||
|
</Path.RenderTransform>
|
||||||
|
</Path>
|
||||||
|
</hc:SimplePanel>
|
||||||
|
</Border>
|
||||||
|
</hc:SimplePanel>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="true">
|
||||||
|
<Setter Property="Background" TargetName="grip" Value="{DynamicResource PrimaryBrush}"/>
|
||||||
|
<Setter Property="Stroke" TargetName="PathLeft" Value="White"/>
|
||||||
|
<Setter Property="Stroke" TargetName="PathRight" Value="White"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsDragging" Value="true">
|
||||||
|
<Trigger.EnterActions>
|
||||||
|
<BeginStoryboard Storyboard="{StaticResource Storyboard1}"/>
|
||||||
|
</Trigger.EnterActions>
|
||||||
|
<Trigger.ExitActions>
|
||||||
|
<BeginStoryboard Storyboard="{StaticResource Storyboard2}"/>
|
||||||
|
</Trigger.ExitActions>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="CompareSliderHorizontal" TargetType="hc:CompareSlider">
|
||||||
|
<Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
|
||||||
|
<hc:CompareTrack Margin="-14,0,-15,0" x:Name="PART_Track">
|
||||||
|
<Track.DecreaseRepeatButton>
|
||||||
|
<RepeatButton Margin="14,0,-15,0" Command="{x:Static Slider.DecreaseLarge}" Style="{StaticResource CompareSliderRepeatButtonTransparent}">
|
||||||
|
<RepeatButton.Content>
|
||||||
|
<Border HorizontalAlignment="Left" Width="{TemplateBinding Width}">
|
||||||
|
<ContentPresenter Content="{TemplateBinding TargetContent}"/>
|
||||||
|
</Border>
|
||||||
|
</RepeatButton.Content>
|
||||||
|
</RepeatButton>
|
||||||
|
</Track.DecreaseRepeatButton>
|
||||||
|
<Track.IncreaseRepeatButton>
|
||||||
|
<RepeatButton Margin="-15,0,15,0" Command="{x:Static Slider.IncreaseLarge}" Style="{StaticResource CompareSliderRepeatButtonTransparent}">
|
||||||
|
<RepeatButton.Content>
|
||||||
|
<Border HorizontalAlignment="Right" Width="{TemplateBinding ActualWidth}">
|
||||||
|
<ContentPresenter Content="{TemplateBinding SourceContent}"/>
|
||||||
|
</Border>
|
||||||
|
</RepeatButton.Content>
|
||||||
|
</RepeatButton>
|
||||||
|
</Track.IncreaseRepeatButton>
|
||||||
|
<Track.Thumb>
|
||||||
|
<Thumb x:Name="Thumb" Focusable="False" OverridesDefaultStyle="True" Template="{StaticResource CompareSliderThumbHorizontal}" Width="30" Margin="0,0,0,0"/>
|
||||||
|
</Track.Thumb>
|
||||||
|
</hc:CompareTrack>
|
||||||
|
</Border>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="CompareSliderThumbVertical" TargetType="Thumb">
|
||||||
|
<ControlTemplate.Resources>
|
||||||
|
<Storyboard x:Key="Storyboard1">
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(TranslateTransform.Y)" Storyboard.TargetName="PathUp">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0" Value="-2"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(TranslateTransform.Y)" Storyboard.TargetName="PathDown">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0" Value="2"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
</Storyboard>
|
||||||
|
<Storyboard x:Key="Storyboard2">
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(TranslateTransform.Y)" Storyboard.TargetName="PathUp">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0" Value="0"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(TranslateTransform.Y)" Storyboard.TargetName="PathDown">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0" Value="0"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
</Storyboard>
|
||||||
|
</ControlTemplate.Resources>
|
||||||
|
<hc:SimplePanel>
|
||||||
|
<Border Height="1" VerticalAlignment="Center">
|
||||||
|
<Border.Background>
|
||||||
|
<DrawingBrush RenderOptions.CachingHint="Cache" Viewport="0,0,8,1" ViewportUnits="Absolute" Stretch="None" TileMode="Tile">
|
||||||
|
<DrawingBrush.Drawing>
|
||||||
|
<DrawingGroup>
|
||||||
|
<GeometryDrawing Brush="{DynamicResource BorderBrush}">
|
||||||
|
<GeometryDrawing.Geometry>
|
||||||
|
<GeometryGroup>
|
||||||
|
<RectangleGeometry Rect="0,0,4,1" />
|
||||||
|
</GeometryGroup>
|
||||||
|
</GeometryDrawing.Geometry>
|
||||||
|
</GeometryDrawing>
|
||||||
|
</DrawingGroup>
|
||||||
|
</DrawingBrush.Drawing>
|
||||||
|
</DrawingBrush>
|
||||||
|
</Border.Background>
|
||||||
|
</Border>
|
||||||
|
<Border x:Name="grip" Width="30" Height="30" CornerRadius="15" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}" Background="White">
|
||||||
|
<hc:SimplePanel Width="30" Height="30" Margin="-1,-1,0,0">
|
||||||
|
<Path x:Name="PathUp" Data="{StaticResource UpGeometry}" StrokeThickness="1" Stroke="{DynamicResource PrimaryBrush}" Margin="9,6" VerticalAlignment="Top" Stretch="Uniform" Width="12" Height="12" RenderTransformOrigin="0.5,0.5">
|
||||||
|
<Path.RenderTransform>
|
||||||
|
<TransformGroup>
|
||||||
|
<TranslateTransform/>
|
||||||
|
</TransformGroup>
|
||||||
|
</Path.RenderTransform>
|
||||||
|
</Path>
|
||||||
|
<Path x:Name="PathDown" Data="{StaticResource DownGeometry}" StrokeThickness="1" Stroke="{DynamicResource PrimaryBrush}" Margin="9,6" VerticalAlignment="Bottom" Stretch="Uniform" Width="12" Height="12" RenderTransformOrigin="0.5,0.5">
|
||||||
|
<Path.RenderTransform>
|
||||||
|
<TransformGroup>
|
||||||
|
<TranslateTransform/>
|
||||||
|
</TransformGroup>
|
||||||
|
</Path.RenderTransform>
|
||||||
|
</Path>
|
||||||
|
</hc:SimplePanel>
|
||||||
|
</Border>
|
||||||
|
</hc:SimplePanel>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="true" SourceName="grip">
|
||||||
|
<Setter Property="Background" TargetName="grip" Value="{DynamicResource PrimaryBrush}"/>
|
||||||
|
<Setter Property="Stroke" TargetName="PathUp" Value="White"/>
|
||||||
|
<Setter Property="Stroke" TargetName="PathDown" Value="White"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsDragging" Value="true">
|
||||||
|
<Setter Property="Background" TargetName="grip" Value="{DynamicResource PrimaryBrush}"/>
|
||||||
|
<Setter Property="Stroke" TargetName="PathUp" Value="White"/>
|
||||||
|
<Setter Property="Stroke" TargetName="PathDown" Value="White"/>
|
||||||
|
<Trigger.EnterActions>
|
||||||
|
<BeginStoryboard Storyboard="{StaticResource Storyboard1}"/>
|
||||||
|
</Trigger.EnterActions>
|
||||||
|
<Trigger.ExitActions>
|
||||||
|
<BeginStoryboard Storyboard="{StaticResource Storyboard2}"/>
|
||||||
|
</Trigger.ExitActions>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="CompareSliderVertical" TargetType="hc:CompareSlider">
|
||||||
|
<Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
|
||||||
|
<hc:CompareTrack Margin="0,-14,0,-15" x:Name="PART_Track">
|
||||||
|
<Track.DecreaseRepeatButton>
|
||||||
|
<RepeatButton Margin="0,-15,0,15" Command="{x:Static Slider.DecreaseLarge}" Style="{StaticResource CompareSliderRepeatButtonTransparent}">
|
||||||
|
<RepeatButton.Content>
|
||||||
|
<Border VerticalAlignment="Bottom" Height="{TemplateBinding Height}">
|
||||||
|
<ContentPresenter Content="{TemplateBinding TargetContent}"/>
|
||||||
|
</Border>
|
||||||
|
</RepeatButton.Content>
|
||||||
|
</RepeatButton>
|
||||||
|
</Track.DecreaseRepeatButton>
|
||||||
|
<Track.IncreaseRepeatButton>
|
||||||
|
<RepeatButton Margin="0,14,0,-15" Command="{x:Static Slider.IncreaseLarge}" Style="{StaticResource CompareSliderRepeatButtonTransparent}">
|
||||||
|
<RepeatButton.Content>
|
||||||
|
<Border VerticalAlignment="Top" Height="{TemplateBinding Height}">
|
||||||
|
<ContentPresenter Content="{TemplateBinding SourceContent}"/>
|
||||||
|
</Border>
|
||||||
|
</RepeatButton.Content>
|
||||||
|
</RepeatButton>
|
||||||
|
</Track.IncreaseRepeatButton>
|
||||||
|
<Track.Thumb>
|
||||||
|
<Thumb x:Name="Thumb" Focusable="False" Height="30" OverridesDefaultStyle="True" Template="{StaticResource CompareSliderThumbVertical}" VerticalAlignment="Top"/>
|
||||||
|
</Track.Thumb>
|
||||||
|
</hc:CompareTrack>
|
||||||
|
</Border>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<Style x:Key="CompareSliderBaseStyle" TargetType="hc:CompareSlider">
|
||||||
|
<Setter Property="Focusable" Value="False"/>
|
||||||
|
<Setter Property="Stylus.IsPressAndHoldEnabled" Value="false"/>
|
||||||
|
<Setter Property="Background" Value="Transparent"/>
|
||||||
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
|
||||||
|
<Setter Property="MinWidth" Value="30"/>
|
||||||
|
<Setter Property="MinHeight" Value="30"/>
|
||||||
|
<Setter Property="Template" Value="{StaticResource CompareSliderHorizontal}"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="Orientation" Value="Vertical">
|
||||||
|
<Setter Property="Template" Value="{StaticResource CompareSliderVertical}"/>
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!--endregion-->
|
||||||
|
|
||||||
|
<!--region PreviewSlider-->
|
||||||
|
|
||||||
|
<Style x:Key="PreviewSliderRepeatButtonHorizontalStyle" TargetType="RepeatButton">
|
||||||
|
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
||||||
|
<Setter Property="Background" Value="Transparent"/>
|
||||||
|
<Setter Property="Focusable" Value="false"/>
|
||||||
|
<Setter Property="IsTabStop" Value="false"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="RepeatButton">
|
||||||
|
<Border Background="Transparent" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}">
|
||||||
|
<Rectangle Fill="{TemplateBinding Background}" Height="2"/>
|
||||||
|
</Border>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="PreviewSliderRepeatButtonVerticalStyle" TargetType="RepeatButton">
|
||||||
|
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
||||||
|
<Setter Property="Background" Value="Transparent"/>
|
||||||
|
<Setter Property="Focusable" Value="false"/>
|
||||||
|
<Setter Property="IsTabStop" Value="false"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="RepeatButton">
|
||||||
|
<Border Background="Transparent" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}">
|
||||||
|
<Rectangle Fill="{TemplateBinding Background}" Width="2"/>
|
||||||
|
</Border>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="PreviewSliderThumb" TargetType="Thumb">
|
||||||
|
<Border Effect="{StaticResource EffectShadow1}" Name="BorderDot" BorderThickness="0" BorderBrush="{DynamicResource PrimaryBrush}" Width="18" Height="18" Background="White" CornerRadius="9"/>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
|
<Setter Property="Effect" Value="{StaticResource EffectShadow2}"/>
|
||||||
|
</Trigger>
|
||||||
|
<EventTrigger RoutedEvent="Thumb.PreviewMouseLeftButtonDown">
|
||||||
|
<EventTrigger.Actions>
|
||||||
|
<BeginStoryboard>
|
||||||
|
<Storyboard>
|
||||||
|
<ThicknessAnimation To="2" Duration="0:0:.1" Storyboard.TargetName="BorderDot" Storyboard.TargetProperty="BorderThickness"/>
|
||||||
|
</Storyboard>
|
||||||
|
</BeginStoryboard>
|
||||||
|
</EventTrigger.Actions>
|
||||||
|
</EventTrigger>
|
||||||
|
<EventTrigger RoutedEvent="Thumb.PreviewMouseLeftButtonUp">
|
||||||
|
<EventTrigger.Actions>
|
||||||
|
<BeginStoryboard>
|
||||||
|
<Storyboard>
|
||||||
|
<ThicknessAnimation To="0" Duration="0:0:.1" Storyboard.TargetName="BorderDot" Storyboard.TargetProperty="BorderThickness"/>
|
||||||
|
</Storyboard>
|
||||||
|
</BeginStoryboard>
|
||||||
|
</EventTrigger.Actions>
|
||||||
|
</EventTrigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="PreviewSliderHorizontal" TargetType="hc:PreviewSlider">
|
||||||
|
<hc:SimplePanel>
|
||||||
|
<Border x:Name="TrackBackground" Background="{TemplateBinding Background}" Height="2" VerticalAlignment="center" Margin="9,0"/>
|
||||||
|
<Track Margin="9,0" x:Name="PART_Track">
|
||||||
|
<Track.DecreaseRepeatButton>
|
||||||
|
<RepeatButton Command="{x:Static Slider.DecreaseLarge}" Background="{DynamicResource PrimaryBrush}" Style="{StaticResource PreviewSliderRepeatButtonHorizontalStyle}"/>
|
||||||
|
</Track.DecreaseRepeatButton>
|
||||||
|
<Track.IncreaseRepeatButton>
|
||||||
|
<RepeatButton Command="{x:Static Slider.IncreaseLarge}" Style="{StaticResource PreviewSliderRepeatButtonHorizontalStyle}"/>
|
||||||
|
</Track.IncreaseRepeatButton>
|
||||||
|
<Track.Thumb>
|
||||||
|
<Thumb Margin="-9,0" x:Name="PART_Thumb" Focusable="False" Height="18" OverridesDefaultStyle="True" Template="{StaticResource PreviewSliderThumb}" VerticalAlignment="Center" Width="18"/>
|
||||||
|
</Track.Thumb>
|
||||||
|
</Track>
|
||||||
|
</hc:SimplePanel>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="PreviewSliderVertical" TargetType="hc:PreviewSlider">
|
||||||
|
<hc:SimplePanel>
|
||||||
|
<Border x:Name="TrackBackground" Background="{TemplateBinding Background}" Width="2" HorizontalAlignment="center" Margin="0,9"/>
|
||||||
|
<Track Margin="0,9" x:Name="PART_Track">
|
||||||
|
<Track.DecreaseRepeatButton>
|
||||||
|
<RepeatButton Command="{x:Static Slider.DecreaseLarge}" Background="{DynamicResource PrimaryBrush}" Style="{StaticResource PreviewSliderRepeatButtonVerticalStyle}"/>
|
||||||
|
</Track.DecreaseRepeatButton>
|
||||||
|
<Track.IncreaseRepeatButton>
|
||||||
|
<RepeatButton Command="{x:Static Slider.IncreaseLarge}" Style="{StaticResource PreviewSliderRepeatButtonVerticalStyle}"/>
|
||||||
|
</Track.IncreaseRepeatButton>
|
||||||
|
<Track.Thumb>
|
||||||
|
<Thumb Margin="0,-9" x:Name="PART_Thumb" Focusable="False" Height="18" OverridesDefaultStyle="True" Template="{StaticResource PreviewSliderThumb}" HorizontalAlignment="Center" Width="18"/>
|
||||||
|
</Track.Thumb>
|
||||||
|
</Track>
|
||||||
|
</hc:SimplePanel>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<Style x:Key="PreviewSliderBaseStyle" TargetType="hc:PreviewSlider">
|
||||||
|
<Setter Property="Stylus.IsPressAndHoldEnabled" Value="false"/>
|
||||||
|
<Setter Property="IsMoveToPointEnabled" Value="True"/>
|
||||||
|
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}"/>
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
|
||||||
|
<Setter Property="Template" Value="{StaticResource PreviewSliderHorizontal}"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="Orientation" Value="Vertical">
|
||||||
|
<Setter Property="Template" Value="{StaticResource PreviewSliderVertical}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsEnabled" Value="False">
|
||||||
|
<Setter Property="Opacity" Value=".4"/>
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!--endregion-->
|
||||||
|
|
||||||
|
<!--region RangeSlider-->
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="RangeSliderThumb" TargetType="hc:RangeThumb">
|
||||||
|
<Border Effect="{StaticResource EffectShadow1}" Name="BorderDot" BorderThickness="0" BorderBrush="{DynamicResource PrimaryBrush}" Width="18" Height="18" Background="White" CornerRadius="9"/>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
|
<Setter Property="Effect" Value="{StaticResource EffectShadow2}"/>
|
||||||
|
</Trigger>
|
||||||
|
<EventTrigger RoutedEvent="hc:RangeThumb.PreviewMouseLeftButtonDown">
|
||||||
|
<EventTrigger.Actions>
|
||||||
|
<BeginStoryboard>
|
||||||
|
<Storyboard>
|
||||||
|
<ThicknessAnimation To="2" Duration="0:0:.1" Storyboard.TargetName="BorderDot" Storyboard.TargetProperty="BorderThickness"/>
|
||||||
|
</Storyboard>
|
||||||
|
</BeginStoryboard>
|
||||||
|
</EventTrigger.Actions>
|
||||||
|
</EventTrigger>
|
||||||
|
<EventTrigger RoutedEvent="hc:RangeThumb.PreviewMouseLeftButtonUp">
|
||||||
|
<EventTrigger.Actions>
|
||||||
|
<BeginStoryboard>
|
||||||
|
<Storyboard>
|
||||||
|
<ThicknessAnimation To="0" Duration="0:0:.1" Storyboard.TargetName="BorderDot" Storyboard.TargetProperty="BorderThickness"/>
|
||||||
|
</Storyboard>
|
||||||
|
</BeginStoryboard>
|
||||||
|
</EventTrigger.Actions>
|
||||||
|
</EventTrigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="TipRangeSliderThumbHorizontalTop" TargetType="hc:RangeThumb">
|
||||||
|
<hc:InternalCanvas>
|
||||||
|
<Label Name="LabelValue" IsHitTestVisible="False" Opacity="0" Canvas.Bottom="28" Style="{StaticResource LabelPrimary}" Content="{TemplateBinding Content}" ContentStringFormat="{Binding Path=(hc:TipElement.StringFormat),RelativeSource={RelativeSource AncestorType=hc:RangeSlider}}"/>
|
||||||
|
<Border Canvas.Bottom="0" Effect="{StaticResource EffectShadow1}" Name="BorderDot" BorderThickness="0" BorderBrush="{DynamicResource PrimaryBrush}" Width="18" Height="18" Background="White" CornerRadius="9"/>
|
||||||
|
</hc:InternalCanvas>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
|
<Setter Property="Effect" Value="{StaticResource EffectShadow2}" TargetName="BorderDot"/>
|
||||||
|
<Setter Property="Opacity" Value="1" TargetName="LabelValue"/>
|
||||||
|
</Trigger>
|
||||||
|
<EventTrigger RoutedEvent="hc:RangeThumb.PreviewMouseLeftButtonDown">
|
||||||
|
<EventTrigger.Actions>
|
||||||
|
<BeginStoryboard>
|
||||||
|
<Storyboard>
|
||||||
|
<ThicknessAnimation To="2" Duration="0:0:.1" Storyboard.TargetName="BorderDot" Storyboard.TargetProperty="BorderThickness"/>
|
||||||
|
</Storyboard>
|
||||||
|
</BeginStoryboard>
|
||||||
|
</EventTrigger.Actions>
|
||||||
|
</EventTrigger>
|
||||||
|
<EventTrigger RoutedEvent="hc:RangeThumb.PreviewMouseLeftButtonUp">
|
||||||
|
<EventTrigger.Actions>
|
||||||
|
<BeginStoryboard>
|
||||||
|
<Storyboard>
|
||||||
|
<ThicknessAnimation To="0" Duration="0:0:.1" Storyboard.TargetName="BorderDot" Storyboard.TargetProperty="BorderThickness"/>
|
||||||
|
</Storyboard>
|
||||||
|
</BeginStoryboard>
|
||||||
|
</EventTrigger.Actions>
|
||||||
|
</EventTrigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="TipRangeSliderThumbHorizontalBottom" TargetType="hc:RangeThumb">
|
||||||
|
<hc:InternalCanvas>
|
||||||
|
<Label Name="LabelValue" IsHitTestVisible="False" Opacity="0" Canvas.Top="28" Style="{StaticResource LabelPrimary}" Content="{TemplateBinding Content}" ContentStringFormat="{Binding Path=(hc:TipElement.StringFormat),RelativeSource={RelativeSource AncestorType=hc:RangeSlider}}"/>
|
||||||
|
<Border Canvas.Bottom="0" Effect="{StaticResource EffectShadow1}" Name="BorderDot" BorderThickness="0" BorderBrush="{DynamicResource PrimaryBrush}" Width="18" Height="18" Background="White" CornerRadius="9"/>
|
||||||
|
</hc:InternalCanvas>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
|
<Setter Property="Effect" Value="{StaticResource EffectShadow2}" TargetName="BorderDot"/>
|
||||||
|
<Setter Property="Opacity" Value="1" TargetName="LabelValue"/>
|
||||||
|
</Trigger>
|
||||||
|
<EventTrigger RoutedEvent="hc:RangeThumb.PreviewMouseLeftButtonDown">
|
||||||
|
<EventTrigger.Actions>
|
||||||
|
<BeginStoryboard>
|
||||||
|
<Storyboard>
|
||||||
|
<ThicknessAnimation To="2" Duration="0:0:.1" Storyboard.TargetName="BorderDot" Storyboard.TargetProperty="BorderThickness"/>
|
||||||
|
</Storyboard>
|
||||||
|
</BeginStoryboard>
|
||||||
|
</EventTrigger.Actions>
|
||||||
|
</EventTrigger>
|
||||||
|
<EventTrigger RoutedEvent="hc:RangeThumb.PreviewMouseLeftButtonUp">
|
||||||
|
<EventTrigger.Actions>
|
||||||
|
<BeginStoryboard>
|
||||||
|
<Storyboard>
|
||||||
|
<ThicknessAnimation To="0" Duration="0:0:.1" Storyboard.TargetName="BorderDot" Storyboard.TargetProperty="BorderThickness"/>
|
||||||
|
</Storyboard>
|
||||||
|
</BeginStoryboard>
|
||||||
|
</EventTrigger.Actions>
|
||||||
|
</EventTrigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="TipRangeSliderThumbVerticalLeft" TargetType="hc:RangeThumb">
|
||||||
|
<hc:InternalCanvas Orientation="Vertical">
|
||||||
|
<Label Name="LabelValue" IsHitTestVisible="False" Opacity="0" Canvas.Right="28" Style="{StaticResource LabelPrimary}" Content="{TemplateBinding Content}" ContentStringFormat="{Binding Path=(hc:TipElement.StringFormat),RelativeSource={RelativeSource AncestorType=hc:RangeSlider}}"/>
|
||||||
|
<Border Canvas.Right="0" Effect="{StaticResource EffectShadow1}" Name="BorderDot" BorderThickness="0" BorderBrush="{DynamicResource PrimaryBrush}" Width="18" Height="18" Background="White" CornerRadius="9"/>
|
||||||
|
</hc:InternalCanvas>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
|
<Setter Property="Effect" Value="{StaticResource EffectShadow2}" TargetName="BorderDot"/>
|
||||||
|
<Setter Property="Opacity" Value="1" TargetName="LabelValue"/>
|
||||||
|
</Trigger>
|
||||||
|
<EventTrigger RoutedEvent="hc:RangeThumb.PreviewMouseLeftButtonDown">
|
||||||
|
<EventTrigger.Actions>
|
||||||
|
<BeginStoryboard>
|
||||||
|
<Storyboard>
|
||||||
|
<ThicknessAnimation To="2" Duration="0:0:.1" Storyboard.TargetName="BorderDot" Storyboard.TargetProperty="BorderThickness"/>
|
||||||
|
</Storyboard>
|
||||||
|
</BeginStoryboard>
|
||||||
|
</EventTrigger.Actions>
|
||||||
|
</EventTrigger>
|
||||||
|
<EventTrigger RoutedEvent="hc:RangeThumb.PreviewMouseLeftButtonUp">
|
||||||
|
<EventTrigger.Actions>
|
||||||
|
<BeginStoryboard>
|
||||||
|
<Storyboard>
|
||||||
|
<ThicknessAnimation To="0" Duration="0:0:.1" Storyboard.TargetName="BorderDot" Storyboard.TargetProperty="BorderThickness"/>
|
||||||
|
</Storyboard>
|
||||||
|
</BeginStoryboard>
|
||||||
|
</EventTrigger.Actions>
|
||||||
|
</EventTrigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="TipRangeSliderThumbVerticalRight" TargetType="hc:RangeThumb">
|
||||||
|
<hc:InternalCanvas Orientation="Vertical">
|
||||||
|
<Label Name="LabelValue" IsHitTestVisible="False" Opacity="0" Canvas.Left="28" Style="{StaticResource LabelPrimary}" Content="{TemplateBinding Content}" ContentStringFormat="{Binding Path=(hc:TipElement.StringFormat),RelativeSource={RelativeSource AncestorType=hc:RangeSlider}}"/>
|
||||||
|
<Border Canvas.Right="0" Effect="{StaticResource EffectShadow1}" Name="BorderDot" BorderThickness="0" BorderBrush="{DynamicResource PrimaryBrush}" Width="18" Height="18" Background="White" CornerRadius="9"/>
|
||||||
|
</hc:InternalCanvas>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
|
<Setter Property="Effect" Value="{StaticResource EffectShadow2}" TargetName="BorderDot"/>
|
||||||
|
<Setter Property="Opacity" Value="1" TargetName="LabelValue"/>
|
||||||
|
</Trigger>
|
||||||
|
<EventTrigger RoutedEvent="hc:RangeThumb.PreviewMouseLeftButtonDown">
|
||||||
|
<EventTrigger.Actions>
|
||||||
|
<BeginStoryboard>
|
||||||
|
<Storyboard>
|
||||||
|
<ThicknessAnimation To="2" Duration="0:0:.1" Storyboard.TargetName="BorderDot" Storyboard.TargetProperty="BorderThickness"/>
|
||||||
|
</Storyboard>
|
||||||
|
</BeginStoryboard>
|
||||||
|
</EventTrigger.Actions>
|
||||||
|
</EventTrigger>
|
||||||
|
<EventTrigger RoutedEvent="hc:RangeThumb.PreviewMouseLeftButtonUp">
|
||||||
|
<EventTrigger.Actions>
|
||||||
|
<BeginStoryboard>
|
||||||
|
<Storyboard>
|
||||||
|
<ThicknessAnimation To="0" Duration="0:0:.1" Storyboard.TargetName="BorderDot" Storyboard.TargetProperty="BorderThickness"/>
|
||||||
|
</Storyboard>
|
||||||
|
</BeginStoryboard>
|
||||||
|
</EventTrigger.Actions>
|
||||||
|
</EventTrigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="RangeSliderHorizontal" TargetType="hc:RangeSlider">
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto" MinHeight="{TemplateBinding MinHeight}"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<TickBar x:Name="TopTick" Width="{Binding ActualWidth,ElementName=TrackBackground}" Ticks="{TemplateBinding Ticks}" TickFrequency="{TemplateBinding TickFrequency}" Minimum="{TemplateBinding Minimum}" Maximum="{TemplateBinding Maximum}" IsDirectionReversed="{TemplateBinding IsDirectionReversed}" Fill="{TemplateBinding Foreground}" Height="4" Margin="0,0,0,2" Placement="Top" Grid.Row="0" Visibility="Collapsed"/>
|
||||||
|
<TickBar x:Name="BottomTick" Width="{Binding ActualWidth,ElementName=TrackBackground}" Ticks="{TemplateBinding Ticks}" TickFrequency="{TemplateBinding TickFrequency}" Minimum="{TemplateBinding Minimum}" Maximum="{TemplateBinding Maximum}" IsDirectionReversed="{TemplateBinding IsDirectionReversed}" Fill="{TemplateBinding Foreground}" Height="4" Margin="0,2,0,0" Placement="Bottom" Grid.Row="2" Visibility="Collapsed"/>
|
||||||
|
<Border x:Name="TrackBackground" Background="{TemplateBinding Background}" Margin="9,0" Grid.Row="1" Height="2" VerticalAlignment="center"/>
|
||||||
|
<hc:RangeTrack IsDirectionReversed="{TemplateBinding IsDirectionReversed}" Orientation="{TemplateBinding Orientation}" ValueStart="{TemplateBinding ValueStart}" ValueEnd="{TemplateBinding ValueEnd}" Minimum="{TemplateBinding Minimum}" Maximum="{TemplateBinding Maximum}" Margin="9,0" x:Name="PART_Track" Grid.Row="1">
|
||||||
|
<hc:RangeTrack.DecreaseRepeatButton>
|
||||||
|
<RepeatButton Interval="{TemplateBinding Interval}" Delay="{TemplateBinding Delay}" Command="{x:Static hc:RangeSlider.DecreaseLarge}" Style="{StaticResource SliderRepeatButtonHorizontalStyle}"/>
|
||||||
|
</hc:RangeTrack.DecreaseRepeatButton>
|
||||||
|
<hc:RangeTrack.CenterRepeatButton>
|
||||||
|
<RepeatButton Interval="{TemplateBinding Interval}" Delay="{TemplateBinding Delay}" Command="{x:Static hc:RangeSlider.CenterLarge}" Background="{DynamicResource PrimaryBrush}" Style="{StaticResource SliderRepeatButtonHorizontalStyle}"/>
|
||||||
|
</hc:RangeTrack.CenterRepeatButton>
|
||||||
|
<hc:RangeTrack.IncreaseRepeatButton>
|
||||||
|
<RepeatButton Interval="{TemplateBinding Interval}" Delay="{TemplateBinding Delay}" Command="{x:Static hc:RangeSlider.IncreaseLarge}" Style="{StaticResource SliderRepeatButtonHorizontalStyle}"/>
|
||||||
|
</hc:RangeTrack.IncreaseRepeatButton>
|
||||||
|
<hc:RangeTrack.ThumbStart>
|
||||||
|
<hc:RangeThumb Content="{TemplateBinding ValueStart}" ClipToBounds="False" Width="18" Margin="-9,0" Height="18" x:Name="ThumbStart" Focusable="False" OverridesDefaultStyle="True" Template="{StaticResource RangeSliderThumb}" VerticalAlignment="Center"/>
|
||||||
|
</hc:RangeTrack.ThumbStart>
|
||||||
|
<hc:RangeTrack.ThumbEnd>
|
||||||
|
<hc:RangeThumb Content="{TemplateBinding ValueEnd}" ClipToBounds="False" Width="18" Margin="-9,0" Height="18" x:Name="ThumbEnd" Focusable="False" OverridesDefaultStyle="True" Template="{StaticResource RangeSliderThumb}" VerticalAlignment="Center"/>
|
||||||
|
</hc:RangeTrack.ThumbEnd>
|
||||||
|
</hc:RangeTrack>
|
||||||
|
</Grid>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<MultiTrigger>
|
||||||
|
<MultiTrigger.Conditions>
|
||||||
|
<Condition Property="hc:TipElement.Placement" Value="Top"/>
|
||||||
|
<Condition Property="hc:TipElement.Visibility" Value="Visible"/>
|
||||||
|
</MultiTrigger.Conditions>
|
||||||
|
<Setter Property="Template" TargetName="ThumbStart" Value="{StaticResource TipRangeSliderThumbHorizontalTop}"/>
|
||||||
|
<Setter Property="Template" TargetName="ThumbEnd" Value="{StaticResource TipRangeSliderThumbHorizontalTop}"/>
|
||||||
|
</MultiTrigger>
|
||||||
|
<MultiTrigger>
|
||||||
|
<MultiTrigger.Conditions>
|
||||||
|
<Condition Property="hc:TipElement.Placement" Value="Bottom"/>
|
||||||
|
<Condition Property="hc:TipElement.Visibility" Value="Visible"/>
|
||||||
|
</MultiTrigger.Conditions>
|
||||||
|
<Setter Property="Template" TargetName="ThumbStart" Value="{StaticResource TipRangeSliderThumbHorizontalBottom}"/>
|
||||||
|
<Setter Property="Template" TargetName="ThumbEnd" Value="{StaticResource TipRangeSliderThumbHorizontalBottom}"/>
|
||||||
|
</MultiTrigger>
|
||||||
|
<Trigger Property="TickPlacement" Value="TopLeft">
|
||||||
|
<Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="TickPlacement" Value="BottomRight">
|
||||||
|
<Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="TickPlacement" Value="Both">
|
||||||
|
<Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
|
||||||
|
<Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="RangeSliderVertical" TargetType="hc:RangeSlider">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition MinWidth="{TemplateBinding MinWidth}" Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<TickBar x:Name="TopTick" Height="{Binding ActualHeight,ElementName=TrackBackground}" Ticks="{TemplateBinding Ticks}" TickFrequency="{TemplateBinding TickFrequency}" Minimum="{TemplateBinding Minimum}" Maximum="{TemplateBinding Maximum}" IsDirectionReversed="{TemplateBinding IsDirectionReversed}" Grid.Column="0" Fill="{TemplateBinding Foreground}" Margin="0,0,2,0" Placement="Left" Visibility="Collapsed" Width="4"/>
|
||||||
|
<TickBar x:Name="BottomTick" Height="{Binding ActualHeight,ElementName=TrackBackground}" Ticks="{TemplateBinding Ticks}" TickFrequency="{TemplateBinding TickFrequency}" Minimum="{TemplateBinding Minimum}" Maximum="{TemplateBinding Maximum}" IsDirectionReversed="{TemplateBinding IsDirectionReversed}" Grid.Column="2" Fill="{TemplateBinding Foreground}" Margin="2,0,0,0" Placement="Right" Visibility="Collapsed" Width="4"/>
|
||||||
|
<Border x:Name="TrackBackground" Background="{TemplateBinding Background}" Margin="0,9" Grid.Column="1" HorizontalAlignment="center" Width="2"/>
|
||||||
|
<hc:RangeTrack IsDirectionReversed="{TemplateBinding IsDirectionReversed}" Orientation="{TemplateBinding Orientation}" ValueStart="{TemplateBinding ValueStart}" ValueEnd="{TemplateBinding ValueEnd}" Minimum="{TemplateBinding Minimum}" Maximum="{TemplateBinding Maximum}" Margin="0,9" x:Name="PART_Track" Grid.Column="1">
|
||||||
|
<hc:RangeTrack.DecreaseRepeatButton>
|
||||||
|
<RepeatButton Interval="{TemplateBinding Interval}" Delay="{TemplateBinding Delay}" Command="{x:Static hc:RangeSlider.DecreaseLarge}" Style="{StaticResource SliderRepeatButtonVerticalStyle}"/>
|
||||||
|
</hc:RangeTrack.DecreaseRepeatButton>
|
||||||
|
<hc:RangeTrack.CenterRepeatButton>
|
||||||
|
<RepeatButton Interval="{TemplateBinding Interval}" Delay="{TemplateBinding Delay}" Command="{x:Static hc:RangeSlider.CenterLarge}" Background="{DynamicResource PrimaryBrush}" Style="{StaticResource SliderRepeatButtonVerticalStyle}"/>
|
||||||
|
</hc:RangeTrack.CenterRepeatButton>
|
||||||
|
<hc:RangeTrack.IncreaseRepeatButton>
|
||||||
|
<RepeatButton Interval="{TemplateBinding Interval}" Delay="{TemplateBinding Delay}" Command="{x:Static hc:RangeSlider.IncreaseLarge}" Style="{StaticResource SliderRepeatButtonVerticalStyle}"/>
|
||||||
|
</hc:RangeTrack.IncreaseRepeatButton>
|
||||||
|
<hc:RangeTrack.ThumbStart>
|
||||||
|
<hc:RangeThumb Content="{TemplateBinding ValueStart}" Margin="0,-9" x:Name="ThumbStart" Focusable="False" Height="18" OverridesDefaultStyle="True" Template="{StaticResource RangeSliderThumb}" HorizontalAlignment="Center" Width="18"/>
|
||||||
|
</hc:RangeTrack.ThumbStart>
|
||||||
|
<hc:RangeTrack.ThumbEnd>
|
||||||
|
<hc:RangeThumb Content="{TemplateBinding ValueEnd}" Margin="0,-9" x:Name="ThumbEnd" Focusable="False" Height="18" OverridesDefaultStyle="True" Template="{StaticResource RangeSliderThumb}" HorizontalAlignment="Center" Width="18"/>
|
||||||
|
</hc:RangeTrack.ThumbEnd>
|
||||||
|
</hc:RangeTrack>
|
||||||
|
</Grid>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<MultiTrigger>
|
||||||
|
<MultiTrigger.Conditions>
|
||||||
|
<Condition Property="hc:TipElement.Placement" Value="Left"/>
|
||||||
|
<Condition Property="hc:TipElement.Visibility" Value="Visible"/>
|
||||||
|
</MultiTrigger.Conditions>
|
||||||
|
<Setter Property="Template" TargetName="ThumbStart" Value="{StaticResource TipRangeSliderThumbVerticalLeft}"/>
|
||||||
|
<Setter Property="Template" TargetName="ThumbEnd" Value="{StaticResource TipRangeSliderThumbVerticalLeft}"/>
|
||||||
|
</MultiTrigger>
|
||||||
|
<MultiTrigger>
|
||||||
|
<MultiTrigger.Conditions>
|
||||||
|
<Condition Property="hc:TipElement.Placement" Value="Right"/>
|
||||||
|
<Condition Property="hc:TipElement.Visibility" Value="Visible"/>
|
||||||
|
</MultiTrigger.Conditions>
|
||||||
|
<Setter Property="Template" TargetName="ThumbStart" Value="{StaticResource TipRangeSliderThumbVerticalRight}"/>
|
||||||
|
<Setter Property="Template" TargetName="ThumbEnd" Value="{StaticResource TipRangeSliderThumbVerticalRight}"/>
|
||||||
|
</MultiTrigger>
|
||||||
|
<Trigger Property="TickPlacement" Value="TopLeft">
|
||||||
|
<Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="TickPlacement" Value="BottomRight">
|
||||||
|
<Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="TickPlacement" Value="Both">
|
||||||
|
<Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
|
||||||
|
<Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<Style x:Key="RangeSliderBaseStyle" BasedOn="{StaticResource BaseStyle}" TargetType="hc:RangeSlider">
|
||||||
|
<Setter Property="Stylus.IsPressAndHoldEnabled" Value="false"/>
|
||||||
|
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}"/>
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource DarkPrimaryBrush}"/>
|
||||||
|
<Setter Property="Template" Value="{StaticResource RangeSliderHorizontal}"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="Orientation" Value="Vertical">
|
||||||
|
<Setter Property="Template" Value="{StaticResource RangeSliderVertical}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsEnabled" Value="False">
|
||||||
|
<Setter Property="Opacity" Value=".4"/>
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!--endregion-->
|
||||||
|
|
||||||
|
</ResourceDictionary>
|
@ -0,0 +1,86 @@
|
|||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:hc="clr-namespace:HandyControl.Controls"
|
||||||
|
xmlns:themes="clr-namespace:HandyControl.Themes">
|
||||||
|
|
||||||
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Styles/Base/MenuBaseStyle.xaml"/>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Styles/ToggleButton.xaml"/>
|
||||||
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
|
||||||
|
<Style x:Key="SplitButtonBaseStyle" BasedOn="{StaticResource BaseStyle}" TargetType="hc:SplitButton">
|
||||||
|
<Setter Property="Height" Value="{StaticResource DefaultControlHeight}"/>
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
|
||||||
|
<Setter Property="Padding" Value="{StaticResource DefaultControlPadding}"/>
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource TextIconBrush}"/>
|
||||||
|
<Setter Property="BorderThickness" Value="0"/>
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
|
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||||
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||||
|
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
|
||||||
|
<Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="hc:SplitButton">
|
||||||
|
<hc:SimplePanel x:Name="templateRoot">
|
||||||
|
<Border Background="{TemplateBinding Background}" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
|
<Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}">
|
||||||
|
<Path x:Name="PathMain" Width="{TemplateBinding hc:IconElement.Width}" Height="{TemplateBinding hc:IconElement.Height}" Fill="{TemplateBinding Foreground}" SnapsToDevicePixels="True" Stretch="Uniform" Data="{TemplateBinding hc:IconElement.Geometry}"/>
|
||||||
|
<ContentPresenter x:Name="ContentPresenterMain" RecognizesAccessKey="True" VerticalAlignment="Center" Margin="6,0,0,0" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||||
|
</StackPanel>
|
||||||
|
<ToggleButton x:Name="PART_Arrow" Foreground="{TemplateBinding Foreground}" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Width="22" Height="Auto" Padding="0,10,8,10" HorizontalContentAlignment="Left" Grid.Column="1" Style="{StaticResource ToggleButtonIconTransparent}" hc:IconSwitchElement.GeometrySelected="{StaticResource UpGeometry}" hc:IconElement.Geometry="{StaticResource DownGeometry}"/>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
<Popup AllowsTransparency="true" StaysOpen="False" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Margin="1" PopupAnimation="Fade" Placement="Bottom">
|
||||||
|
<Border CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="dropDownBorder" MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{Binding ActualWidth, ElementName=templateRoot}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1" Background="{DynamicResource RegionBrush}">
|
||||||
|
<ScrollViewer Margin="0,4" x:Name="DropDownScrollViewer">
|
||||||
|
<hc:SimplePanel>
|
||||||
|
<Canvas HorizontalAlignment="Left" Height="0" VerticalAlignment="Top" Width="0">
|
||||||
|
<Rectangle x:Name="opaqueRect" Fill="{Binding Background, ElementName=dropDownBorder}" Height="{Binding ActualHeight, ElementName=dropDownBorder}" Width="{Binding ActualWidth, ElementName=dropDownBorder}"/>
|
||||||
|
</Canvas>
|
||||||
|
<ContentPresenter ContentSource="DropDownContent"/>
|
||||||
|
</hc:SimplePanel>
|
||||||
|
</ScrollViewer>
|
||||||
|
</Border>
|
||||||
|
</Popup>
|
||||||
|
</hc:SimplePanel>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="Content" Value="{x:Null}">
|
||||||
|
<Setter Property="Visibility" Value="Collapsed" TargetName="ContentPresenterMain"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="hc:IconElement.Geometry" Value="{x:Null}">
|
||||||
|
<Setter Property="Visibility" Value="Collapsed" TargetName="PathMain"/>
|
||||||
|
<Setter Property="Margin" Value="0" TargetName="ContentPresenterMain"/>
|
||||||
|
</Trigger>
|
||||||
|
<MultiTrigger>
|
||||||
|
<MultiTrigger.Conditions>
|
||||||
|
<Condition Property="HitMode" Value="Click"/>
|
||||||
|
<Condition Property="IsChecked" Value="True" SourceName="PART_Arrow"/>
|
||||||
|
</MultiTrigger.Conditions>
|
||||||
|
<Setter Property="IsDropDownOpen" Value="True"/>
|
||||||
|
</MultiTrigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
|
<Setter Property="Opacity" Value=".9"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsPressed" Value="True">
|
||||||
|
<Setter Property="Opacity" Value=".6"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsEnabled" Value="False">
|
||||||
|
<Setter Property="Opacity" Value="0.4"/>
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
</ResourceDictionary>
|
@ -0,0 +1,271 @@
|
|||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:hc="clr-namespace:HandyControl.Controls"
|
||||||
|
xmlns:interactivity="clr-namespace:HandyControl.Interactivity"
|
||||||
|
xmlns:system="clr-namespace:System;assembly=mscorlib"
|
||||||
|
xmlns:themes="clr-namespace:HandyControl.Themes">
|
||||||
|
|
||||||
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Basic/Converters.xaml"/>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Basic/Geometries.xaml"/>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Styles/TextBlock.xaml"/>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Styles/Button.xaml"/>
|
||||||
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
|
||||||
|
<Style x:Key="WatermarkTextBoxBaseStyle" TargetType="hc:WatermarkTextBox">
|
||||||
|
<Setter Property="Background" Value="{x:Null}"/>
|
||||||
|
<Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
|
||||||
|
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
|
||||||
|
<Setter Property="Padding" Value="{StaticResource DefaultInputPadding}"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="hc:WatermarkTextBox">
|
||||||
|
<hc:SimplePanel x:Name="WatermarkContent">
|
||||||
|
<TextBlock Text="{TemplateBinding Watermark}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Foreground="{DynamicResource ThirdlyTextBrush}" Margin="{TemplateBinding Padding}" x:Name="PART_Watermark" Visibility="{TemplateBinding Text,Converter={StaticResource String2VisibilityReConverter}}"/>
|
||||||
|
<ScrollViewer Padding="{TemplateBinding Padding}" Margin="-2,0,-1,0" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" x:Name="PART_ContentHost" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
|
||||||
|
</hc:SimplePanel>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="TextBoxBaseStyle" TargetType="TextBox">
|
||||||
|
<Setter Property="MinHeight" Value="{StaticResource DefaultControlHeight}"/>
|
||||||
|
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
|
||||||
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
|
<Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}"/>
|
||||||
|
<Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>
|
||||||
|
<Setter Property="HorizontalContentAlignment" Value="Left"/>
|
||||||
|
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
|
||||||
|
<Setter Property="AllowDrop" Value="true"/>
|
||||||
|
<Setter Property="Padding" Value="{StaticResource DefaultInputPadding}"/>
|
||||||
|
<Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
|
||||||
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="TextBox">
|
||||||
|
<Border x:Name="border" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
|
||||||
|
<ScrollViewer Padding="{TemplateBinding Padding}" Margin="-2,0,-1,0" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" x:Name="PART_ContentHost" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
|
||||||
|
</Border>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsEnabled" Value="false">
|
||||||
|
<Setter Property="Opacity" TargetName="border" Value="0.4"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsMouseOver" Value="true">
|
||||||
|
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource SecondaryBorderBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsFocused" Value="true">
|
||||||
|
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource PrimaryBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="TextBoxExtendTopTemplate" TargetType="TextBox">
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight),RelativeSource={RelativeSource TemplatedParent}}" Height="{Binding Path=(hc:InfoElement.ContentHeight),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Double2GridLengthConverter}}"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<StackPanel Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" Margin="{TemplateBinding Padding}">
|
||||||
|
<TextBlock Margin="1,0,0,0" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
|
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
||||||
|
</StackPanel>
|
||||||
|
<Border x:Name="border" Grid.Row="1" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True"/>
|
||||||
|
<TextBlock x:Name="Placeholder" Padding="1" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}" Grid.Row="1" Visibility="{TemplateBinding Text,Converter={StaticResource String2VisibilityReConverter}}" HorizontalAlignment="Stretch" Style="{StaticResource TextBlockDefaultThiLight}" Text="{Binding Path=(hc:InfoElement.Placeholder),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
|
<ScrollViewer Padding="{TemplateBinding Padding}" Margin="-1,1" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" Grid.Row="1" x:Name="PART_ContentHost" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
|
||||||
|
</Grid>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsEnabled" Value="false">
|
||||||
|
<Setter Property="Opacity" TargetName="border" Value="0.4"/>
|
||||||
|
<Setter Property="Opacity" TargetName="PART_ContentHost" Value="0.4"/>
|
||||||
|
<Setter Property="Opacity" TargetName="Placeholder" Value="0.4"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsMouseOver" Value="true" SourceName="PART_ContentHost">
|
||||||
|
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource SecondaryBorderBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsFocused" Value="true">
|
||||||
|
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource PrimaryBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="TextBoxExtendLeftTemplate" TargetType="TextBox">
|
||||||
|
<Grid MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight),RelativeSource={RelativeSource TemplatedParent}}" Height="{Binding Path=(hc:InfoElement.ContentHeight),RelativeSource={RelativeSource TemplatedParent}}">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="{Binding Path=(hc:InfoElement.TitleWidth),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<StackPanel Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="0,7,6,7">
|
||||||
|
<TextBlock Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
|
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
||||||
|
</StackPanel>
|
||||||
|
<Border x:Name="border" Grid.Column="1" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True"/>
|
||||||
|
<TextBlock x:Name="Placeholder" Padding="1" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}" Grid.Column="1" Visibility="{TemplateBinding Text,Converter={StaticResource String2VisibilityReConverter}}" HorizontalAlignment="Stretch" Style="{StaticResource TextBlockDefaultThiLight}" Text="{Binding Path=(hc:InfoElement.Placeholder),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
|
<ScrollViewer Padding="{TemplateBinding Padding}" Margin="-1,1" Grid.Column="1" x:Name="PART_ContentHost" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
|
||||||
|
</Grid>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsEnabled" Value="false">
|
||||||
|
<Setter Property="Opacity" TargetName="border" Value="0.4"/>
|
||||||
|
<Setter Property="Opacity" TargetName="PART_ContentHost" Value="0.4"/>
|
||||||
|
<Setter Property="Opacity" TargetName="Placeholder" Value="0.4"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsMouseOver" Value="true" SourceName="PART_ContentHost">
|
||||||
|
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource SecondaryBorderBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsFocused" Value="true">
|
||||||
|
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource PrimaryBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<Style x:Key="TextBoxExtendBaseStyle" BasedOn="{StaticResource TextBoxBaseStyle}" TargetType="TextBox">
|
||||||
|
<Setter Property="hc:InfoElement.Symbol" Value="●"/>
|
||||||
|
<Setter Property="hc:InfoElement.ContentHeight" Value="{x:Static system:Double.NaN}"/>
|
||||||
|
<Setter Property="hc:InfoElement.MinContentHeight" Value="{StaticResource DefaultControlHeight}"/>
|
||||||
|
<Setter Property="Height" Value="Auto"/>
|
||||||
|
<Setter Property="Template" Value="{StaticResource TextBoxExtendTopTemplate}"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="hc:InfoElement.TitlePlacement" Value="Left">
|
||||||
|
<Setter Property="Template" Value="{StaticResource TextBoxExtendLeftTemplate}"/>
|
||||||
|
<Setter Property="Width" Value="Auto"/>
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="TextBoxPlusTopTemplate" TargetType="hc:TextBox">
|
||||||
|
<ControlTemplate.Resources>
|
||||||
|
<Storyboard x:Key="StoryboardShow">
|
||||||
|
<ThicknessAnimation Storyboard.TargetName="TextBlockError" Storyboard.TargetProperty="Margin" To="9,0,0,-18" Duration="0:0:.2"/>
|
||||||
|
</Storyboard>
|
||||||
|
<Storyboard x:Key="StoryboardHidden">
|
||||||
|
<ThicknessAnimation Storyboard.TargetName="TextBlockError" Storyboard.TargetProperty="Margin" To="9,0,0,4" Duration="0:0:0"/>
|
||||||
|
</Storyboard>
|
||||||
|
</ControlTemplate.Resources>
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight),RelativeSource={RelativeSource TemplatedParent}}" Height="{Binding Path=(hc:InfoElement.ContentHeight),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Double2GridLengthConverter}}"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<TextBlock FontSize="12" Text="{TemplateBinding ErrorStr}" Name="TextBlockError" VerticalAlignment="Bottom" Margin="9,0,0,4" Foreground="{DynamicResource DangerBrush}" Grid.Row="1"/>
|
||||||
|
<StackPanel Grid.Row="0" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" Margin="{TemplateBinding Padding}">
|
||||||
|
<TextBlock Margin="1,0,0,0" Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
|
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
||||||
|
</StackPanel>
|
||||||
|
<Border Grid.Row="1" x:Name="templateRoot" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
|
||||||
|
<Grid SnapsToDevicePixels="true">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<TextBlock VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}" Visibility="{TemplateBinding Text,Converter={StaticResource String2VisibilityReConverter}}" HorizontalAlignment="Stretch" Style="{StaticResource TextBlockDefaultThiLight}" Text="{Binding Path=(hc:InfoElement.Placeholder),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
|
<ScrollViewer Margin="-2,0,-1,0" Grid.Column="0" Padding="{TemplateBinding Padding}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" x:Name="PART_ContentHost" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
|
||||||
|
<Button Height="{x:Static system:Double.NaN}" Command="interactivity:ControlCommands.Clear" Margin="0,0,7,0" Visibility="Collapsed" Name="ButtonClear" Width="16" Grid.Column="1" Style="{StaticResource ButtonIcon}" Padding="0,6" hc:IconElement.Geometry="{StaticResource DeleteFillCircleGeometry}" Foreground="{Binding BorderBrush,ElementName=templateRoot}"/>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsEnabled" Value="false">
|
||||||
|
<Setter Property="Opacity" TargetName="templateRoot" Value="0.4"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsMouseOver" Value="true" SourceName="templateRoot">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<MultiTrigger>
|
||||||
|
<MultiTrigger.Conditions>
|
||||||
|
<Condition Property="IsMouseOver" Value="true" SourceName="templateRoot"/>
|
||||||
|
<Condition Property="ShowClearButton" Value="True"/>
|
||||||
|
</MultiTrigger.Conditions>
|
||||||
|
<Setter Property="Visibility" Value="Visible" TargetName="ButtonClear"/>
|
||||||
|
</MultiTrigger>
|
||||||
|
<Trigger Property="IsFocused" Value="true">
|
||||||
|
<Setter Property="BorderBrush" TargetName="templateRoot" Value="{DynamicResource PrimaryBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsError" Value="true">
|
||||||
|
<Setter Property="BorderBrush" TargetName="templateRoot" Value="{DynamicResource DangerBrush}"/>
|
||||||
|
<Trigger.EnterActions>
|
||||||
|
<BeginStoryboard Storyboard="{StaticResource StoryboardShow}"/>
|
||||||
|
</Trigger.EnterActions>
|
||||||
|
<Trigger.ExitActions>
|
||||||
|
<BeginStoryboard Storyboard="{StaticResource StoryboardHidden}"/>
|
||||||
|
</Trigger.ExitActions>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="TextBoxPlusLeftTemplate" TargetType="hc:TextBox">
|
||||||
|
<ControlTemplate.Resources>
|
||||||
|
<Storyboard x:Key="StoryboardShow">
|
||||||
|
<ThicknessAnimation Storyboard.TargetName="TextBlockError" Storyboard.TargetProperty="Margin" To="9,0,0,-18" Duration="0:0:.2"/>
|
||||||
|
</Storyboard>
|
||||||
|
<Storyboard x:Key="StoryboardHidden">
|
||||||
|
<ThicknessAnimation Storyboard.TargetName="TextBlockError" Storyboard.TargetProperty="Margin" To="9,0,0,4" Duration="0:0:0"/>
|
||||||
|
</Storyboard>
|
||||||
|
</ControlTemplate.Resources>
|
||||||
|
<Grid MinHeight="{Binding Path=(hc:InfoElement.MinContentHeight),RelativeSource={RelativeSource TemplatedParent}}" Height="{Binding Path=(hc:InfoElement.ContentHeight),RelativeSource={RelativeSource TemplatedParent}}">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="{Binding Path=(hc:InfoElement.TitleWidth),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<TextBlock FontSize="12" Text="{TemplateBinding ErrorStr}" Name="TextBlockError" VerticalAlignment="Bottom" Margin="9,0,0,4" Foreground="{DynamicResource DangerBrush}" Grid.Column="1"/>
|
||||||
|
<StackPanel Grid.Column="0" Visibility="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="0,7,6,7">
|
||||||
|
<TextBlock Text="{Binding Path=(hc:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
|
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(hc:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(hc:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
||||||
|
</StackPanel>
|
||||||
|
<Border Grid.Column="1" x:Name="templateRoot" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
|
||||||
|
<Grid SnapsToDevicePixels="true">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<TextBlock VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}" Visibility="{TemplateBinding Text,Converter={StaticResource String2VisibilityReConverter}}" HorizontalAlignment="Stretch" Style="{StaticResource TextBlockDefaultThiLight}" Text="{Binding Path=(hc:InfoElement.Placeholder),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
|
<ScrollViewer Grid.Column="0" Margin="-2,0,-1,0" Padding="{TemplateBinding Padding}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" x:Name="PART_ContentHost" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
|
||||||
|
<Button Height="{x:Static system:Double.NaN}" Command="interactivity:ControlCommands.Clear" Margin="0,0,7,0" Visibility="Collapsed" Name="ButtonClear" Width="16" Grid.Column="1" Style="{StaticResource ButtonIcon}" Padding="0,6" hc:IconElement.Geometry="{StaticResource DeleteFillCircleGeometry}" Foreground="{Binding BorderBrush,ElementName=templateRoot}"/>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsEnabled" Value="false">
|
||||||
|
<Setter Property="Opacity" TargetName="templateRoot" Value="0.4"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsMouseOver" Value="true" SourceName="templateRoot">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<MultiTrigger>
|
||||||
|
<MultiTrigger.Conditions>
|
||||||
|
<Condition Property="IsMouseOver" Value="true" SourceName="templateRoot"/>
|
||||||
|
<Condition Property="ShowClearButton" Value="True"/>
|
||||||
|
</MultiTrigger.Conditions>
|
||||||
|
<Setter Property="Visibility" Value="Visible" TargetName="ButtonClear"/>
|
||||||
|
</MultiTrigger>
|
||||||
|
<Trigger Property="IsFocused" Value="true">
|
||||||
|
<Setter Property="BorderBrush" TargetName="templateRoot" Value="{DynamicResource PrimaryBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsError" Value="true">
|
||||||
|
<Setter Property="BorderBrush" TargetName="templateRoot" Value="{DynamicResource DangerBrush}"/>
|
||||||
|
<Trigger.EnterActions>
|
||||||
|
<BeginStoryboard Storyboard="{StaticResource StoryboardShow}"/>
|
||||||
|
</Trigger.EnterActions>
|
||||||
|
<Trigger.ExitActions>
|
||||||
|
<BeginStoryboard Storyboard="{StaticResource StoryboardHidden}"/>
|
||||||
|
</Trigger.ExitActions>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<Style x:Key="TextBoxPlusBaseStyle" BasedOn="{StaticResource TextBoxExtendBaseStyle}" TargetType="hc:TextBox">
|
||||||
|
<Setter Property="Template" Value="{StaticResource TextBoxPlusTopTemplate}"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="hc:InfoElement.TitlePlacement" Value="Left">
|
||||||
|
<Setter Property="Template" Value="{StaticResource TextBoxPlusLeftTemplate}"/>
|
||||||
|
<Setter Property="Width" Value="Auto"/>
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
</ResourceDictionary>
|
@ -0,0 +1,260 @@
|
|||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:hc="clr-namespace:HandyControl.Controls"
|
||||||
|
xmlns:system="clr-namespace:System;assembly=mscorlib"
|
||||||
|
xmlns:themes="clr-namespace:HandyControl.Themes">
|
||||||
|
|
||||||
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Styles/Base/ButtonBaseBaseStyle.xaml"/>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Styles/Rectangle.xaml"/>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Basic/Effects.xaml"/>
|
||||||
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
|
||||||
|
<Style x:Key="ToggleButtonBaseStyle" BasedOn="{StaticResource ButtonBaseBaseStyle}" TargetType="ToggleButton">
|
||||||
|
<Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="ToggleButton">
|
||||||
|
<hc:SimplePanel>
|
||||||
|
<Border Background="{TemplateBinding Background}" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
|
<Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}">
|
||||||
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}">
|
||||||
|
<Path x:Name="PathMain" Width="{TemplateBinding hc:IconElement.Width}" Height="{TemplateBinding hc:IconElement.Height}" Fill="{TemplateBinding Foreground}" SnapsToDevicePixels="True" Stretch="Uniform" Data="{TemplateBinding hc:IconElement.Geometry}"/>
|
||||||
|
<ContentPresenter x:Name="ContentPresenterMain" RecognizesAccessKey="True" VerticalAlignment="Center" Margin="6,0,0,0" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
<Border Margin="-1" Visibility="Collapsed" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="BorderChecked" BorderThickness="4" BorderBrush="{DynamicResource DarkMaskBrush}"/>
|
||||||
|
</hc:SimplePanel>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsChecked" Value="true">
|
||||||
|
<Setter TargetName="BorderChecked" Property="Visibility" Value="Visible"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="Content" Value="{x:Null}">
|
||||||
|
<Setter Property="Visibility" Value="Collapsed" TargetName="ContentPresenterMain"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="hc:IconElement.Geometry" Value="{x:Null}">
|
||||||
|
<Setter Property="Visibility" Value="Collapsed" TargetName="PathMain"/>
|
||||||
|
<Setter Property="Margin" Value="0" TargetName="ContentPresenterMain"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
|
<Setter Property="Opacity" Value=".9"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsPressed" Value="True">
|
||||||
|
<Setter Property="Opacity" Value=".6"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsEnabled" Value="False">
|
||||||
|
<Setter Property="Opacity" Value="0.4"/>
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ToggleButtonSwitchBaseStyle" BasedOn="{StaticResource BaseStyle}" TargetType="ToggleButton">
|
||||||
|
<Setter Property="FocusVisualStyle">
|
||||||
|
<Setter.Value>
|
||||||
|
<Style>
|
||||||
|
<Setter Property="Control.Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate>
|
||||||
|
<Rectangle Style="{StaticResource RectangleFocusVisualCircular}"/>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}"/>
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
|
||||||
|
<Setter Property="BorderThickness" Value="0"/>
|
||||||
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||||
|
<Setter Property="Padding" Value="6,0,0,0"/>
|
||||||
|
<Setter Property="Width" Value="36"/>
|
||||||
|
<Setter Property="Height" Value="22"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="ToggleButton">
|
||||||
|
<ControlTemplate.Resources>
|
||||||
|
<Storyboard x:Key="StoryboardChecked">
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(TranslateTransform.X)" Storyboard.TargetName="thumb">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="14"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="lightBorder">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="1"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="innerBorder">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="0"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="innerBorder">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="0"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
</Storyboard>
|
||||||
|
<Storyboard x:Key="StoryboardUnChecked">
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(TranslateTransform.X)" Storyboard.TargetName="thumb">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="0"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="lightBorder">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="0"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="innerBorder">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="1"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="innerBorder">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="1"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
</Storyboard>
|
||||||
|
</ControlTemplate.Resources>
|
||||||
|
<Viewbox>
|
||||||
|
<Grid x:Name="templateRoot" Background="Transparent" SnapsToDevicePixels="True">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Border Height="22" Width="36" x:Name="backBorder" Background="{DynamicResource BorderBrush}" CornerRadius="11"/>
|
||||||
|
<Border Grid.Column="0" Height="22" Width="36" Opacity="0" x:Name="lightBorder" Background="{DynamicResource PrimaryBrush}" CornerRadius="11" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
|
||||||
|
<Border Grid.Column="0" Height="20" Margin="1" Background="{TemplateBinding Background}" CornerRadius="11" Name="innerBorder" RenderTransformOrigin=".8,0.5">
|
||||||
|
<Border.RenderTransform>
|
||||||
|
<TransformGroup>
|
||||||
|
<ScaleTransform/>
|
||||||
|
</TransformGroup>
|
||||||
|
</Border.RenderTransform>
|
||||||
|
</Border>
|
||||||
|
<hc:SimplePanel Grid.Column="0" Margin="1">
|
||||||
|
<Border HorizontalAlignment="Left" CornerRadius="10" Name="thumb" Effect="{StaticResource EffectShadow2}" Background="White" Width="20" Height="20" RenderTransformOrigin="0.5,0.5">
|
||||||
|
<Border.RenderTransform>
|
||||||
|
<TransformGroup>
|
||||||
|
<TranslateTransform/>
|
||||||
|
</TransformGroup>
|
||||||
|
</Border.RenderTransform>
|
||||||
|
</Border>
|
||||||
|
</hc:SimplePanel>
|
||||||
|
<ContentPresenter x:Name="contentPresenter" Visibility="Collapsed" Grid.Column="1" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||||
|
</Grid>
|
||||||
|
</Viewbox>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="HasContent" Value="true">
|
||||||
|
<Setter Property="Visibility" TargetName="contentPresenter" Value="Visible"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsChecked" Value="true">
|
||||||
|
<Trigger.EnterActions>
|
||||||
|
<BeginStoryboard Storyboard="{StaticResource StoryboardChecked}"/>
|
||||||
|
</Trigger.EnterActions>
|
||||||
|
<Trigger.ExitActions>
|
||||||
|
<BeginStoryboard Storyboard="{StaticResource StoryboardUnChecked}"/>
|
||||||
|
</Trigger.ExitActions>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsEnabled" Value="False">
|
||||||
|
<Setter Property="Opacity" Value="0.4"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ToggleButtonIconBaseStyle" BasedOn="{StaticResource BaseStyle}" TargetType="ToggleButton">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource TextIconBrush}"/>
|
||||||
|
<Setter Property="Width" Value="{StaticResource DefaultControlHeight}"/>
|
||||||
|
<Setter Property="Height" Value="{StaticResource DefaultControlHeight}"/>
|
||||||
|
<Setter Property="Padding" Value="8"/>
|
||||||
|
<Setter Property="hc:IconSwitchElement.Geometry" Value="{x:Null}"/>
|
||||||
|
<Setter Property="hc:IconSwitchElement.GeometrySelected" Value="{x:Null}"/>
|
||||||
|
<Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}"/>
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
|
||||||
|
<Setter Property="BorderThickness" Value="0"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="ToggleButton">
|
||||||
|
<hc:SimplePanel>
|
||||||
|
<Border Background="{TemplateBinding Background}" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
|
<Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}">
|
||||||
|
<ContentControl HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
|
||||||
|
<Path x:Name="PathIcon" Width="{TemplateBinding hc:IconElement.Width}" Height="{TemplateBinding hc:IconElement.Height}" Fill="{TemplateBinding Foreground}" SnapsToDevicePixels="True" Stretch="Uniform" Data="{TemplateBinding hc:IconSwitchElement.Geometry}"/>
|
||||||
|
</ContentControl>
|
||||||
|
</Border>
|
||||||
|
<Border Visibility="Collapsed" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="BorderChecked" BorderThickness="4" BorderBrush="{TemplateBinding BorderBrush}"/>
|
||||||
|
</hc:SimplePanel>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsChecked" Value="True">
|
||||||
|
<Setter TargetName="PathIcon" Property="Data" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(hc:IconSwitchElement.GeometrySelected)}"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
|
<Setter Property="Opacity" Value=".9"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsPressed" Value="True">
|
||||||
|
<Setter Property="Opacity" Value=".6"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsEnabled" Value="False">
|
||||||
|
<Setter Property="Opacity" Value="0.4"/>
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ToggleButtonGroupItemBaseStyle" BasedOn="{StaticResource BaseStyle}" TargetType="ToggleButton">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
|
||||||
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||||
|
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||||
|
<Setter Property="hc:BorderElement.CornerRadius" Value="0"/>
|
||||||
|
<Setter Property="Height" Value="{StaticResource DefaultControlHeight}"/>
|
||||||
|
<Setter Property="Padding" Value="10,0"/>
|
||||||
|
<Setter Property="Margin" Value="-1,0,0,0"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="ToggleButton">
|
||||||
|
<Border x:Name="BorderRoot" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
|
||||||
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}">
|
||||||
|
<Path x:Name="PathMain" Width="{TemplateBinding hc:IconElement.Width}" Height="{TemplateBinding hc:IconElement.Height}" Fill="{TemplateBinding Foreground}" SnapsToDevicePixels="True" Stretch="Uniform" Data="{TemplateBinding hc:IconElement.Geometry}"/>
|
||||||
|
<ContentPresenter x:Name="contentPresenter" RecognizesAccessKey="True" VerticalAlignment="Center" Margin="6,0,0,0" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
|
<Setter Property="TextElement.Foreground" Value="{DynamicResource PrimaryBrush}" TargetName="contentPresenter"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsChecked" Value="true">
|
||||||
|
<Setter Property="BorderBrush" Value="{Binding Path=(hc:VisualElement.HighlightBorderBrush),RelativeSource={RelativeSource TemplatedParent}}" TargetName="BorderRoot"/>
|
||||||
|
<Setter Property="Background" Value="{Binding Path=(hc:VisualElement.HighlightBackground),RelativeSource={RelativeSource TemplatedParent}}" TargetName="BorderRoot"/>
|
||||||
|
<Setter Property="TextElement.Foreground" Value="{Binding Path=(hc:VisualElement.HighlightForeground),RelativeSource={RelativeSource TemplatedParent}}" TargetName="contentPresenter"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="Content" Value="{x:Null}">
|
||||||
|
<Setter Property="Visibility" Value="Collapsed" TargetName="contentPresenter"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="hc:IconElement.Geometry" Value="{x:Null}">
|
||||||
|
<Setter Property="Visibility" Value="Collapsed" TargetName="PathMain"/>
|
||||||
|
<Setter Property="Margin" Value="0" TargetName="contentPresenter"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="IsEnabled" Value="False">
|
||||||
|
<Setter Property="Opacity" Value="0.4"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsChecked" Value="True">
|
||||||
|
<Setter Property="Panel.ZIndex" Value="{x:Static system:Int32.MaxValue}"/>
|
||||||
|
</Trigger>
|
||||||
|
<DataTrigger Binding="{Binding Orientation,RelativeSource={RelativeSource AncestorType=hc:ButtonGroup}}" Value="Vertical">
|
||||||
|
<Setter Property="Margin" Value="0,-1,0,0"/>
|
||||||
|
</DataTrigger>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsPressed" Value="True">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource BorderBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
</ResourceDictionary>
|
@ -0,0 +1,231 @@
|
|||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:hc="clr-namespace:HandyControl.Controls"
|
||||||
|
xmlns:themes="clr-namespace:HandyControl.Themes">
|
||||||
|
|
||||||
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Basic/Geometries.xaml"/>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Styles/Button.xaml"/>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Styles/CheckBox.xaml"/>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Styles/RadioButton.xaml"/>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Styles/ComboBox.xaml"/>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Styles/TextBox.xaml"/>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Styles/Menu.xaml"/>
|
||||||
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
|
||||||
|
<Style x:Key="{x:Static ToolBar.SeparatorStyleKey}" TargetType="Separator">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource BorderBrush}"/>
|
||||||
|
<Setter Property="Width" Value="1"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!--Styles for controls in a toolbar.-->
|
||||||
|
<Style x:Key="ToolBarTrayBaseStyle" TargetType="ToolBarTray">
|
||||||
|
<Setter Property="Background" Value="Transparent"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="{x:Static ToolBar.ButtonStyleKey}" BasedOn="{StaticResource ButtonBaseStyle}" TargetType="Button">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
|
||||||
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource DarkDefaultBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsPressed" Value="True">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource BorderBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="{x:Static ToolBar.CheckBoxStyleKey}" BasedOn="{StaticResource CheckBoxBaseStyle}" TargetType="CheckBox"/>
|
||||||
|
|
||||||
|
<Style x:Key="{x:Static ToolBar.RadioButtonStyleKey}" BasedOn="{StaticResource RadioButtonBaseStyle}" TargetType="RadioButton"/>
|
||||||
|
|
||||||
|
<Style x:Key="{x:Static ToolBar.ComboBoxStyleKey}" BasedOn="{StaticResource ComboBoxBaseStyle}" TargetType="ComboBox"/>
|
||||||
|
|
||||||
|
<Style x:Key="{x:Static ToolBar.TextBoxStyleKey}" BasedOn="{StaticResource TextBoxBaseStyle}" TargetType="TextBox"/>
|
||||||
|
|
||||||
|
<Style x:Key="{x:Static ToolBar.MenuStyleKey}" BasedOn="{StaticResource MenuBaseStyle}" TargetType="Menu"/>
|
||||||
|
|
||||||
|
<Style x:Key="{x:Static ToolBar.ToggleButtonStyleKey}" BasedOn="{StaticResource ToggleButtonBaseStyle}" TargetType="ToggleButton">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
|
||||||
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource DarkDefaultBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsPressed" Value="True">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource BorderBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ToolBarThumbHorizontalStyle" TargetType="Thumb">
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="Thumb">
|
||||||
|
<Border SnapsToDevicePixels="True" Padding="{TemplateBinding Padding}" Background="Transparent">
|
||||||
|
<Path Stretch="Uniform" Width="4" Fill="{DynamicResource PrimaryBrush}" Data="{StaticResource DragVerticalGeometry}" SnapsToDevicePixels="True"/>
|
||||||
|
</Border>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="true">
|
||||||
|
<Setter Property="Cursor" Value="SizeAll"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ToolBarThumbVerticalStyle" TargetType="Thumb">
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="Thumb">
|
||||||
|
<Border SnapsToDevicePixels="True" Padding="{TemplateBinding Padding}" Background="Transparent">
|
||||||
|
<Path Stretch="Uniform" Height="4" Fill="{DynamicResource PrimaryBrush}" Data="{StaticResource DragHorizontalGeometry}" SnapsToDevicePixels="True"/>
|
||||||
|
</Border>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="true">
|
||||||
|
<Setter Property="Cursor" Value="SizeAll"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ToolBarVerticalOverflowButtonStyle" TargetType="ToggleButton">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}"/>
|
||||||
|
<Setter Property="MinHeight" Value="0"/>
|
||||||
|
<Setter Property="MinWidth" Value="0"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="ToggleButton">
|
||||||
|
<Border x:Name="Bd" SnapsToDevicePixels="true" CornerRadius="4" Background="{TemplateBinding Background}">
|
||||||
|
<Path x:Name="PathMore" Data="{StaticResource RightGeometry}" Height="8" Margin="4,4,8,4" HorizontalAlignment="Right" Fill="{DynamicResource PrimaryTextBrush}" Stretch="Uniform" SnapsToDevicePixels="True"/>
|
||||||
|
</Border>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="true">
|
||||||
|
<Setter Property="Fill" TargetName="PathMore" Value="{DynamicResource PrimaryBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsKeyboardFocused" Value="true">
|
||||||
|
<Setter Property="Fill" TargetName="PathMore" Value="{DynamicResource PrimaryBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsEnabled" Value="false">
|
||||||
|
<Setter Property="Visibility" Value="Collapsed"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ToolBarHorizontalOverflowButtonStyle" TargetType="ToggleButton">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}"/>
|
||||||
|
<Setter Property="MinHeight" Value="0"/>
|
||||||
|
<Setter Property="MinWidth" Value="0"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="ToggleButton">
|
||||||
|
<Border x:Name="Bd" SnapsToDevicePixels="true" CornerRadius="4" Background="{TemplateBinding Background}">
|
||||||
|
<Path x:Name="PathMore" Data="{StaticResource DownGeometry}" Width="8" Margin="4,4,4,8" VerticalAlignment="Bottom" Fill="{DynamicResource PrimaryTextBrush}" Stretch="Uniform" SnapsToDevicePixels="True"/>
|
||||||
|
</Border>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="true">
|
||||||
|
<Setter Property="Fill" TargetName="PathMore" Value="{DynamicResource PrimaryBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsKeyboardFocused" Value="true">
|
||||||
|
<Setter Property="Fill" TargetName="PathMore" Value="{DynamicResource PrimaryBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsEnabled" Value="false">
|
||||||
|
<Setter Property="Visibility" Value="Collapsed"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="ToolBarVerticalTemplate" TargetType="ToolBar">
|
||||||
|
<Grid x:Name="Grid" SnapsToDevicePixels="true">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<hc:SimplePanel x:Name="OverflowGrid" Grid.Row="1">
|
||||||
|
<ToggleButton Margin="0,4,0,0" x:Name="OverflowButton" ClickMode="Press" FocusVisualStyle="{x:Null}" IsChecked="{Binding IsOverflowOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" IsEnabled="{TemplateBinding HasOverflowItems}" Style="{StaticResource ToolBarVerticalOverflowButtonStyle}"/>
|
||||||
|
<Popup x:Name="OverflowPopup" AllowsTransparency="true" Focusable="false" IsOpen="{Binding IsOverflowOpen, RelativeSource={RelativeSource TemplatedParent}}" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Right" StaysOpen="false">
|
||||||
|
<Border x:Name="ToolBarSubMenuBorder" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1" Background="{DynamicResource RegionBrush}">
|
||||||
|
<ToolBarOverflowPanel x:Name="PART_ToolBarOverflowPanel" KeyboardNavigation.DirectionalNavigation="Cycle" FocusVisualStyle="{x:Null}" Focusable="true" Margin="6" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" KeyboardNavigation.TabNavigation="Cycle" WrapWidth="200"/>
|
||||||
|
</Border>
|
||||||
|
</Popup>
|
||||||
|
</hc:SimplePanel>
|
||||||
|
<Border x:Name="MainPanelBorder" Grid.Row="0" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}">
|
||||||
|
<DockPanel KeyboardNavigation.TabIndex="1" KeyboardNavigation.TabNavigation="Local">
|
||||||
|
<Thumb x:Name="ToolBarThumb" DockPanel.Dock="Top" Style="{StaticResource ToolBarThumbVerticalStyle}" Height="10"/>
|
||||||
|
<ContentPresenter x:Name="ToolBarHeader" DockPanel.Dock="Top" ContentSource="Header" HorizontalAlignment="Center" Margin="0,4,0,4" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="Center"/>
|
||||||
|
<ToolBarPanel x:Name="PART_ToolBarPanel" IsItemsHost="true" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||||
|
</DockPanel>
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsOverflowOpen" Value="true">
|
||||||
|
<Setter Property="IsEnabled" TargetName="ToolBarThumb" Value="false"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="Header" Value="{x:Null}">
|
||||||
|
<Setter Property="Visibility" TargetName="ToolBarHeader" Value="Collapsed"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="ToolBarTray.IsLocked" Value="true">
|
||||||
|
<Setter Property="Visibility" TargetName="ToolBarThumb" Value="Collapsed"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="ToolBarHorizontalTemplate" TargetType="ToolBar">
|
||||||
|
<Grid x:Name="Grid" SnapsToDevicePixels="true">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<hc:SimplePanel x:Name="OverflowGrid" Grid.Column="1">
|
||||||
|
<ToggleButton Margin="4,0,0,0" x:Name="OverflowButton" ClickMode="Press" FocusVisualStyle="{x:Null}" IsChecked="{Binding IsOverflowOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" IsEnabled="{TemplateBinding HasOverflowItems}" Style="{StaticResource ToolBarHorizontalOverflowButtonStyle}"/>
|
||||||
|
<Popup x:Name="OverflowPopup" AllowsTransparency="true" Focusable="false" IsOpen="{Binding IsOverflowOpen, RelativeSource={RelativeSource TemplatedParent}}" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom" StaysOpen="false">
|
||||||
|
<Border x:Name="ToolBarSubMenuBorder" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1" Background="{DynamicResource RegionBrush}">
|
||||||
|
<ToolBarOverflowPanel x:Name="PART_ToolBarOverflowPanel" KeyboardNavigation.DirectionalNavigation="Cycle" FocusVisualStyle="{x:Null}" Focusable="true" Margin="6" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" KeyboardNavigation.TabNavigation="Cycle" WrapWidth="200"/>
|
||||||
|
</Border>
|
||||||
|
</Popup>
|
||||||
|
</hc:SimplePanel>
|
||||||
|
<Border x:Name="MainPanelBorder" Grid.Column="0" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}">
|
||||||
|
<DockPanel KeyboardNavigation.TabIndex="1" KeyboardNavigation.TabNavigation="Local">
|
||||||
|
<Thumb x:Name="ToolBarThumb" Style="{StaticResource ToolBarThumbHorizontalStyle}" Width="10"/>
|
||||||
|
<ContentPresenter x:Name="ToolBarHeader" ContentSource="Header" HorizontalAlignment="Center" Margin="4,0,4,0" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="Center"/>
|
||||||
|
<ToolBarPanel x:Name="PART_ToolBarPanel" IsItemsHost="true" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||||
|
</DockPanel>
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsOverflowOpen" Value="true">
|
||||||
|
<Setter Property="IsEnabled" TargetName="ToolBarThumb" Value="false"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="Header" Value="{x:Null}">
|
||||||
|
<Setter Property="Visibility" TargetName="ToolBarHeader" Value="Collapsed"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="ToolBarTray.IsLocked" Value="true">
|
||||||
|
<Setter Property="Visibility" TargetName="ToolBarThumb" Value="Collapsed"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<Style x:Key="ToolBarBaseStyle" TargetType="ToolBar">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}"/>
|
||||||
|
<Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}"/>
|
||||||
|
<Setter Property="Margin" Value="0,0,4,4"/>
|
||||||
|
<Setter Property="Template" Value="{StaticResource ToolBarHorizontalTemplate}"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="Orientation" Value="Vertical">
|
||||||
|
<Setter Property="Template" Value="{StaticResource ToolBarVerticalTemplate}"/>
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
</ResourceDictionary>
|
@ -0,0 +1,127 @@
|
|||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:hc="clr-namespace:HandyControl.Controls"
|
||||||
|
xmlns:themes="clr-namespace:HandyControl.Themes">
|
||||||
|
|
||||||
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Basic/Sizes.xaml"/>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Basic/Converters.xaml"/>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Styles/Base/BaseStyle.xaml"/>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Styles/Base/ScrollViewerBaseStyle.xaml"/>
|
||||||
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
|
||||||
|
<PathGeometry x:Key="TreeArrow" Figures="M508.893248 762.931659a65.039498 65.039498 0 0 1-46.420659-19.485839L97.125746 371.004022c-25.143018-25.634319-24.752868-66.816849 0.881451-91.959868 25.648769-25.164693 66.809624-24.745643 91.959867 0.881451l318.933409 325.125238 318.933408-325.125238a65.025048 65.025048 0 0 1 92.841318 91.078417L555.313907 743.44582a65.025048 65.025048 0 0 1-46.420659 19.485839z"/>
|
||||||
|
<Style x:Key="ExpandCollapseToggleStyle" TargetType="ToggleButton">
|
||||||
|
<Setter Property="Focusable" Value="False"/>
|
||||||
|
<Setter Property="Width" Value="16"/>
|
||||||
|
<Setter Property="Height" Value="16"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="ToggleButton">
|
||||||
|
<Border Background="Transparent" Height="16" Padding="4" Width="16">
|
||||||
|
<Path x:Name="ExpandPath" RenderTransformOrigin="0.5,0.5" Stretch="Uniform" Data="{StaticResource TreeArrow}" Fill="{Binding Foreground, RelativeSource={RelativeSource AncestorType=TreeViewItem}}">
|
||||||
|
<Path.RenderTransform>
|
||||||
|
<RotateTransform Angle="-90"/>
|
||||||
|
</Path.RenderTransform>
|
||||||
|
</Path>
|
||||||
|
</Border>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsChecked" Value="True">
|
||||||
|
<Setter Property="RenderTransform" TargetName="ExpandPath">
|
||||||
|
<Setter.Value>
|
||||||
|
<RotateTransform Angle="0"/>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="TreeViewItemBaseStyle" BasedOn="{StaticResource BaseStyle}" TargetType="TreeViewItem">
|
||||||
|
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisualRadius0Margin0}"/>
|
||||||
|
<Setter Property="Background" Value="Transparent"/>
|
||||||
|
<Setter Property="Padding" Value="10,0"/>
|
||||||
|
<Setter Property="BorderThickness" Value="0"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="TreeViewItem">
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition MinHeight="{StaticResource DefaultControlHeight}"/>
|
||||||
|
<RowDefinition/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Border x:Name="Bd" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
|
||||||
|
<StackPanel Orientation="Horizontal" Margin="{Binding Converter={StaticResource TreeViewItemMarginConverter}, RelativeSource={RelativeSource TemplatedParent}}">
|
||||||
|
<ToggleButton x:Name="Expander" ClickMode="Press" IsChecked="{Binding IsExpanded, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ExpandCollapseToggleStyle}"/>
|
||||||
|
<ContentPresenter VerticalAlignment="Center" x:Name="PART_Header" ContentSource="Header" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
<ItemsPresenter x:Name="ItemsHost" Grid.Row="1"/>
|
||||||
|
</Grid>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<MultiTrigger>
|
||||||
|
<MultiTrigger.Conditions>
|
||||||
|
<Condition Property="IsMouseOver" Value="true"/>
|
||||||
|
<Condition Property="HasItems" Value="false"/>
|
||||||
|
</MultiTrigger.Conditions>
|
||||||
|
<Setter Property="Background" TargetName="Bd" Value="{DynamicResource SecondaryRegionBrush}"/>
|
||||||
|
</MultiTrigger>
|
||||||
|
<Trigger Property="IsExpanded" Value="false">
|
||||||
|
<Setter Property="Visibility" TargetName="ItemsHost" Value="Collapsed"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="HasItems" Value="false">
|
||||||
|
<Setter Property="Visibility" TargetName="Expander" Value="Hidden"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsSelected" Value="true">
|
||||||
|
<Setter Property="Background" TargetName="Bd" Value="{DynamicResource PrimaryBrush}"/>
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource TextIconBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<MultiTrigger>
|
||||||
|
<MultiTrigger.Conditions>
|
||||||
|
<Condition Property="IsSelected" Value="true"/>
|
||||||
|
<Condition Property="IsSelectionActive" Value="false"/>
|
||||||
|
</MultiTrigger.Conditions>
|
||||||
|
<Setter Property="Background" TargetName="Bd" Value="{DynamicResource DarkDefaultBrush}"/>
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
|
||||||
|
</MultiTrigger>
|
||||||
|
<Trigger Property="IsEnabled" Value="false">
|
||||||
|
<Setter Property="Foreground" Value="{StaticResource {x:Static SystemColors.GrayTextBrushKey}}"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="TreeViewBaseStyle" TargetType="TreeView" BasedOn="{StaticResource BaseStyle}">
|
||||||
|
<Setter Property="Focusable" Value="False"/>
|
||||||
|
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
|
||||||
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
|
<Setter Property="Padding" Value="0"/>
|
||||||
|
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
|
||||||
|
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
|
||||||
|
<Setter Property="hc:ScrollViewer.IsInertiaEnabled" Value="False"/>
|
||||||
|
<Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
|
||||||
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="TreeView">
|
||||||
|
<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="true">
|
||||||
|
<hc:ScrollViewer x:Name="_tv_scrollviewer_" IsInertiaEnabled="{Binding Path=(hc:ScrollViewer.IsInertiaEnabled),RelativeSource={RelativeSource TemplatedParent}}" Template="{StaticResource ScrollViewerBaseControlTemplate}" Background="{TemplateBinding Background}" CanContentScroll="false" Focusable="false" HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
|
||||||
|
<ItemsPresenter/>
|
||||||
|
</hc:ScrollViewer>
|
||||||
|
</Border>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsEnabled" Value="false">
|
||||||
|
<Setter Property="Background" TargetName="Bd" Value="{StaticResource {x:Static SystemColors.ControlBrushKey}}"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
</ResourceDictionary>
|
@ -0,0 +1 @@
|
|||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"/>
|
@ -0,0 +1 @@
|
|||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"/>
|
181
src/Net_35/HandyControl_Net_35/Themes/Styles/Clock.xaml
Normal file
181
src/Net_35/HandyControl_Net_35/Themes/Styles/Clock.xaml
Normal file
@ -0,0 +1,181 @@
|
|||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:langs="clr-namespace:HandyControl.Properties.Langs"
|
||||||
|
xmlns:hc="clr-namespace:HandyControl.Controls"
|
||||||
|
xmlns:ex="clr-namespace:HandyControl.Tools.Extension"
|
||||||
|
xmlns:themes="clr-namespace:HandyControl.Themes">
|
||||||
|
|
||||||
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Basic/Converters.xaml"/>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Styles/Button.xaml"/>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Styles/Base/ListBoxBaseStyle.xaml"/>
|
||||||
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
|
||||||
|
<Style x:Key="ClockRadioButtonStyle" TargetType="hc:ClockRadioButton">
|
||||||
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||||
|
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
|
||||||
|
<Setter Property="Focusable" Value="False"/>
|
||||||
|
<Setter Property="Width" Value="28"/>
|
||||||
|
<Setter Property="Height" Value="28"/>
|
||||||
|
<Setter Property="Background" Value="{DynamicResource DangerBrush}"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="hc:ClockRadioButton">
|
||||||
|
<ControlTemplate.Resources>
|
||||||
|
<Storyboard x:Key="Storyboard1">
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="optionMark">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="1"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
</Storyboard>
|
||||||
|
<Storyboard x:Key="Storyboard2">
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="optionMark">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0" Value="0"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
</Storyboard>
|
||||||
|
</ControlTemplate.Resources>
|
||||||
|
<hc:SimplePanel x:Name="templateRoot" Background="Transparent" SnapsToDevicePixels="True">
|
||||||
|
<Ellipse x:Name="optionMark" Fill="{TemplateBinding Background}" MinWidth="6" MinHeight="6" Opacity="0"/>
|
||||||
|
<ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||||
|
</hc:SimplePanel>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsChecked" Value="true">
|
||||||
|
<Trigger.EnterActions>
|
||||||
|
<BeginStoryboard Storyboard="{StaticResource Storyboard1}"/>
|
||||||
|
</Trigger.EnterActions>
|
||||||
|
<Trigger.ExitActions>
|
||||||
|
<BeginStoryboard Storyboard="{StaticResource Storyboard2}"/>
|
||||||
|
</Trigger.ExitActions>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="IsChecked" Value="True">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource TextIconBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style TargetType="hc:Clock">
|
||||||
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
|
<Setter Property="Focusable" Value="False"/>
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
|
||||||
|
<Setter Property="Width" Value="210"/>
|
||||||
|
<Setter Property="Height" Value="310"/>
|
||||||
|
<Setter Property="VerticalAlignment" Value="Top"/>
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||||
|
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
|
||||||
|
<Setter Property="ClockRadioButtonStyle" Value="{StaticResource ClockRadioButtonStyle}"/>
|
||||||
|
<Setter Property="hc:TitleElement.Background" Value="{DynamicResource TitleBrush}"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="hc:Clock">
|
||||||
|
<Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="50"/>
|
||||||
|
<RowDefinition/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Border Background="{Binding Path=(hc:TitleElement.Background),RelativeSource={RelativeSource TemplatedParent}}" Name="PART_BorderTitle">
|
||||||
|
<TextBlock x:Name="PART_TimeStr" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="20" Foreground="White"/>
|
||||||
|
</Border>
|
||||||
|
<Border Grid.Row="1" Background="{TemplateBinding Background}">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Canvas Grid.ColumnSpan="3" Margin="0,16,0,0" VerticalAlignment="Top" Name="PART_Canvas" Width="178" Height="178">
|
||||||
|
<Border Background="{DynamicResource SecondaryRegionBrush}" Width="178" Height="178" CornerRadius="89"/>
|
||||||
|
<hc:CirclePanel Diameter="130" x:Name="PART_PanelNum" KeepVertical="True" Margin="24,24,0,0" OffsetAngle="-60"/>
|
||||||
|
<Border Focusable="False" Name="PART_BorderClock" Background="{DynamicResource PrimaryBrush}" RenderTransformOrigin="0.5,1" Height="63" Width="2" Canvas.Left="88" Canvas.Top="26"/>
|
||||||
|
<Ellipse Fill="White" Width="8" Height="8" StrokeThickness="2" Stroke="{DynamicResource PrimaryBrush}" Canvas.Top="85" Canvas.Left="85"/>
|
||||||
|
</Canvas>
|
||||||
|
<hc:ClockRadioButton Background="{DynamicResource PrimaryBrush}" Grid.Column="0" x:Name="PART_ButtonAm" IsChecked="True" Height="30" Width="30" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="16,0,0,16" Content="{ex:Lang Key={x:Static langs:LangKeys.Am}}" Style="{StaticResource ClockRadioButtonStyle}"/>
|
||||||
|
<hc:ClockRadioButton Background="{DynamicResource PrimaryBrush}" Grid.Column="2" x:Name="PART_ButtonPm" Height="30" Width="30" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,16,16" Content="{ex:Lang Key={x:Static langs:LangKeys.Pm}}" Style="{StaticResource ClockRadioButtonStyle}"/>
|
||||||
|
<Button Grid.Column="1" Visibility="{TemplateBinding ShowConfirmButton,Converter={StaticResource Boolean2VisibilityConverter}}" Name="PART_ButtonConfirm" Content="{ex:Lang Key={x:Static langs:LangKeys.Confirm}}" Foreground="{DynamicResource PrimaryBrush}" HorizontalAlignment="Center" Margin="0,0,0,19" Height="24" Width="60" VerticalAlignment="Bottom" Background="Transparent" Style="{StaticResource ButtonCustom}"/>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ClockListBoxItemStyle" TargetType="ListBoxItem" BasedOn="{StaticResource ListBoxItemBaseStyle}">
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="true">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsSelected" Value="true">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource PrimaryBrush}"/>
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource TextIconBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsEnabled" Value="false">
|
||||||
|
<Setter Property="Opacity" Value=".4"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="hc:EdgeElement.ShowEdgeContent" Value="true">
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="ListBoxItem">
|
||||||
|
<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<ContentControl Width="16" Height="16" Content="{Binding Path=(hc:EdgeElement.LeftContent),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
|
<ContentPresenter Margin="6,0,0,0" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ClockListBoxStyle" TargetType="ListBox" BasedOn="{StaticResource ListBoxBaseStyle}">
|
||||||
|
<Setter Property="MaxHeight" Value="192"/>
|
||||||
|
<Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
|
||||||
|
<Setter Property="BorderThickness" Value="0"/>
|
||||||
|
<Setter Property="ItemContainerStyle" Value="{StaticResource ClockListBoxItemStyle}"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style TargetType="hc:ListClock">
|
||||||
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
|
<Setter Property="Focusable" Value="False"/>
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
|
||||||
|
<Setter Property="Width" Value="210"/>
|
||||||
|
<Setter Property="VerticalAlignment" Value="Top"/>
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||||
|
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
|
||||||
|
<Setter Property="hc:TitleElement.Background" Value="{DynamicResource TitleBrush}"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="hc:ListClock">
|
||||||
|
<Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<ListBox x:Name="PART_HourList" Style="{StaticResource ClockListBoxStyle}"/>
|
||||||
|
<ListBox Grid.Row="0" Grid.Column="1" x:Name="PART_MinuteList" Style="{StaticResource ClockListBoxStyle}" BorderThickness="1,0"/>
|
||||||
|
<ListBox Grid.Row="0" Grid.Column="2" x:Name="PART_SecondList" Style="{StaticResource ClockListBoxStyle}"/>
|
||||||
|
<Border VerticalAlignment="Bottom" Visibility="{Binding Visibility,ElementName=PART_ButtonConfirm}" Height="1" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3" Background="{DynamicResource BorderBrush}"/>
|
||||||
|
<Button Margin="0,10" Grid.Column="0" Grid.ColumnSpan="3" Grid.Row="1" Visibility="{TemplateBinding ShowConfirmButton,Converter={StaticResource Boolean2VisibilityConverter}}" Name="PART_ButtonConfirm" Content="{ex:Lang Key={x:Static langs:LangKeys.Confirm}}" Foreground="{DynamicResource PrimaryBrush}" HorizontalAlignment="Center" Background="Transparent" Style="{StaticResource ButtonCustom}"/>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
</ResourceDictionary>
|
@ -0,0 +1 @@
|
|||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"/>
|
@ -0,0 +1 @@
|
|||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"/>
|
@ -0,0 +1 @@
|
|||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"/>
|
@ -0,0 +1,79 @@
|
|||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:hc="clr-namespace:HandyControl.Controls"
|
||||||
|
xmlns:interactivity="clr-namespace:HandyControl.Interactivity"
|
||||||
|
xmlns:themes="clr-namespace:HandyControl.Themes">
|
||||||
|
|
||||||
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Styles/Button.xaml"/>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Styles/TextBlock.xaml"/>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Styles/Border.xaml"/>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Styles/ToggleButton.xaml"/>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Basic/Converters.xaml"/>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Basic/Paths.xaml"/>
|
||||||
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
|
||||||
|
<Style TargetType="hc:ImageViewer">
|
||||||
|
<Setter Property="Focusable" Value="False"/>
|
||||||
|
<Setter Property="Background" Value="Transparent"/>
|
||||||
|
<Setter Property="MinWidth" Value="400"/>
|
||||||
|
<Setter Property="MinHeight" Value="250"/>
|
||||||
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="hc:ImageViewer">
|
||||||
|
<Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}">
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<hc:SimplePanel x:Name="PART_PanelMain" ClipToBounds="True" Grid.RowSpan="2">
|
||||||
|
<Border HorizontalAlignment="Left" VerticalAlignment="Top" Height="{TemplateBinding ImageHeight}" Width="{TemplateBinding ImageWidth}" Margin="{TemplateBinding ImageMargin}">
|
||||||
|
<Image Name="PART_ImageMain" RenderOptions.BitmapScalingMode="NearestNeighbor" RenderTransformOrigin="0.5,0.5" Source="{TemplateBinding ImageSource}"/>
|
||||||
|
</Border>
|
||||||
|
</hc:SimplePanel>
|
||||||
|
<Border Grid.Row="0" Grid.RowSpan="2" Width="252" Height="162" HorizontalAlignment="Right" VerticalAlignment="Bottom" Background="{DynamicResource DarkOpacityBrush}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1">
|
||||||
|
<Border.Visibility>
|
||||||
|
<MultiBinding Converter="{StaticResource BooleanArr2VisibilityConverter}">
|
||||||
|
<Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ShowSmallImgInternal"/>
|
||||||
|
<Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ShowImgMap"/>
|
||||||
|
</MultiBinding>
|
||||||
|
</Border.Visibility>
|
||||||
|
<Canvas ClipToBounds="True" Name="PART_CanvasSmallImg" MaxWidth="250" MaxHeight="160">
|
||||||
|
<Border Name="PART_BorderMove" Background="Transparent" Width="50" Height="70" BorderThickness="1" BorderBrush="Black">
|
||||||
|
<Border BorderThickness="1" BorderBrush="White"/>
|
||||||
|
</Border>
|
||||||
|
</Canvas>
|
||||||
|
</Border>
|
||||||
|
<Border Name="PART_BorderBottom" Opacity="0" CornerRadius="4,4,0,0" Grid.Row="1" HorizontalAlignment="Center" Background="{DynamicResource DarkOpacityBrush}">
|
||||||
|
<StackPanel Margin="30,10" VerticalAlignment="Center" Orientation="Horizontal">
|
||||||
|
<Button Command="interactivity:ControlCommands.Save" Margin="6,0" Style="{StaticResource ButtonIcon}" hc:IconElement.Geometry="{StaticResource SaveGeometry}" Padding="3"/>
|
||||||
|
<Button Command="interactivity:ControlCommands.Open" Margin="6,0" Style="{StaticResource ButtonIcon}" hc:IconElement.Geometry="{StaticResource WindowsGeometry}" Padding="3"/>
|
||||||
|
|
||||||
|
<Border Margin="10,2" Background="White" Style="{StaticResource BorderVerticallySplitter}"/>
|
||||||
|
|
||||||
|
<Button Command="interactivity:ControlCommands.Reduce" Margin="6,0" Style="{StaticResource ButtonIcon}" hc:IconElement.Geometry="{StaticResource ReduceGeometry}" Padding="3"/>
|
||||||
|
<TextBlock Margin="6,0" Text="{TemplateBinding ScaleStr}" Style="{StaticResource TextBlockSubTitle}" Foreground="{DynamicResource TextIconBrush}"/>
|
||||||
|
<Button Command="interactivity:ControlCommands.Enlarge" Margin="6,0" Style="{StaticResource ButtonIcon}" hc:IconElement.Geometry="{StaticResource EnlargeGeometry}" Padding="3"/>
|
||||||
|
<Button Command="interactivity:ControlCommands.Restore" Background="Transparent" Margin="6,0" Style="{StaticResource ButtonCustom}" Foreground="White">
|
||||||
|
<Border BorderThickness="1" BorderBrush="White" Padding="2">
|
||||||
|
<TextBlock Text="1:1"/>
|
||||||
|
</Border>
|
||||||
|
</Button>
|
||||||
|
<Border Margin="10,2" Background="White" Style="{StaticResource BorderVerticallySplitter}"/>
|
||||||
|
<Button Command="interactivity:ControlCommands.RotateLeft" CommandParameter="" Margin="6,0" Style="{StaticResource ButtonIcon}" hc:IconElement.Geometry="{StaticResource RotateLeftGeometry}" Padding="3"/>
|
||||||
|
<Button Command="interactivity:ControlCommands.RotateRight" Margin="6,0,0,0" Style="{StaticResource ButtonIcon}" hc:IconElement.Geometry="{StaticResource RotateRightGeometry}" Padding="3"/>
|
||||||
|
<ToggleButton Visibility="{TemplateBinding ShowFullScreenButton,Converter={StaticResource Boolean2VisibilityConverter}}" Foreground="{DynamicResource TextIconBrush}" IsChecked="{Binding IsFullScreen,RelativeSource={RelativeSource TemplatedParent},Mode=TwoWay}" Margin="12,0,6,0" Style="{StaticResource ToggleButtonIconTransparent}" hc:IconSwitchElement.Geometry="{StaticResource FullScreenGeometry}" hc:IconSwitchElement.GeometrySelected="{StaticResource FullScreenReturnGeometry}" Padding="3"/>
|
||||||
|
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
</ResourceDictionary>
|
161
src/Net_35/HandyControl_Net_35/Themes/Styles/ListView.xaml
Normal file
161
src/Net_35/HandyControl_Net_35/Themes/Styles/ListView.xaml
Normal file
@ -0,0 +1,161 @@
|
|||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:themes="clr-namespace:HandyControl.Themes">
|
||||||
|
|
||||||
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Basic/Sizes.xaml"/>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Styles/Base/ScrollViewerBaseStyle.xaml"/>
|
||||||
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
|
||||||
|
<Style x:Key="GridViewColumnHeaderGripper" TargetType="Thumb">
|
||||||
|
<Setter Property="Canvas.Right" Value="-9"/>
|
||||||
|
<Setter Property="Width" Value="18"/>
|
||||||
|
<Setter Property="Height" Value="{Binding ActualHeight, RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
|
<Setter Property="Padding" Value="0"/>
|
||||||
|
<Setter Property="Background" Value="Transparent"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="Thumb">
|
||||||
|
<Border Background="Transparent" Padding="{TemplateBinding Padding}">
|
||||||
|
<Rectangle Fill="{TemplateBinding Background}" HorizontalAlignment="Center" Width="1"/>
|
||||||
|
</Border>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style TargetType="GridViewColumnHeader">
|
||||||
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||||
|
<Setter Property="HorizontalContentAlignment" Value="Left"/>
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
|
||||||
|
<Setter Property="Padding" Value="12,6,12,12"/>
|
||||||
|
<Setter Property="MinHeight" Value="44"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="GridViewColumnHeader">
|
||||||
|
<Grid SnapsToDevicePixels="true">
|
||||||
|
<Border x:Name="HeaderBorder" BorderBrush="{TemplateBinding BorderBrush}" Background="Transparent">
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition MaxHeight="7"/>
|
||||||
|
<RowDefinition/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Border Padding="{TemplateBinding Padding}" Grid.RowSpan="2">
|
||||||
|
<ContentPresenter x:Name="HeaderContent" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="0,0,0,1" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
<Canvas>
|
||||||
|
<Thumb x:Name="PART_HeaderGripper" Style="{StaticResource GridViewColumnHeaderGripper}"/>
|
||||||
|
</Canvas>
|
||||||
|
</Grid>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ListViewItemBaseStyle" TargetType="ListViewItem">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
|
||||||
|
<Setter Property="BorderThickness" Value="0"/>
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
|
||||||
|
<Setter Property="SnapsToDevicePixels" Value="true"/>
|
||||||
|
<Setter Property="Margin" Value="0,0,0,4"/>
|
||||||
|
<Setter Property="Padding" Value="{StaticResource DefaultControlPadding}"/>
|
||||||
|
<Setter Property="MinHeight" Value="44"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="ListViewItem">
|
||||||
|
<Border CornerRadius="4" x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
|
||||||
|
<GridViewRowPresenter Content="{TemplateBinding Content}" Columns="{TemplateBinding GridView.ColumnCollection}"/>
|
||||||
|
</Border>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsSelected" Value="True">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource PrimaryBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="IsSelected" Value="True">
|
||||||
|
<Setter Property="Foreground" Value="White"/>
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ListViewScrollViewerStyle" TargetType="ScrollViewer">
|
||||||
|
<Setter Property="Focusable" Value="False"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="ScrollViewer">
|
||||||
|
<ControlTemplate.Resources>
|
||||||
|
<Storyboard x:Key="Storyboard1">
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PART_VerticalScrollBar"/>
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PART_HorizontalScrollBar"/>
|
||||||
|
</Storyboard>
|
||||||
|
<Storyboard x:Key="Storyboard2">
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PART_VerticalScrollBar"/>
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PART_HorizontalScrollBar"/>
|
||||||
|
</Storyboard>
|
||||||
|
</ControlTemplate.Resources>
|
||||||
|
<Grid Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="*"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<DockPanel Margin="{TemplateBinding Padding}" Grid.RowSpan="2" Grid.ColumnSpan="2">
|
||||||
|
<ScrollViewer DockPanel.Dock="Top" Focusable="False" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden">
|
||||||
|
<GridViewHeaderRowPresenter AllowsColumnReorder="{Binding TemplatedParent.View.AllowsColumnReorder, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderContainerStyle="{Binding TemplatedParent.View.ColumnHeaderContainerStyle, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderToolTip="{Binding TemplatedParent.View.ColumnHeaderToolTip, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderContextMenu="{Binding TemplatedParent.View.ColumnHeaderContextMenu, RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderTemplate="{Binding TemplatedParent.View.ColumnHeaderTemplate, RelativeSource={RelativeSource TemplatedParent}}" Columns="{Binding TemplatedParent.View.Columns, RelativeSource={RelativeSource TemplatedParent}}" Margin="2,0" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||||
|
</ScrollViewer>
|
||||||
|
<ScrollContentPresenter x:Name="PART_ScrollContentPresenter" CanContentScroll="{TemplateBinding CanContentScroll}" CanHorizontallyScroll="False" CanVerticallyScroll="False" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" KeyboardNavigation.DirectionalNavigation="Local" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||||
|
</DockPanel>
|
||||||
|
<ScrollBar x:Name="PART_VerticalScrollBar" Opacity="0" Style="{StaticResource ScrollBarBaseStyle}" Cursor="Arrow" Grid.Column="1" Maximum="{TemplateBinding ScrollableHeight}" Minimum="0" Grid.Row="0" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportHeight}"/>
|
||||||
|
<ScrollBar x:Name="PART_HorizontalScrollBar" Opacity="0" Style="{StaticResource ScrollBarBaseStyle}" Cursor="Arrow" Grid.Column="0" Maximum="{TemplateBinding ScrollableWidth}" Minimum="0" Orientation="Horizontal" Grid.Row="1" Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" Value="{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportWidth}"/>
|
||||||
|
<DockPanel Background="{Binding Background, ElementName=PART_VerticalScrollBar}" Grid.Column="1" LastChildFill="False" Grid.Row="1">
|
||||||
|
<Rectangle DockPanel.Dock="Left" Fill="White" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" Width="1"/>
|
||||||
|
<Rectangle DockPanel.Dock="Top" Fill="White" Height="1" Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"/>
|
||||||
|
</DockPanel>
|
||||||
|
</Grid>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<EventTrigger RoutedEvent="ScrollViewer.MouseEnter">
|
||||||
|
<BeginStoryboard Storyboard="{StaticResource Storyboard1}"/>
|
||||||
|
</EventTrigger>
|
||||||
|
<EventTrigger RoutedEvent="ScrollViewer.MouseLeave">
|
||||||
|
<BeginStoryboard Storyboard="{StaticResource Storyboard2}"/>
|
||||||
|
</EventTrigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style TargetType="ListView">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}"/>
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
|
||||||
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
|
<Setter Property="Padding" Value="6"/>
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
|
||||||
|
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
|
||||||
|
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
|
||||||
|
<Setter Property="ScrollViewer.CanContentScroll" Value="true"/>
|
||||||
|
<Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
|
||||||
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||||
|
<Setter Property="ItemContainerStyle" Value="{StaticResource ListViewItemBaseStyle}"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="ListView">
|
||||||
|
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="True">
|
||||||
|
<ScrollViewer Style="{StaticResource ListViewScrollViewerStyle}">
|
||||||
|
<ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||||
|
</ScrollViewer>
|
||||||
|
</Border>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
</ResourceDictionary>
|
107
src/Net_35/HandyControl_Net_35/Themes/Styles/MessageBox.xaml
Normal file
107
src/Net_35/HandyControl_Net_35/Themes/Styles/MessageBox.xaml
Normal file
@ -0,0 +1,107 @@
|
|||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:hc="clr-namespace:HandyControl.Controls"
|
||||||
|
xmlns:interactivity="clr-namespace:HandyControl.Interactivity"
|
||||||
|
xmlns:shell="clr-namespace:Microsoft.Windows.Shell"
|
||||||
|
xmlns:themes="clr-namespace:HandyControl.Themes">
|
||||||
|
|
||||||
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Styles/Window.xaml"/>
|
||||||
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
|
||||||
|
<Style x:Key="MessageBoxButtonStyle" BasedOn="{StaticResource {x:Type Button}}" TargetType="Button">
|
||||||
|
<Setter Property="MinWidth" Value="88"/>
|
||||||
|
<Setter Property="Visibility" Value="{Binding IsEnabled,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
||||||
|
<Setter Property="Margin" Value="5,0"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="MessageBoxPrimaryButtonStyle" BasedOn="{StaticResource ButtonPrimary}" TargetType="Button">
|
||||||
|
<Setter Property="MinWidth" Value="88"/>
|
||||||
|
<Setter Property="Visibility" Value="{Binding IsEnabled,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
||||||
|
<Setter Property="Margin" Value="5,0"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style TargetType="hc:MessageBox" BasedOn="{StaticResource WindowWin10}">
|
||||||
|
<Setter Property="MinHeight" Value="172"/>
|
||||||
|
<Setter Property="ShowInTaskbar" Value="False"/>
|
||||||
|
<Setter Property="MinWidth" Value="335"/>
|
||||||
|
<Setter Property="MaxWidth" Value="476"/>
|
||||||
|
<Setter Property="MaxHeight" Value="680"/>
|
||||||
|
<Setter Property="ResizeMode" Value="NoResize"/>
|
||||||
|
<Setter Property="SizeToContent" Value="WidthAndHeight"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="hc:MessageBox">
|
||||||
|
<Border SnapsToDevicePixels="True" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}">
|
||||||
|
<Grid Margin="{TemplateBinding Padding}">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid Background="{TemplateBinding NonClientAreaBackground}" Name="PART_NonClientArea" TextElement.Foreground="{TemplateBinding NonClientAreaForeground}">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<StackPanel shell:WindowChrome.IsHitTestVisibleInChrome="True" VerticalAlignment="Top" Grid.Column="1" HorizontalAlignment="Right" Orientation="Horizontal">
|
||||||
|
<Button Background="{TemplateBinding CloseButtonBackground}" Foreground="{TemplateBinding CloseButtonForeground}" IsTabStop="False" Name="PART_ButtonClose" Height="29" Style="{StaticResource ButtonIcon}" Width="46" hc:IconElement.Geometry="{StaticResource CloseGeometry}" BorderThickness="1,0,0,0" hc:IconElement.Width="10" hc:IconElement.Height="10"/>
|
||||||
|
</StackPanel>
|
||||||
|
<Grid Grid.Column="0">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Button Name="ButtonIcon" Visibility="{TemplateBinding Icon,Converter={StaticResource Object2VisibilityConverter}}" Command="{x:Static shell:SystemCommands.ShowSystemMenuCommand}" Background="Transparent" Margin="10,0,0,0" shell:WindowChrome.IsHitTestVisibleInChrome="True" Style="{StaticResource ButtonCustom}" VerticalAlignment="Center">
|
||||||
|
<interactivity:Interaction.Triggers>
|
||||||
|
<interactivity:EventTrigger EventName="MouseDoubleClick">
|
||||||
|
<interactivity:InvokeCommandAction Command="{x:Static shell:SystemCommands.CloseWindowCommand}" />
|
||||||
|
</interactivity:EventTrigger>
|
||||||
|
</interactivity:Interaction.Triggers>
|
||||||
|
<Image IsHitTestVisible="False" Source="{TemplateBinding Icon}" VerticalAlignment="Center" Width="16" Height="16"/>
|
||||||
|
</Button>
|
||||||
|
<TextBlock Grid.Column="1" Text="{TemplateBinding Title}" Padding="10,0,0,0" VerticalAlignment="Center">
|
||||||
|
<TextBlock.Visibility>
|
||||||
|
<MultiBinding Converter="{StaticResource BooleanArr2VisibilityConverter}">
|
||||||
|
<MultiBinding.Bindings>
|
||||||
|
<Binding Path="ShowTitle" RelativeSource="{RelativeSource TemplatedParent}"/>
|
||||||
|
<Binding Path="Title" RelativeSource="{RelativeSource TemplatedParent}" Converter="{StaticResource Object2BooleanConverter}"/>
|
||||||
|
</MultiBinding.Bindings>
|
||||||
|
</MultiBinding>
|
||||||
|
</TextBlock.Visibility>
|
||||||
|
</TextBlock>
|
||||||
|
<ContentPresenter shell:WindowChrome.IsHitTestVisibleInChrome="True" Grid.Column="2" x:Name="ContentPresenterMain" Content="{TemplateBinding NonClientAreaContent}"/>
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
<Grid Grid.Row="1">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Path Data="{TemplateBinding Image}" Fill="{TemplateBinding ImageBrush}" HorizontalAlignment="Center" Visibility="{TemplateBinding ShowImage,Converter={StaticResource Boolean2VisibilityConverter}}" Grid.Row="0" Grid.Column="0" VerticalAlignment="Top" Margin="20,32,0,0" Width="30" Height="30" Stretch="Uniform"/>
|
||||||
|
<ScrollViewer Grid.Column="1" Grid.Row="0">
|
||||||
|
<TextBlock Margin="10,39,10,10" Text="{TemplateBinding Message}" TextWrapping="Wrap" HorizontalAlignment="Left" VerticalAlignment="Top"/>
|
||||||
|
</ScrollViewer>
|
||||||
|
<StackPanel Name="PART_Panel" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1" Margin="0,10,0,16" Orientation="Horizontal" HorizontalAlignment="Center"/>
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsActive" Value="False">
|
||||||
|
<Setter Property="Opacity" Value=".8" TargetName="ContentPresenterMain"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True" SourceName="PART_ButtonClose">
|
||||||
|
<Setter Property="Background" TargetName="PART_ButtonClose" Value="{Binding CloseButtonHoverBackground,RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
|
<Setter Property="Foreground" TargetName="PART_ButtonClose" Value="{Binding CloseButtonHoverForeground,RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
</ResourceDictionary>
|
108
src/Net_35/HandyControl_Net_35/Themes/Styles/Pagination.xaml
Normal file
108
src/Net_35/HandyControl_Net_35/Themes/Styles/Pagination.xaml
Normal file
@ -0,0 +1,108 @@
|
|||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:hc="clr-namespace:HandyControl.Controls"
|
||||||
|
xmlns:interactivity="clr-namespace:HandyControl.Interactivity"
|
||||||
|
xmlns:system="clr-namespace:System;assembly=mscorlib"
|
||||||
|
xmlns:lang="clr-namespace:HandyControl.Properties.Langs"
|
||||||
|
xmlns:ex="clr-namespace:HandyControl.Tools.Extension"
|
||||||
|
xmlns:themes="clr-namespace:HandyControl.Themes">
|
||||||
|
|
||||||
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Basic/Geometries.xaml"/>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Styles/Button.xaml"/>
|
||||||
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
|
||||||
|
<Style x:Key="PaginationButtonStyle" BasedOn="{StaticResource BaseStyle}" TargetType="RadioButton">
|
||||||
|
<Setter Property="GroupName" Value="1"/>
|
||||||
|
<Setter Property="MinWidth" Value="30"/>
|
||||||
|
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
|
||||||
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||||
|
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||||
|
<Setter Property="hc:BorderElement.CornerRadius" Value="0"/>
|
||||||
|
<Setter Property="Height" Value="{StaticResource DefaultControlHeight}"/>
|
||||||
|
<Setter Property="Padding" Value="10,0"/>
|
||||||
|
<Setter Property="Margin" Value="-1,0,0,0"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="RadioButton">
|
||||||
|
<Border x:Name="BorderRoot" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
|
||||||
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}">
|
||||||
|
<Path x:Name="PathMain" Width="{TemplateBinding hc:IconElement.Width}" Height="{TemplateBinding hc:IconElement.Height}" Fill="{TemplateBinding Foreground}" SnapsToDevicePixels="True" Stretch="Uniform" Data="{TemplateBinding hc:IconElement.Geometry}"/>
|
||||||
|
<ContentPresenter x:Name="contentPresenter" RecognizesAccessKey="True" VerticalAlignment="Center" Margin="6,0,0,0" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
|
<Setter Property="TextElement.Foreground" Value="{DynamicResource PrimaryBrush}" TargetName="contentPresenter"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsChecked" Value="true">
|
||||||
|
<Setter Property="BorderBrush" Value="{Binding Path=(hc:VisualElement.HighlightBorderBrush),RelativeSource={RelativeSource TemplatedParent}}" TargetName="BorderRoot"/>
|
||||||
|
<Setter Property="Background" Value="{Binding Path=(hc:VisualElement.HighlightBackground),RelativeSource={RelativeSource TemplatedParent}}" TargetName="BorderRoot"/>
|
||||||
|
<Setter Property="TextElement.Foreground" Value="{Binding Path=(hc:VisualElement.HighlightForeground),RelativeSource={RelativeSource TemplatedParent}}" TargetName="contentPresenter"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="Content" Value="{x:Null}">
|
||||||
|
<Setter Property="Visibility" Value="Collapsed" TargetName="contentPresenter"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="hc:IconElement.Geometry" Value="{x:Null}">
|
||||||
|
<Setter Property="Visibility" Value="Collapsed" TargetName="PathMain"/>
|
||||||
|
<Setter Property="Margin" Value="0" TargetName="contentPresenter"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="IsChecked" Value="True">
|
||||||
|
<Setter Property="Panel.ZIndex" Value="{x:Static system:Int32.MaxValue}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsPressed" Value="True">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource BorderBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style TargetType="hc:Pagination">
|
||||||
|
<Setter Property="hc:VisualElement.HighlightBorderBrush" Value="{DynamicResource TitleBrush}"/>
|
||||||
|
<Setter Property="hc:VisualElement.HighlightBackground" Value="{DynamicResource TitleBrush}"/>
|
||||||
|
<Setter Property="hc:VisualElement.HighlightForeground" Value="{DynamicResource TextIconBrush}"/>
|
||||||
|
<Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}"/>
|
||||||
|
<Setter Property="Focusable" Value="False"/>
|
||||||
|
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="hc:Pagination">
|
||||||
|
<StackPanel Orientation="Horizontal" VerticalAlignment="Top">
|
||||||
|
<Button x:Name="PART_ButtonLeft" MinWidth="30" Padding="10,8" hc:IconElement.Geometry="{StaticResource LeftGeometry}" hc:BorderElement.CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource CornerRadiusSplitConverter},ConverterParameter='1,0,0,1'}" Command="interactivity:ControlCommands.Prev"/>
|
||||||
|
<StackPanel ZIndex="999" HorizontalAlignment="Center" Orientation="Horizontal">
|
||||||
|
<interactivity:Interaction.Triggers>
|
||||||
|
<interactivity:RoutedEventTrigger RoutedEvent="RadioButton.Checked">
|
||||||
|
<interactivity:EventToCommand Command="interactivity:ControlCommands.Selected" PassEventArgsToCommand="True" />
|
||||||
|
</interactivity:RoutedEventTrigger>
|
||||||
|
</interactivity:Interaction.Triggers>
|
||||||
|
<RadioButton Name="PART_ButtonFirst" Content="1" IsChecked="True" Style="{StaticResource PaginationButtonStyle}"/>
|
||||||
|
<Border Name="PART_MoreLeft" Cursor="No" Margin="-1,0,0,0" BorderThickness="1" BorderBrush="{TemplateBinding BorderBrush}" Background="{DynamicResource SecondaryRegionBrush}" Padding="10,0">
|
||||||
|
<hc:SimpleText FontWeight="Bold" Foreground="{DynamicResource SecondaryTextBrush}" Text="..." VerticalAlignment="Center"/>
|
||||||
|
</Border>
|
||||||
|
<StackPanel Name="PART_PanelMain" Orientation="Horizontal"/>
|
||||||
|
<Border Name="PART_MoreRight" Cursor="No" Margin="-1,0,0,0" BorderThickness="1" BorderBrush="{TemplateBinding BorderBrush}" Background="{DynamicResource SecondaryRegionBrush}" Padding="10,0">
|
||||||
|
<hc:SimpleText FontWeight="Bold" Foreground="{DynamicResource SecondaryTextBrush}" Text="..." VerticalAlignment="Center"/>
|
||||||
|
</Border>
|
||||||
|
<RadioButton Name="PART_ButtonLast" Content="10" Style="{StaticResource PaginationButtonStyle}"/>
|
||||||
|
</StackPanel>
|
||||||
|
<Button x:Name="PART_ButtonRight" MinWidth="30" Padding="10,8" hc:IconElement.Geometry="{StaticResource RightGeometry}" hc:BorderElement.CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource CornerRadiusSplitConverter},ConverterParameter='0,1,1,0'}" Margin="-1,0,0,0" Command="interactivity:ControlCommands.Next"/>
|
||||||
|
<hc:NumericUpDown x:Name="PART_Jump" IsEnabled="{TemplateBinding IsJumpEnabled}" Visibility="{TemplateBinding IsJumpEnabled,Converter={StaticResource Boolean2VisibilityConverter}}" Margin="6,0,0,0" Maximum="{Binding MaxPageCount,RelativeSource={RelativeSource TemplatedParent}}" Minimum="1"/>
|
||||||
|
<Button IsEnabled="{TemplateBinding IsJumpEnabled}" Visibility="{TemplateBinding IsJumpEnabled,Converter={StaticResource Boolean2VisibilityConverter}}" Content="{ex:Lang {x:Static lang:LangKeys.Jump}}" Margin="6,0,0,0" Command="interactivity:ControlCommands.Jump"/>
|
||||||
|
</StackPanel>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
</ResourceDictionary>
|
@ -0,0 +1,74 @@
|
|||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:hc="clr-namespace:HandyControl.Controls"
|
||||||
|
xmlns:interactivity="clr-namespace:HandyControl.Interactivity"
|
||||||
|
xmlns:langs="clr-namespace:HandyControl.Properties.Langs"
|
||||||
|
xmlns:ex="clr-namespace:HandyControl.Tools.Extension"
|
||||||
|
xmlns:themes="clr-namespace:HandyControl.Themes">
|
||||||
|
|
||||||
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Styles/Button.xaml"/>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Basic/Converters.xaml"/>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Basic/Paths.xaml"/>
|
||||||
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
|
||||||
|
<Style TargetType="hc:PopupWindow">
|
||||||
|
<Setter Property="WindowStyle" Value="None"/>
|
||||||
|
<Setter Property="MinHeight" Value="220"/>
|
||||||
|
<Setter Property="BorderThickness" Value="20"/>
|
||||||
|
<Setter Property="ShowInTaskbar" Value="False"/>
|
||||||
|
<Setter Property="MinWidth" Value="300"/>
|
||||||
|
<Setter Property="ResizeMode" Value="NoResize"/>
|
||||||
|
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
|
||||||
|
<Setter Property="SizeToContent" Value="WidthAndHeight"/>
|
||||||
|
<Setter Property="Effect">
|
||||||
|
<Setter.Value>
|
||||||
|
<DropShadowEffect Opacity=".6" ShadowDepth="0" BlurRadius="15"/>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="hc:PopupWindow">
|
||||||
|
<Border Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}">
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid Name="TitleGrid" Height="30" Background="{DynamicResource TitleBrush}">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<TextBlock Name="PART_TitleBlock" Background="Transparent" Padding="{StaticResource DefaultControlPadding}" Foreground="White" Text="{TemplateBinding Title}" VerticalAlignment="Center" TextWrapping="Wrap" TextTrimming="WordEllipsis"/>
|
||||||
|
<Button Margin="0,0,1,0" Background="Transparent" Name="CloseButton" Foreground="White" Grid.Column="1" hc:BackgroundSwitchElement.MouseHoverBackground="Red" hc:BackgroundSwitchElement.MouseDownBackground="Red" Command="interactivity:ControlCommands.Close" IsCancel="True" Height="28" Style="{StaticResource ButtonCustom}" Width="44" Padding="9">
|
||||||
|
<Path Fill="{Binding ElementName=CloseButton,Path=Foreground}" Style="{StaticResource ClosePathStyle}"/>
|
||||||
|
</Button>
|
||||||
|
</Grid>
|
||||||
|
<Border BorderBrush="{DynamicResource TitleBrush}" Name="PART_MainBorder" Grid.Row="1">
|
||||||
|
<StackPanel>
|
||||||
|
<TextBlock Text="{TemplateBinding ContentStr}" MinHeight="110" Name="MyTextBlock" TextAlignment="Center" Padding="32" Foreground="{DynamicResource PrimaryTextBrush}" MaxWidth="300" TextWrapping="Wrap" TextTrimming="CharacterEllipsis" Background="{TemplateBinding Background}"/>
|
||||||
|
<StackPanel Margin="0,0,0,32" Orientation="Horizontal" Background="{DynamicResource RegionBrush}" HorizontalAlignment="Center">
|
||||||
|
<Button IsCancel="True" MinWidth="80" Command="interactivity:ControlCommands.Cancel" Content="{ex:Lang Key={x:Static langs:LangKeys.Cancel}}" Visibility="{TemplateBinding ShowCancel,Converter={StaticResource Boolean2VisibilityConverter}}" Margin="0,0,16,0"/>
|
||||||
|
<Button IsDefault="True" MinWidth="80" Command="interactivity:ControlCommands.Confirm" Content="{ex:Lang Key={x:Static langs:LangKeys.Confirm}}" Style="{StaticResource ButtonPrimary}"/>
|
||||||
|
</StackPanel>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="ShowBorder" Value="True">
|
||||||
|
<Setter Property="BorderThickness" Value="1,0,1,1" TargetName="PART_MainBorder"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="ShowTitle" Value="False">
|
||||||
|
<Setter Property="Visibility" Value="Collapsed" TargetName="TitleGrid"/>
|
||||||
|
<Setter Property="Background" Value="Transparent"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
</ResourceDictionary>
|
277
src/Net_35/HandyControl_Net_35/Themes/Styles/ProgressBar.xaml
Normal file
277
src/Net_35/HandyControl_Net_35/Themes/Styles/ProgressBar.xaml
Normal file
@ -0,0 +1,277 @@
|
|||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:hc="clr-namespace:HandyControl.Controls"
|
||||||
|
xmlns:system="clr-namespace:System;assembly=mscorlib"
|
||||||
|
xmlns:themes="clr-namespace:HandyControl.Themes">
|
||||||
|
|
||||||
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Styles/Base/ProgressBarBaseStyle.xaml"/>
|
||||||
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
|
||||||
|
<Style BasedOn="{StaticResource ProgressBarBaseStyle}" TargetType="ProgressBar">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryBrush}"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ProgressBarSuccess" BasedOn="{StaticResource ProgressBarBaseStyle}" TargetType="ProgressBar">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource SuccessBrush}"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ProgressBarInfo" BasedOn="{StaticResource ProgressBarBaseStyle}" TargetType="ProgressBar">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource InfoBrush}"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ProgressBarWarning" BasedOn="{StaticResource ProgressBarBaseStyle}" TargetType="ProgressBar">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource WarningBrush}"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ProgressBarDanger" BasedOn="{StaticResource ProgressBarBaseStyle}" TargetType="ProgressBar">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource DangerBrush}"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ProgressBarPrimaryStripe" BasedOn="{StaticResource ProgressBarStripeBaseStyle}" TargetType="ProgressBar">
|
||||||
|
<Setter Property="Foreground">
|
||||||
|
<Setter.Value>
|
||||||
|
<DrawingBrush Viewport="0,0,20,32" TileMode="Tile" ViewportUnits="Absolute" Stretch="None">
|
||||||
|
<DrawingBrush.Transform>
|
||||||
|
<TransformGroup>
|
||||||
|
<RotateTransform Angle="20"/>
|
||||||
|
<TranslateTransform x:Name="MyTransform" X="0"/>
|
||||||
|
</TransformGroup>
|
||||||
|
</DrawingBrush.Transform>
|
||||||
|
<DrawingBrush.Drawing>
|
||||||
|
<GeometryDrawing>
|
||||||
|
<GeometryDrawing.Brush>
|
||||||
|
<LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
|
||||||
|
<GradientStop Color="{DynamicResource DarkPrimaryColor}" Offset="0"/>
|
||||||
|
<GradientStop Color="{DynamicResource DarkPrimaryColor}" Offset="0.5"/>
|
||||||
|
<GradientStop Color="{DynamicResource BackgroundColor}" Offset="0.5"/>
|
||||||
|
<GradientStop Color="{DynamicResource BackgroundColor}" Offset="1"/>
|
||||||
|
</LinearGradientBrush>
|
||||||
|
</GeometryDrawing.Brush>
|
||||||
|
<GeometryDrawing.Geometry>
|
||||||
|
<RectangleGeometry Rect="0,0,20,32"/>
|
||||||
|
</GeometryDrawing.Geometry>
|
||||||
|
</GeometryDrawing>
|
||||||
|
</DrawingBrush.Drawing>
|
||||||
|
</DrawingBrush>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ProgressBarSuccessStripe" BasedOn="{StaticResource ProgressBarStripeBaseStyle}" TargetType="ProgressBar">
|
||||||
|
<Setter Property="Foreground">
|
||||||
|
<Setter.Value>
|
||||||
|
<DrawingBrush Viewport="0,0,20,32" TileMode="Tile" ViewportUnits="Absolute" Stretch="None">
|
||||||
|
<DrawingBrush.Transform>
|
||||||
|
<TransformGroup>
|
||||||
|
<RotateTransform Angle="20"/>
|
||||||
|
<TranslateTransform x:Name="MyTransform" X="0"/>
|
||||||
|
</TransformGroup>
|
||||||
|
</DrawingBrush.Transform>
|
||||||
|
<DrawingBrush.Drawing>
|
||||||
|
<GeometryDrawing>
|
||||||
|
<GeometryDrawing.Brush>
|
||||||
|
<LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
|
||||||
|
<GradientStop Color="{DynamicResource DarkSuccessColor}" Offset="0"/>
|
||||||
|
<GradientStop Color="{DynamicResource DarkSuccessColor}" Offset="0.5"/>
|
||||||
|
<GradientStop Color="{DynamicResource BackgroundColor}" Offset="0.5"/>
|
||||||
|
<GradientStop Color="{DynamicResource BackgroundColor}" Offset="1"/>
|
||||||
|
</LinearGradientBrush>
|
||||||
|
</GeometryDrawing.Brush>
|
||||||
|
<GeometryDrawing.Geometry>
|
||||||
|
<RectangleGeometry Rect="0,0,20,32"/>
|
||||||
|
</GeometryDrawing.Geometry>
|
||||||
|
</GeometryDrawing>
|
||||||
|
</DrawingBrush.Drawing>
|
||||||
|
</DrawingBrush>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ProgressBarInfoStripe" BasedOn="{StaticResource ProgressBarStripeBaseStyle}" TargetType="ProgressBar">
|
||||||
|
<Setter Property="Foreground">
|
||||||
|
<Setter.Value>
|
||||||
|
<DrawingBrush Viewport="0,0,20,32" TileMode="Tile" ViewportUnits="Absolute" Stretch="None">
|
||||||
|
<DrawingBrush.Transform>
|
||||||
|
<TransformGroup>
|
||||||
|
<RotateTransform Angle="20"/>
|
||||||
|
<TranslateTransform x:Name="MyTransform" X="0"/>
|
||||||
|
</TransformGroup>
|
||||||
|
</DrawingBrush.Transform>
|
||||||
|
<DrawingBrush.Drawing>
|
||||||
|
<GeometryDrawing>
|
||||||
|
<GeometryDrawing.Brush>
|
||||||
|
<LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
|
||||||
|
<GradientStop Color="{DynamicResource DarkInfoColor}" Offset="0"/>
|
||||||
|
<GradientStop Color="{DynamicResource DarkInfoColor}" Offset="0.5"/>
|
||||||
|
<GradientStop Color="{DynamicResource BackgroundColor}" Offset="0.5"/>
|
||||||
|
<GradientStop Color="{DynamicResource BackgroundColor}" Offset="1"/>
|
||||||
|
</LinearGradientBrush>
|
||||||
|
</GeometryDrawing.Brush>
|
||||||
|
<GeometryDrawing.Geometry>
|
||||||
|
<RectangleGeometry Rect="0,0,20,32"/>
|
||||||
|
</GeometryDrawing.Geometry>
|
||||||
|
</GeometryDrawing>
|
||||||
|
</DrawingBrush.Drawing>
|
||||||
|
</DrawingBrush>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ProgressBarWarningStripe" BasedOn="{StaticResource ProgressBarStripeBaseStyle}" TargetType="ProgressBar">
|
||||||
|
<Setter Property="Foreground">
|
||||||
|
<Setter.Value>
|
||||||
|
<DrawingBrush Viewport="0,0,20,32" TileMode="Tile" ViewportUnits="Absolute" Stretch="None">
|
||||||
|
<DrawingBrush.Transform>
|
||||||
|
<TransformGroup>
|
||||||
|
<RotateTransform Angle="20"/>
|
||||||
|
<TranslateTransform x:Name="MyTransform" X="0"/>
|
||||||
|
</TransformGroup>
|
||||||
|
</DrawingBrush.Transform>
|
||||||
|
<DrawingBrush.Drawing>
|
||||||
|
<GeometryDrawing>
|
||||||
|
<GeometryDrawing.Brush>
|
||||||
|
<LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
|
||||||
|
<GradientStop Color="{DynamicResource DarkWarningColor}" Offset="0"/>
|
||||||
|
<GradientStop Color="{DynamicResource DarkWarningColor}" Offset="0.5"/>
|
||||||
|
<GradientStop Color="{DynamicResource BackgroundColor}" Offset="0.5"/>
|
||||||
|
<GradientStop Color="{DynamicResource BackgroundColor}" Offset="1"/>
|
||||||
|
</LinearGradientBrush>
|
||||||
|
</GeometryDrawing.Brush>
|
||||||
|
<GeometryDrawing.Geometry>
|
||||||
|
<RectangleGeometry Rect="0,0,20,32"/>
|
||||||
|
</GeometryDrawing.Geometry>
|
||||||
|
</GeometryDrawing>
|
||||||
|
</DrawingBrush.Drawing>
|
||||||
|
</DrawingBrush>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ProgressBarDangerStripe" BasedOn="{StaticResource ProgressBarStripeBaseStyle}" TargetType="ProgressBar">
|
||||||
|
<Setter Property="Foreground">
|
||||||
|
<Setter.Value>
|
||||||
|
<DrawingBrush Viewport="0,0,20,32" TileMode="Tile" ViewportUnits="Absolute" Stretch="None">
|
||||||
|
<DrawingBrush.Transform>
|
||||||
|
<TransformGroup>
|
||||||
|
<RotateTransform Angle="20"/>
|
||||||
|
<TranslateTransform x:Name="MyTransform" X="0"/>
|
||||||
|
</TransformGroup>
|
||||||
|
</DrawingBrush.Transform>
|
||||||
|
<DrawingBrush.Drawing>
|
||||||
|
<GeometryDrawing>
|
||||||
|
<GeometryDrawing.Brush>
|
||||||
|
<LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
|
||||||
|
<GradientStop Color="{DynamicResource DarkDangerColor}" Offset="0"/>
|
||||||
|
<GradientStop Color="{DynamicResource DarkDangerColor}" Offset="0.5"/>
|
||||||
|
<GradientStop Color="{DynamicResource BackgroundColor}" Offset="0.5"/>
|
||||||
|
<GradientStop Color="{DynamicResource BackgroundColor}" Offset="1"/>
|
||||||
|
</LinearGradientBrush>
|
||||||
|
</GeometryDrawing.Brush>
|
||||||
|
<GeometryDrawing.Geometry>
|
||||||
|
<RectangleGeometry Rect="0,0,20,32"/>
|
||||||
|
</GeometryDrawing.Geometry>
|
||||||
|
</GeometryDrawing>
|
||||||
|
</DrawingBrush.Drawing>
|
||||||
|
</DrawingBrush>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style BasedOn="{StaticResource ProgressBarCircleBaseStyle}" TargetType="hc:CircleProgressBar">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryBrush}"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ProgressBarSuccessCircle" BasedOn="{StaticResource ProgressBarCircleBaseStyle}" TargetType="hc:CircleProgressBar">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource SuccessBrush}"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ProgressBarInfoCircle" BasedOn="{StaticResource ProgressBarCircleBaseStyle}" TargetType="hc:CircleProgressBar">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource InfoBrush}"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ProgressBarWarningCircle" BasedOn="{StaticResource ProgressBarCircleBaseStyle}" TargetType="hc:CircleProgressBar">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource WarningBrush}"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ProgressBarDangerCircle" BasedOn="{StaticResource ProgressBarCircleBaseStyle}" TargetType="hc:CircleProgressBar">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource DangerBrush}"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style BasedOn="{StaticResource ProgressBarWaveBaseStyle}" TargetType="hc:WaveProgressBar">
|
||||||
|
<Setter Property="WaveFill" Value="{DynamicResource DarkPrimaryBrush}"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ProgressBarSuccessWave" BasedOn="{StaticResource ProgressBarWaveBaseStyle}" TargetType="hc:WaveProgressBar">
|
||||||
|
<Setter Property="WaveFill" Value="{DynamicResource DarkSuccessBrush}"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ProgressBarInfoWave" BasedOn="{StaticResource ProgressBarWaveBaseStyle}" TargetType="hc:WaveProgressBar">
|
||||||
|
<Setter Property="WaveFill" Value="{DynamicResource DarkInfoBrush}"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ProgressBarWarningWave" BasedOn="{StaticResource ProgressBarWaveBaseStyle}" TargetType="hc:WaveProgressBar">
|
||||||
|
<Setter Property="WaveFill" Value="{DynamicResource DarkWarningBrush}"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ProgressBarDangerWave" BasedOn="{StaticResource ProgressBarWaveBaseStyle}" TargetType="hc:WaveProgressBar">
|
||||||
|
<Setter Property="WaveFill" Value="{DynamicResource DarkDangerBrush}"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ProgressBarFlat" TargetType="ProgressBar">
|
||||||
|
<Setter Property="Height" Value="4"/>
|
||||||
|
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}"/>
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryBrush}"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="ProgressBar">
|
||||||
|
<ControlTemplate.Resources>
|
||||||
|
<Storyboard x:Key="IsIndeterminate" RepeatBehavior="Forever">
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="Animation">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0" Value="0.25"/>
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0:0:1" Value="0.25"/>
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0:0:2" Value="0.25"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
<PointAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransformOrigin)" Storyboard.TargetName="Animation">
|
||||||
|
<SplinePointKeyFrame KeyTime="0" Value="-0.5,0.5"/>
|
||||||
|
<SplinePointKeyFrame KeyTime="0:0:1" Value="0.5,0.5"/>
|
||||||
|
<SplinePointKeyFrame KeyTime="0:0:2" Value="1.5,0.5"/>
|
||||||
|
</PointAnimationUsingKeyFrames>
|
||||||
|
</Storyboard>
|
||||||
|
</ControlTemplate.Resources>
|
||||||
|
<hc:SimplePanel x:Name="TemplateRoot" SnapsToDevicePixels="true" ClipToBounds="True">
|
||||||
|
<Rectangle x:Name="PART_Track" Fill="{TemplateBinding Background}" StrokeThickness="0" Stroke="{TemplateBinding BorderBrush}"/>
|
||||||
|
<Decorator x:Name="PART_Indicator" HorizontalAlignment="Left">
|
||||||
|
<Rectangle x:Name="Indicator" Fill="{TemplateBinding Foreground}"/>
|
||||||
|
</Decorator>
|
||||||
|
<Rectangle x:Name="Animation" Visibility="Collapsed" Fill="{TemplateBinding Foreground}" RenderTransformOrigin="0.5,0.5">
|
||||||
|
<Rectangle.RenderTransform>
|
||||||
|
<TransformGroup>
|
||||||
|
<ScaleTransform/>
|
||||||
|
</TransformGroup>
|
||||||
|
</Rectangle.RenderTransform>
|
||||||
|
</Rectangle>
|
||||||
|
</hc:SimplePanel>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsIndeterminate" Value="true">
|
||||||
|
<Trigger.EnterActions>
|
||||||
|
<BeginStoryboard Storyboard="{StaticResource IsIndeterminate}"/>
|
||||||
|
</Trigger.EnterActions>
|
||||||
|
<Setter Property="Visibility" TargetName="Indicator" Value="Collapsed"/>
|
||||||
|
<Setter Property="Visibility" TargetName="Animation" Value="Visible"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="Orientation" Value="Vertical">
|
||||||
|
<Setter Property="Height" Value="{x:Static system:Double.NaN}"/>
|
||||||
|
<Setter Property="LayoutTransform" TargetName="TemplateRoot">
|
||||||
|
<Setter.Value>
|
||||||
|
<RotateTransform Angle="-90"/>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
</ResourceDictionary>
|
@ -0,0 +1,52 @@
|
|||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:hc="clr-namespace:HandyControl.Controls"
|
||||||
|
xmlns:themes="clr-namespace:HandyControl.Themes">
|
||||||
|
|
||||||
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Basic/Sizes.xaml"/>
|
||||||
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
|
||||||
|
<Style x:Key="TextBoxBaseBaseStyle" TargetType="TextBoxBase">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
|
||||||
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
|
<Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}"/>
|
||||||
|
<Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>
|
||||||
|
<Setter Property="HorizontalContentAlignment" Value="Left"/>
|
||||||
|
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
|
||||||
|
<Setter Property="AllowDrop" Value="true"/>
|
||||||
|
<Setter Property="Padding" Value="2,7"/>
|
||||||
|
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Hidden"/>
|
||||||
|
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Hidden"/>
|
||||||
|
<Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="TextBoxBase">
|
||||||
|
<Border x:Name="border" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
|
||||||
|
<ScrollViewer x:Name="PART_ContentHost" Padding="{TemplateBinding Padding}" Focusable="false" HorizontalScrollBarVisibility="{Binding Path=(ScrollViewer.HorizontalScrollBarVisibility),RelativeSource={RelativeSource TemplatedParent}}" VerticalScrollBarVisibility="{Binding Path=(ScrollViewer.VerticalScrollBarVisibility),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
|
</Border>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsEnabled" Value="false">
|
||||||
|
<Setter Property="Opacity" TargetName="border" Value="0.4"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsMouseOver" Value="true">
|
||||||
|
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource SecondaryBorderBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsFocused" Value="true">
|
||||||
|
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource PrimaryBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="RichTextBoxBaseStyle" BasedOn="{StaticResource TextBoxBaseBaseStyle}" TargetType="RichTextBox">
|
||||||
|
<Setter Property="MinWidth" Value="10"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style BasedOn="{StaticResource RichTextBoxBaseStyle}" TargetType="RichTextBox"/>
|
||||||
|
|
||||||
|
</ResourceDictionary>
|
142
src/Net_35/HandyControl_Net_35/Themes/Styles/Screenshot.xaml
Normal file
142
src/Net_35/HandyControl_Net_35/Themes/Styles/Screenshot.xaml
Normal file
@ -0,0 +1,142 @@
|
|||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:hc="clr-namespace:HandyControl.Controls">
|
||||||
|
|
||||||
|
<Style x:Key="MaskRect4ScreenshotStyle" TargetType="Rectangle">
|
||||||
|
<Setter Property="IsHitTestVisible" Value="False"/>
|
||||||
|
<Setter Property="Fill" Value="{DynamicResource DarkOpacityBrush}"/>
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||||
|
<Setter Property="VerticalAlignment" Value="Top"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="SnapRect4ScreenshotStyle" TargetType="Rectangle">
|
||||||
|
<Setter Property="Height" Value="5"/>
|
||||||
|
<Setter Property="Width" Value="5"/>
|
||||||
|
<Setter Property="Fill" Value="DodgerBlue"/>
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||||
|
<Setter Property="VerticalAlignment" Value="Top"/>
|
||||||
|
<Setter Property="Visibility" Value="Collapsed"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="hc:TipElement.Placement" Value="LeftTop">
|
||||||
|
<Setter Property="Margin" Value="-3, -3, 0, 0"/>
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||||
|
<Setter Property="VerticalAlignment" Value="Top"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="hc:TipElement.Placement" Value="Top">
|
||||||
|
<Setter Property="Margin" Value="0, -3, 0, 0"/>
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||||
|
<Setter Property="VerticalAlignment" Value="Top"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="hc:TipElement.Placement" Value="RightTop">
|
||||||
|
<Setter Property="Margin" Value="0, -3, -3, 0"/>
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Right"/>
|
||||||
|
<Setter Property="VerticalAlignment" Value="Top"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="hc:TipElement.Placement" Value="Right">
|
||||||
|
<Setter Property="Margin" Value="0, 0, -3, 0"/>
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Right"/>
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="hc:TipElement.Placement" Value="RightBottom">
|
||||||
|
<Setter Property="Margin" Value="0, 0, -3, -3"/>
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Right"/>
|
||||||
|
<Setter Property="VerticalAlignment" Value="Bottom"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="hc:TipElement.Placement" Value="Bottom">
|
||||||
|
<Setter Property="Margin" Value="0, 0, 0, -3"/>
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||||
|
<Setter Property="VerticalAlignment" Value="Bottom"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="hc:TipElement.Placement" Value="LeftBottom">
|
||||||
|
<Setter Property="Margin" Value="-3, 0, 0, -3"/>
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||||
|
<Setter Property="VerticalAlignment" Value="Bottom"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="hc:TipElement.Placement" Value="Left">
|
||||||
|
<Setter Property="Margin" Value="-3, 0, 0, 0"/>
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
|
</Trigger>
|
||||||
|
<DataTrigger Binding="{Binding IsSelecting}" Value="True">
|
||||||
|
<Setter Property="Visibility" Value="Visible"/>
|
||||||
|
</DataTrigger>
|
||||||
|
<DataTrigger Binding="{Binding IsDrawing}" Value="True">
|
||||||
|
<Setter Property="Visibility" Value="Visible"/>
|
||||||
|
</DataTrigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="TargetArea4ScreenshotStyle" TargetType="Border">
|
||||||
|
<Setter Property="IsHitTestVisible" Value="False"/>
|
||||||
|
<Setter Property="BorderThickness" Value="5"/>
|
||||||
|
<Setter Property="BorderBrush" Value="DodgerBlue"/>
|
||||||
|
<Setter Property="Background" Value="Transparent"/>
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||||
|
<Setter Property="VerticalAlignment" Value="Top"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<DataTrigger Binding="{Binding IsSelecting}" Value="True">
|
||||||
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
|
</DataTrigger>
|
||||||
|
<DataTrigger Binding="{Binding IsDrawing}" Value="True">
|
||||||
|
<Setter Property="IsHitTestVisible" Value="True"/>
|
||||||
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
|
</DataTrigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="Window4ScreenshotStyle" TargetType="hc:ScreenshotWindow">
|
||||||
|
<Setter Property="WindowStyle" Value="None"/>
|
||||||
|
<Setter Property="WindowState" Value="Maximized"/>
|
||||||
|
<Setter Property="Topmost" Value="True"/>
|
||||||
|
<Setter Property="ResizeMode" Value="NoResize"/>
|
||||||
|
<Setter Property="Background" Value="Transparent"/>
|
||||||
|
<Setter Property="hc:WindowAttach.IgnoreAltF4" Value="True"/>
|
||||||
|
<Setter Property="hc:WindowAttach.ShowInTaskManager" Value="False"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="hc:ScreenshotWindow">
|
||||||
|
<AdornerDecorator>
|
||||||
|
<hc:SimplePanel>
|
||||||
|
<InkCanvas EditingMode="None" Name="PART_Canvas" Background="Transparent"/>
|
||||||
|
<Rectangle Name="PART_MaskAreaLeft" Style="{StaticResource MaskRect4ScreenshotStyle}"/>
|
||||||
|
<Rectangle Name="PART_MaskAreaTop" Style="{StaticResource MaskRect4ScreenshotStyle}"/>
|
||||||
|
<Rectangle Name="PART_MaskAreaRight" Style="{StaticResource MaskRect4ScreenshotStyle}"/>
|
||||||
|
<Rectangle Name="PART_MaskAreaBottom" Style="{StaticResource MaskRect4ScreenshotStyle}"/>
|
||||||
|
<Border Name="PART_TargetArea" Style="{StaticResource TargetArea4ScreenshotStyle}">
|
||||||
|
<hc:SimplePanel>
|
||||||
|
<Rectangle hc:TipElement.Placement="LeftTop" Style="{StaticResource SnapRect4ScreenshotStyle}"/>
|
||||||
|
<Rectangle hc:TipElement.Placement="Top" Style="{StaticResource SnapRect4ScreenshotStyle}"/>
|
||||||
|
<Rectangle hc:TipElement.Placement="RightTop" Style="{StaticResource SnapRect4ScreenshotStyle}"/>
|
||||||
|
<Rectangle hc:TipElement.Placement="Right" Style="{StaticResource SnapRect4ScreenshotStyle}"/>
|
||||||
|
<Rectangle hc:TipElement.Placement="RightBottom" Style="{StaticResource SnapRect4ScreenshotStyle}"/>
|
||||||
|
<Rectangle hc:TipElement.Placement="Bottom" Style="{StaticResource SnapRect4ScreenshotStyle}"/>
|
||||||
|
<Rectangle hc:TipElement.Placement="LeftBottom" Style="{StaticResource SnapRect4ScreenshotStyle}"/>
|
||||||
|
<Rectangle hc:TipElement.Placement="Left" Style="{StaticResource SnapRect4ScreenshotStyle}"/>
|
||||||
|
<TextBlock Text="{TemplateBinding SizeStr}" Background="#CC212121" Foreground="White" HorizontalAlignment="Left" VerticalAlignment="Top" Padding="8,2"/>
|
||||||
|
</hc:SimplePanel>
|
||||||
|
</Border>
|
||||||
|
<Border x:Name="PART_Magnifier" IsHitTestVisible="False" Visibility="Collapsed" HorizontalAlignment="Left" VerticalAlignment="Top" Width="122" Height="122" BorderThickness="1" BorderBrush="#FF333333" CornerRadius="1">
|
||||||
|
<Border.Effect>
|
||||||
|
<DropShadowEffect BlurRadius="2" Opacity=".2" Direction="-45" RenderingBias="Performance" ShadowDepth="3"/>
|
||||||
|
</Border.Effect>
|
||||||
|
<hc:SimplePanel>
|
||||||
|
<Border Margin="0,0,0,32" Background="{TemplateBinding PreviewBrush}" BorderThickness="2" BorderBrush="White">
|
||||||
|
<hc:SimplePanel>
|
||||||
|
<Path Data="M56,0 L60,0 60,40 116,40 116,44 60,44 60,84 56,84 56,44 0,44 0,40 56,40 z" Fill="#CC4CC6FF"/>
|
||||||
|
</hc:SimplePanel>
|
||||||
|
</Border>
|
||||||
|
<Border Height="32" VerticalAlignment="Bottom" Background="#CC000000">
|
||||||
|
<StackPanel VerticalAlignment="Center" Margin="5,0,0,0">
|
||||||
|
<TextBlock Foreground="White" Text="{TemplateBinding SizeStr}"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
</hc:SimplePanel>
|
||||||
|
</Border>
|
||||||
|
</hc:SimplePanel>
|
||||||
|
</AdornerDecorator>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
</ResourceDictionary>
|
328
src/Net_35/HandyControl_Net_35/Themes/Styles/TabControl.xaml
Normal file
328
src/Net_35/HandyControl_Net_35/Themes/Styles/TabControl.xaml
Normal file
@ -0,0 +1,328 @@
|
|||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:hc="clr-namespace:HandyControl.Controls"
|
||||||
|
xmlns:langs="clr-namespace:HandyControl.Properties.Langs"
|
||||||
|
xmlns:interactivity="clr-namespace:HandyControl.Interactivity"
|
||||||
|
xmlns:tools="clr-namespace:HandyControl.Tools"
|
||||||
|
xmlns:themes="clr-namespace:HandyControl.Themes">
|
||||||
|
|
||||||
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Basic/Paths.xaml"/>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Basic/Converters.xaml"/>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Styles/Button.xaml"/>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Styles/RepeatButton.xaml"/>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Styles/ToggleButton.xaml"/>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Styles/Base/TabControlBaseStyle.xaml"/>
|
||||||
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
|
||||||
|
<ContextMenu x:Key="TabItemMenu" x:Shared="False">
|
||||||
|
<MenuItem Command="interactivity:ControlCommands.Close" Header="{x:Static langs:Lang.Close}"/>
|
||||||
|
<MenuItem Command="interactivity:ControlCommands.CloseAll" Header="{x:Static langs:Lang.CloseAll}"/>
|
||||||
|
<MenuItem Command="interactivity:ControlCommands.CloseOther" Header="{x:Static langs:Lang.CloseOther}"/>
|
||||||
|
</ContextMenu>
|
||||||
|
|
||||||
|
<Style TargetType="hc:TabItem">
|
||||||
|
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
|
||||||
|
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}"/>
|
||||||
|
<Setter Property="BorderThickness" Value="1,0,1,1"/>
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
|
||||||
|
<Setter Property="Margin" Value="0"/>
|
||||||
|
<Setter Property="Padding" Value="10,0,0,0"/>
|
||||||
|
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
||||||
|
<Setter Property="VerticalContentAlignment" Value="Stretch"/>
|
||||||
|
<Setter Property="Menu" Value="{StaticResource TabItemMenu}"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="hc:TabItem">
|
||||||
|
<Grid x:Name="templateRoot" SnapsToDevicePixels="true" ContextMenu="{TemplateBinding Menu}">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Border Grid.ColumnSpan="3" BorderThickness="{TemplateBinding BorderThickness}" x:Name="mainBorder" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" Margin="0">
|
||||||
|
<Border Margin="0,0,0,-1" x:Name="innerBorder" Background="{DynamicResource RegionBrush}" Visibility="Collapsed"/>
|
||||||
|
</Border>
|
||||||
|
<Path x:Name="PathMain" Margin="10,0,0,0" Grid.Column="0" Width="{TemplateBinding hc:IconElement.Width}" Height="{TemplateBinding hc:IconElement.Height}" Fill="{TemplateBinding Foreground}" SnapsToDevicePixels="True" Stretch="Uniform" Data="{TemplateBinding hc:IconElement.Geometry}"/>
|
||||||
|
<ContentPresenter Grid.Column="1" x:Name="contentPresenter" ContentSource="Header" Focusable="False" HorizontalAlignment="Stretch" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="Center"/>
|
||||||
|
<Border Name="BorderMask" Grid.Column="1" HorizontalAlignment="Right" Width="20" Background="{TemplateBinding Background}" Margin="0,0,1,1">
|
||||||
|
<Border.OpacityMask>
|
||||||
|
<LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
|
||||||
|
<GradientStop Color="White" Offset="1"/>
|
||||||
|
<GradientStop Offset="0"/>
|
||||||
|
</LinearGradientBrush>
|
||||||
|
</Border.OpacityMask>
|
||||||
|
</Border>
|
||||||
|
<Button Grid.Column="2" Focusable="False" Command="interactivity:ControlCommands.Close" Visibility="{TemplateBinding ShowCloseButton,Converter={StaticResource Boolean2VisibilityConverter}}" Background="Transparent" Style="{StaticResource ButtonCustom}" Width="28">
|
||||||
|
<Path Fill="{DynamicResource PrimaryTextBrush}" Width="8" Height="8" Style="{StaticResource ClosePathStyle}"/>
|
||||||
|
</Button>
|
||||||
|
</Grid>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsSelected" Value="true">
|
||||||
|
<Setter Property="Panel.ZIndex" Value="1"/>
|
||||||
|
<Setter Property="Visibility" TargetName="innerBorder" Value="Visible"/>
|
||||||
|
<Setter Property="Background" TargetName="BorderMask" Value="{DynamicResource RegionBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="hc:IconElement.Geometry" Value="{x:Null}">
|
||||||
|
<Setter Property="Visibility" Value="Collapsed" TargetName="PathMain"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="ShowCloseButton" Value="True">
|
||||||
|
<Setter Property="Margin" Value="0,0,0,1" TargetName="BorderMask"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="TabControlPlusTemplate" TargetType="hc:TabControl">
|
||||||
|
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
||||||
|
<Grid x:Name="templateRoot" ClipToBounds="true" SnapsToDevicePixels="true" KeyboardNavigation.TabNavigation="Local">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition x:Name="ColumnDefinition0"/>
|
||||||
|
<ColumnDefinition x:Name="ColumnDefinition1" Width="0"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Border Background="{TemplateBinding Background}" BorderThickness="0,0,0,1" BorderBrush="{DynamicResource BorderBrush}">
|
||||||
|
<hc:TabPanel MinHeight="{TemplateBinding TabItemHeight}" TabItemHeight="{TemplateBinding TabItemHeight}" TabItemWidth="{TemplateBinding TabItemWidth}" IsTabFillEnabled="{TemplateBinding IsTabFillEnabled}" Margin="0,0,-1,-1" x:Name="PART_HeaderPanel" HorizontalAlignment="Left" Background="{DynamicResource SecondaryTextBrush}" IsItemsHost="true" KeyboardNavigation.TabIndex="1" Panel.ZIndex="1">
|
||||||
|
<interactivity:Interaction.Behaviors>
|
||||||
|
<interactivity:FluidMoveBehavior AppliesTo="Children" Duration="{Binding FluidMoveDuration,ElementName=PART_HeaderPanel}"/>
|
||||||
|
</interactivity:Interaction.Behaviors>
|
||||||
|
</hc:TabPanel>
|
||||||
|
</Border>
|
||||||
|
<Border x:Name="contentPanel" Background="{DynamicResource SecondaryRegionBrush}" Grid.Column="0" KeyboardNavigation.DirectionalNavigation="Contained" Grid.Row="1" KeyboardNavigation.TabIndex="2" KeyboardNavigation.TabNavigation="Local">
|
||||||
|
<ContentPresenter x:Name="PART_SelectedContentHost" ContentSource="SelectedContent" Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||||
|
</Border>
|
||||||
|
<Border Visibility="{Binding Visibility,ElementName=PART_OverflowButton}" Margin="0,-1,0,0" Grid.Row="0" Grid.Column="0" BorderThickness="1,0,0,1" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}" HorizontalAlignment="Right">
|
||||||
|
<hc:ContextMenuToggleButton x:Name="PART_OverflowButton" Visibility="Collapsed" Style="{StaticResource ToggleButtonIconTransparent}" hc:IconSwitchElement.Geometry="{StaticResource DownGeometry}" hc:IconSwitchElement.GeometrySelected="{StaticResource UpGeometry}"/>
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="TabControlPlusScrollableTemplate" TargetType="hc:TabControl">
|
||||||
|
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
||||||
|
<Grid x:Name="templateRoot" ClipToBounds="true" SnapsToDevicePixels="true" KeyboardNavigation.TabNavigation="Local">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Border Visibility="{TemplateBinding ShowScrollButton,Converter={StaticResource Boolean2VisibilityConverter}}" Margin="0,-1,0,0" Grid.Row="0" Grid.Column="0" BorderThickness="0,0,1,1" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}" HorizontalAlignment="Left" Panel.ZIndex="2">
|
||||||
|
<RepeatButton Focusable="False" Style="{StaticResource RepeatButtonIcon}" Padding="8" hc:IconElement.Geometry="{StaticResource LeftGeometry}" Foreground="{DynamicResource PrimaryTextBrush}" Background="{DynamicResource SecondaryRegionBrush}" x:Name="PART_ScrollButtonLeft"/>
|
||||||
|
</Border>
|
||||||
|
<hc:ScrollViewer HorizontalScrollBarVisibility="Hidden" CanMouseWheel="True" Orientation="Horizontal" IsInertiaEnabled="True" Grid.Row="0" Grid.Column="1" IsDeferredScrollingEnabled="True" x:Name="PART_OverflowScrollviewer">
|
||||||
|
<Border Background="{TemplateBinding Background}" BorderThickness="0,0,0,1" BorderBrush="{DynamicResource BorderBrush}" Name="PART_HeaderBorder">
|
||||||
|
<hc:TabPanel MinHeight="{TemplateBinding TabItemHeight}" TabItemHeight="{TemplateBinding TabItemHeight}" TabItemWidth="{TemplateBinding TabItemWidth}" IsTabFillEnabled="{TemplateBinding IsTabFillEnabled}" Margin="0,0,-1,-1" x:Name="PART_HeaderPanel" HorizontalAlignment="Left" Background="{DynamicResource SecondaryTextBrush}" IsItemsHost="true" KeyboardNavigation.TabIndex="1" Panel.ZIndex="1">
|
||||||
|
<interactivity:Interaction.Behaviors>
|
||||||
|
<interactivity:FluidMoveBehavior AppliesTo="Children" Duration="{Binding FluidMoveDuration,ElementName=PART_HeaderPanel}"/>
|
||||||
|
</interactivity:Interaction.Behaviors>
|
||||||
|
</hc:TabPanel>
|
||||||
|
</Border>
|
||||||
|
</hc:ScrollViewer>
|
||||||
|
<Border Margin="0,-1,0,0" Grid.Row="0" Grid.Column="2" BorderThickness="1,0,0,1" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}" HorizontalAlignment="Right">
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<RepeatButton Focusable="False" Visibility="{TemplateBinding ShowScrollButton,Converter={StaticResource Boolean2VisibilityConverter}}" Style="{StaticResource RepeatButtonIcon}" BorderBrush="{DynamicResource BorderBrush}" Padding="8" hc:IconElement.Geometry="{StaticResource RightGeometry}" Foreground="{DynamicResource PrimaryTextBrush}" Background="{DynamicResource SecondaryRegionBrush}" x:Name="PART_ScrollButtonRight"/>
|
||||||
|
<Border Visibility="{Binding Visibility,ElementName=PART_OverflowButton}" Width="1" Background="{DynamicResource BorderBrush}"/>
|
||||||
|
<hc:ContextMenuToggleButton x:Name="PART_OverflowButton" Visibility="Collapsed" Style="{StaticResource ToggleButtonIconTransparent}" hc:IconSwitchElement.Geometry="{StaticResource DownGeometry}" hc:IconSwitchElement.GeometrySelected="{StaticResource UpGeometry}"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
<Border x:Name="contentPanel" Background="{DynamicResource SecondaryRegionBrush}" KeyboardNavigation.DirectionalNavigation="Contained" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="3" KeyboardNavigation.TabIndex="2" KeyboardNavigation.TabNavigation="Local">
|
||||||
|
<ContentPresenter x:Name="PART_SelectedContentHost" ContentSource="SelectedContent" Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<Style TargetType="hc:TabControl">
|
||||||
|
<Setter Property="Padding" Value="0"/>
|
||||||
|
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}"/>
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
|
||||||
|
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||||
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||||
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
|
<Setter Property="Template" Value="{StaticResource TabControlPlusTemplate}"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<MultiTrigger>
|
||||||
|
<MultiTrigger.Conditions>
|
||||||
|
<Condition Property="IsScrollable" Value="True"/>
|
||||||
|
<Condition Property="IsTabFillEnabled" Value="False"/>
|
||||||
|
</MultiTrigger.Conditions>
|
||||||
|
<Setter Property="Template" Value="{StaticResource TabControlPlusScrollableTemplate}"/>
|
||||||
|
</MultiTrigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style BasedOn="{StaticResource TabControlBaseStyle}" TargetType="TabControl"/>
|
||||||
|
|
||||||
|
<Style x:Key="TabItemInLine" BasedOn="{StaticResource TabItemStyle}" TargetType="TabItem">
|
||||||
|
<Setter Property="MinWidth" Value="0"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="TabControlInLine" BasedOn="{StaticResource TabControlBaseStyle}" TargetType="TabControl">
|
||||||
|
<Setter Property="ItemContainerStyle" Value="{StaticResource TabItemInLine}"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="TabControl">
|
||||||
|
<Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
|
||||||
|
<Grid x:Name="templateRoot" Background="{TemplateBinding Background}" ClipToBounds="true" SnapsToDevicePixels="true" KeyboardNavigation.TabNavigation="Local">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition x:Name="ColumnDefinition0"/>
|
||||||
|
<ColumnDefinition x:Name="ColumnDefinition1" Width="0"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition x:Name="RowDefinition0" Height="Auto"/>
|
||||||
|
<RowDefinition x:Name="RowDefinition1" Height="*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<UniformGrid Rows="1" x:Name="headerPanel" Background="Transparent" Grid.Column="0" IsItemsHost="true" Margin="0" Grid.Row="0" KeyboardNavigation.TabIndex="1" Panel.ZIndex="1"/>
|
||||||
|
<Border x:Name="contentPanel" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" BorderThickness="0,1,0,0" BorderBrush="{DynamicResource BorderBrush}" Background="{TemplateBinding Background}" Grid.Column="0" KeyboardNavigation.DirectionalNavigation="Contained" Grid.Row="1" KeyboardNavigation.TabIndex="2" KeyboardNavigation.TabNavigation="Local">
|
||||||
|
<ContentPresenter x:Name="PART_SelectedContentHost" ContentSource="SelectedContent" Margin="0" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="TabStripPlacement" Value="Bottom">
|
||||||
|
<Setter TargetName="RowDefinition0" Property="Height" Value="*"/>
|
||||||
|
<Setter TargetName="RowDefinition1" Property="Height" Value="Auto"/>
|
||||||
|
<Setter TargetName="headerPanel" Property="Grid.Row" Value="1"/>
|
||||||
|
<Setter TargetName="contentPanel" Property="Grid.Row" Value="0"/>
|
||||||
|
<Setter TargetName="contentPanel" Property="BorderThickness" Value="0,0,0,1"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="TabStripPlacement" Value="Left">
|
||||||
|
<Setter TargetName="RowDefinition0" Property="Height" Value="*" />
|
||||||
|
<Setter TargetName="RowDefinition1" Property="Height" Value="0" />
|
||||||
|
<Setter TargetName="ColumnDefinition0" Property="Width" Value="Auto" />
|
||||||
|
<Setter TargetName="ColumnDefinition1" Property="Width" Value="*" />
|
||||||
|
<Setter TargetName="contentPanel" Property="Grid.Column" Value="1" />
|
||||||
|
<Setter TargetName="contentPanel" Property="Grid.Row" Value="0" />
|
||||||
|
<Setter TargetName="contentPanel" Property="BorderThickness" Value="1,0,0,0"/>
|
||||||
|
<Setter TargetName="headerPanel" Property="Grid.Column" Value="0" />
|
||||||
|
<Setter TargetName="headerPanel" Property="Grid.Row" Value="0" />
|
||||||
|
<Setter TargetName="headerPanel" Property="Rows" Value="0"/>
|
||||||
|
<Setter TargetName="headerPanel" Property="Columns" Value="1"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="TabStripPlacement" Value="Right">
|
||||||
|
<Setter TargetName="RowDefinition0" Property="Height" Value="*" />
|
||||||
|
<Setter TargetName="RowDefinition1" Property="Height" Value="0" />
|
||||||
|
<Setter TargetName="ColumnDefinition0" Property="Width" Value="*" />
|
||||||
|
<Setter TargetName="ColumnDefinition1" Property="Width" Value="Auto" />
|
||||||
|
<Setter TargetName="contentPanel" Property="Grid.Column" Value="0" />
|
||||||
|
<Setter TargetName="contentPanel" Property="Grid.Row" Value="0" />
|
||||||
|
<Setter TargetName="contentPanel" Property="BorderThickness" Value="0,0,1,0"/>
|
||||||
|
<Setter TargetName="headerPanel" Property="Grid.Column" Value="1" />
|
||||||
|
<Setter TargetName="headerPanel" Property="Grid.Row" Value="0" />
|
||||||
|
<Setter TargetName="headerPanel" Property="Rows" Value="0"/>
|
||||||
|
<Setter TargetName="headerPanel" Property="Columns" Value="1"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="TabItemCapsuleDefault" BasedOn="{StaticResource TabItemCapsuleBaseStyle}" TargetType="TabItem"/>
|
||||||
|
|
||||||
|
<Style x:Key="TabItemCapsuleHorizontalFirst" BasedOn="{StaticResource TabItemCapsuleBaseStyle}" TargetType="TabItem">
|
||||||
|
<Setter Property="hc:BorderElement.CornerRadius" Value="4,0,0,4"/>
|
||||||
|
<Setter Property="Margin" Value="0"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="TabItemCapsuleHorizontalLast" BasedOn="{StaticResource TabItemCapsuleBaseStyle}" TargetType="TabItem">
|
||||||
|
<Setter Property="hc:BorderElement.CornerRadius" Value="0,4,4,0"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="TabItemCapsuleSingle" BasedOn="{StaticResource TabItemCapsuleBaseStyle}" TargetType="TabItem">
|
||||||
|
<Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="TabItemCapsuleVerticalFirst" BasedOn="{StaticResource TabItemCapsuleBaseStyle}" TargetType="TabItem">
|
||||||
|
<Setter Property="hc:BorderElement.CornerRadius" Value="4,4,0,0"/>
|
||||||
|
<Setter Property="Margin" Value="0"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="TabItemCapsuleVerticalLast" BasedOn="{StaticResource TabItemCapsuleBaseStyle}" TargetType="TabItem">
|
||||||
|
<Setter Property="hc:BorderElement.CornerRadius" Value="0,0,4,4"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="TabControlCapsule" TargetType="TabControl">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
|
||||||
|
<Setter Property="hc:TitleElement.BorderBrush" Value="{DynamicResource PrimaryBrush}"/>
|
||||||
|
<Setter Property="hc:TitleElement.Background" Value="{DynamicResource RegionBrush}"/>
|
||||||
|
<Setter Property="hc:TitleElement.Foreground" Value="{DynamicResource PrimaryBrush}"/>
|
||||||
|
<Setter Property="ItemContainerStyleSelector">
|
||||||
|
<Setter.Value>
|
||||||
|
<tools:TabItemCapsuleStyleSelector/>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="TabControl">
|
||||||
|
<Grid x:Name="templateRoot" Background="{TemplateBinding Background}" ClipToBounds="true" SnapsToDevicePixels="true" KeyboardNavigation.TabNavigation="Local">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition x:Name="ColumnDefinition0"/>
|
||||||
|
<ColumnDefinition x:Name="ColumnDefinition1" Width="0"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition x:Name="RowDefinition0" Height="Auto"/>
|
||||||
|
<RowDefinition x:Name="RowDefinition1" Height="*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<UniformGrid Rows="1" HorizontalAlignment="Center" VerticalAlignment="Center" x:Name="headerPanel" Background="Transparent" Grid.Column="0" IsItemsHost="true" Margin="0" Grid.Row="0" KeyboardNavigation.TabIndex="1" Panel.ZIndex="1"/>
|
||||||
|
<Border x:Name="contentPanel" Margin="0,6,0,0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}" Background="{TemplateBinding Background}" Grid.Column="0" KeyboardNavigation.DirectionalNavigation="Contained" Grid.Row="1" KeyboardNavigation.TabIndex="2" KeyboardNavigation.TabNavigation="Local">
|
||||||
|
<ContentPresenter x:Name="PART_SelectedContentHost" ContentSource="SelectedContent" Margin="0" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="TabStripPlacement" Value="Bottom">
|
||||||
|
<Setter TargetName="RowDefinition0" Property="Height" Value="*"/>
|
||||||
|
<Setter TargetName="RowDefinition1" Property="Height" Value="Auto"/>
|
||||||
|
<Setter TargetName="headerPanel" Property="Grid.Row" Value="1"/>
|
||||||
|
<Setter TargetName="contentPanel" Property="Margin" Value="0,0,0,6"/>
|
||||||
|
<Setter TargetName="contentPanel" Property="Grid.Row" Value="0"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="TabStripPlacement" Value="Left">
|
||||||
|
<Setter TargetName="RowDefinition0" Property="Height" Value="*" />
|
||||||
|
<Setter TargetName="RowDefinition1" Property="Height" Value="0" />
|
||||||
|
<Setter TargetName="ColumnDefinition0" Property="Width" Value="Auto" />
|
||||||
|
<Setter TargetName="ColumnDefinition1" Property="Width" Value="*" />
|
||||||
|
<Setter TargetName="headerPanel" Property="Grid.Column" Value="0" />
|
||||||
|
<Setter TargetName="headerPanel" Property="Grid.Row" Value="0" />
|
||||||
|
<Setter TargetName="headerPanel" Property="Rows" Value="0"/>
|
||||||
|
<Setter TargetName="headerPanel" Property="Columns" Value="1"/>
|
||||||
|
<Setter TargetName="contentPanel" Property="Grid.Column" Value="1" />
|
||||||
|
<Setter TargetName="contentPanel" Property="Grid.Row" Value="0" />
|
||||||
|
<Setter TargetName="contentPanel" Property="Margin" Value="6,0,0,0"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="TabStripPlacement" Value="Right">
|
||||||
|
<Setter TargetName="RowDefinition0" Property="Height" Value="*" />
|
||||||
|
<Setter TargetName="RowDefinition1" Property="Height" Value="0" />
|
||||||
|
<Setter TargetName="ColumnDefinition0" Property="Width" Value="*" />
|
||||||
|
<Setter TargetName="ColumnDefinition1" Property="Width" Value="Auto" />
|
||||||
|
<Setter TargetName="headerPanel" Property="Grid.Column" Value="1" />
|
||||||
|
<Setter TargetName="headerPanel" Property="Grid.Row" Value="0" />
|
||||||
|
<Setter TargetName="headerPanel" Property="Rows" Value="0"/>
|
||||||
|
<Setter TargetName="headerPanel" Property="Columns" Value="1"/>
|
||||||
|
<Setter TargetName="contentPanel" Property="Grid.Column" Value="0" />
|
||||||
|
<Setter TargetName="contentPanel" Property="Grid.Row" Value="0" />
|
||||||
|
<Setter TargetName="contentPanel" Property="Margin" Value="0,0,6,0"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="TabControlCapsuleSolid" BasedOn="{StaticResource TabControlCapsule}" TargetType="TabControl">
|
||||||
|
<Setter Property="hc:TitleElement.BorderBrush" Value="{DynamicResource TitleBrush}"/>
|
||||||
|
<Setter Property="hc:TitleElement.Background" Value="{DynamicResource TitleBrush}"/>
|
||||||
|
<Setter Property="hc:TitleElement.Foreground" Value="{DynamicResource TextIconBrush}"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
</ResourceDictionary>
|
58
src/Net_35/HandyControl_Net_35/Themes/Styles/TimeBar.xaml
Normal file
58
src/Net_35/HandyControl_Net_35/Themes/Styles/TimeBar.xaml
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:hc="clr-namespace:HandyControl.Controls"
|
||||||
|
xmlns:themes="clr-namespace:HandyControl.Themes">
|
||||||
|
|
||||||
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Basic/Converters.xaml"/>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Styles/Button.xaml"/>
|
||||||
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
|
||||||
|
<Style TargetType="hc:TimeBar">
|
||||||
|
<Setter Property="Focusable" Value="False"/>
|
||||||
|
<Setter Property="BorderThickness" Value="0,1,0,0"/>
|
||||||
|
<Setter Property="Foreground" Value="White"/>
|
||||||
|
<Setter Property="Background" Value="{DynamicResource TitleBrush}"/>
|
||||||
|
<Setter Property="Height" Value="60"/>
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="hc:TimeBar">
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<EventTrigger RoutedEvent="FrameworkElement.MouseEnter">
|
||||||
|
<BeginStoryboard>
|
||||||
|
<Storyboard>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="PART_TextBlockMove">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}"/>
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
</Storyboard>
|
||||||
|
</BeginStoryboard>
|
||||||
|
</EventTrigger>
|
||||||
|
<EventTrigger RoutedEvent="FrameworkElement.MouseLeave">
|
||||||
|
<BeginStoryboard>
|
||||||
|
<Storyboard>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="PART_TextBlockMove">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Collapsed}"/>
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
</Storyboard>
|
||||||
|
</BeginStoryboard>
|
||||||
|
</EventTrigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
<Border Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
|
||||||
|
<hc:SimplePanel ClipToBounds="True">
|
||||||
|
<Border BorderThickness="0,0,0,4" BorderBrush="White" VerticalAlignment="Top" Height="52">
|
||||||
|
<TextBlock FontSize="16" Name="PART_TextBlockSelected" VerticalAlignment="Top" Margin="0,14,0,0" HorizontalAlignment="Center"/>
|
||||||
|
</Border>
|
||||||
|
<TextBlock Visibility="{TemplateBinding ShowSpeStr,Converter={StaticResource Boolean2VisibilityConverter}}" Text="{TemplateBinding SpeStr}" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,14,10,0"/>
|
||||||
|
<TextBlock Visibility="Collapsed" Name="PART_TextBlockMove" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0,2,0,0"/>
|
||||||
|
<Canvas Name="PART_CanvasSpe" VerticalAlignment="Bottom" Height="28"/>
|
||||||
|
<Border Width="1" Background="{DynamicResource DangerBrush}"/>
|
||||||
|
<Border Name="PART_BorderTop" Background="Transparent" Cursor="Hand"/>
|
||||||
|
</hc:SimplePanel>
|
||||||
|
</Border>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
</ResourceDictionary>
|
335
src/Net_35/HandyControl_Net_35/Themes/Styles/ToggleButton.xaml
Normal file
335
src/Net_35/HandyControl_Net_35/Themes/Styles/ToggleButton.xaml
Normal file
@ -0,0 +1,335 @@
|
|||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:hc="clr-namespace:HandyControl.Controls"
|
||||||
|
xmlns:themes="clr-namespace:HandyControl.Themes">
|
||||||
|
|
||||||
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Styles/Border.xaml"/>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Styles/Base/ToggleButtonBaseStyle.xaml"/>
|
||||||
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
|
||||||
|
<!--普通-->
|
||||||
|
<Style BasedOn="{StaticResource ToggleButtonBaseStyle}" TargetType="ToggleButton">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
|
||||||
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsPressed" Value="True">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource BorderBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ToggleButtonPrimary" BasedOn="{StaticResource ToggleButtonBaseStyle}" TargetType="ToggleButton">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource PrimaryBrush}"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ToggleButtonSuccess" BasedOn="{StaticResource ToggleButtonBaseStyle}" TargetType="ToggleButton">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource SuccessBrush}"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ToggleButtonInfo" BasedOn="{StaticResource ToggleButtonBaseStyle}" TargetType="ToggleButton">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource InfoBrush}"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ToggleButtonWarning" BasedOn="{StaticResource ToggleButtonBaseStyle}" TargetType="ToggleButton">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource WarningBrush}"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ToggleButtonDanger" BasedOn="{StaticResource ToggleButtonBaseStyle}" TargetType="ToggleButton">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource DangerBrush}"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!--图标-->
|
||||||
|
<Style x:Key="ToggleButtonIcon" BasedOn="{StaticResource ToggleButtonIconBaseStyle}" TargetType="ToggleButton">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
|
||||||
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsPressed" Value="True">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource BorderBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ToggleButtonIconPrimary" BasedOn="{StaticResource ToggleButtonIconBaseStyle}" TargetType="ToggleButton">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource PrimaryBrush}"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ToggleButtonIconSuccess" BasedOn="{StaticResource ToggleButtonIconBaseStyle}" TargetType="ToggleButton">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource SuccessBrush}"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ToggleButtonIconInfo" BasedOn="{StaticResource ToggleButtonIconBaseStyle}" TargetType="ToggleButton">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource InfoBrush}"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ToggleButtonIconWarning" BasedOn="{StaticResource ToggleButtonIconBaseStyle}" TargetType="ToggleButton">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource WarningBrush}"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ToggleButtonIconDanger" BasedOn="{StaticResource ToggleButtonIconBaseStyle}" TargetType="ToggleButton">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource DangerBrush}"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ToggleButtonIconTransparent" BasedOn="{StaticResource ToggleButtonIconBaseStyle}" TargetType="ToggleButton">
|
||||||
|
<Setter Property="Background" Value="Transparent"/>
|
||||||
|
<Setter Property="BorderBrush" Value="Transparent"/>
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="ToggleButton">
|
||||||
|
<Border Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
|
||||||
|
<ContentControl Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
|
||||||
|
<Path x:Name="PathIcon" Width="{TemplateBinding hc:IconElement.Width}" Height="{TemplateBinding hc:IconElement.Height}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Fill="{TemplateBinding Foreground}" SnapsToDevicePixels="True" Stretch="Uniform" Data="{TemplateBinding hc:IconSwitchElement.Geometry}"/>
|
||||||
|
</ContentControl>
|
||||||
|
</Border>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsChecked" Value="True">
|
||||||
|
<Setter TargetName="PathIcon" Property="Data" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(hc:IconSwitchElement.GeometrySelected)}"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!--开关-->
|
||||||
|
<Style x:Key="ToggleButtonSwitch" BasedOn="{StaticResource ToggleButtonSwitchBaseStyle}" TargetType="ToggleButton"/>
|
||||||
|
|
||||||
|
<!--翻转-->
|
||||||
|
<Style x:Key="ToggleButtonFlip" BasedOn="{StaticResource BaseStyle}" TargetType="ToggleButton">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
|
<Setter Property="Padding" Value="0"/>
|
||||||
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
|
<Setter Property="Height" Value="30"/>
|
||||||
|
<Setter Property="Width" Value="30"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="ToggleButton">
|
||||||
|
<ControlTemplate.Resources>
|
||||||
|
<Storyboard x:Key="StoryboardChecked">
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="CheckedElement">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="1"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="UnCheckedElement">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="0"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="CheckedElement">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0:0:0.1" Value="1"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="UnCheckedElement">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0:0:0.1" Value="0"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
</Storyboard>
|
||||||
|
<Storyboard x:Key="StoryboardUnChecked">
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="CheckedElement">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="0"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="UnCheckedElement">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="1"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="CheckedElement">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0:0:0.1" Value="0"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="UnCheckedElement">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0:0:0.1" Value="1"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
</Storyboard>
|
||||||
|
</ControlTemplate.Resources>
|
||||||
|
<Viewbox>
|
||||||
|
<hc:SimplePanel Height="28" Width="28">
|
||||||
|
<Border Name="UnCheckedElement" Style="{StaticResource BorderCircularClip}" RenderTransformOrigin="0.5,0.5" SnapsToDevicePixels="true" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}">
|
||||||
|
<Border.RenderTransform>
|
||||||
|
<TransformGroup>
|
||||||
|
<ScaleTransform ScaleX="1"/>
|
||||||
|
</TransformGroup>
|
||||||
|
</Border.RenderTransform>
|
||||||
|
<ContentPresenter Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||||
|
</Border>
|
||||||
|
<Border Name="CheckedElement" Style="{StaticResource BorderCircularClip}" RenderTransformOrigin="0.5,0.5" SnapsToDevicePixels="true" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}">
|
||||||
|
<Border.RenderTransform>
|
||||||
|
<TransformGroup>
|
||||||
|
<ScaleTransform ScaleX="0"/>
|
||||||
|
</TransformGroup>
|
||||||
|
</Border.RenderTransform>
|
||||||
|
<ContentPresenter Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Content="{Binding Path=(hc:StatusSwitchElement.CheckedElement),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
|
</Border>
|
||||||
|
</hc:SimplePanel>
|
||||||
|
</Viewbox>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
|
<Setter Property="Opacity" Value=".9"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsPressed" Value="True">
|
||||||
|
<Setter Property="Opacity" Value=".6"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsChecked" Value="true">
|
||||||
|
<Trigger.EnterActions>
|
||||||
|
<BeginStoryboard Storyboard="{StaticResource StoryboardChecked}"/>
|
||||||
|
</Trigger.EnterActions>
|
||||||
|
<Trigger.ExitActions>
|
||||||
|
<BeginStoryboard Storyboard="{StaticResource StoryboardUnChecked}"/>
|
||||||
|
</Trigger.ExitActions>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsEnabled" Value="False">
|
||||||
|
<Setter Property="Opacity" Value="0.4"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!--自定义-->
|
||||||
|
<Style x:Key="ToggleButtonCustom" BasedOn="{StaticResource BaseStyle}" TargetType="ToggleButton">
|
||||||
|
<Setter Property="Background" Value="Transparent"/>
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
|
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||||
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||||
|
<Setter Property="Padding" Value="0"/>
|
||||||
|
<Setter Property="BorderThickness" Value="0"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="ToggleButton">
|
||||||
|
<Border x:Name="Chrome" SnapsToDevicePixels="true" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}">
|
||||||
|
<hc:SimplePanel>
|
||||||
|
<ContentPresenter Name="UnCheckedElement" Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||||
|
<ContentPresenter Name="CheckedElement" Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Visibility="Collapsed" Content="{Binding Path=(hc:StatusSwitchElement.CheckedElement),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
|
</hc:SimplePanel>
|
||||||
|
</Border>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
|
<Setter Property="Opacity" Value=".9"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsPressed" Value="True">
|
||||||
|
<Setter Property="Opacity" Value=".6"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsChecked" Value="True">
|
||||||
|
<Setter Property="Visibility" Value="Visible" TargetName="CheckedElement"/>
|
||||||
|
</Trigger>
|
||||||
|
<MultiTrigger>
|
||||||
|
<MultiTrigger.Conditions>
|
||||||
|
<Condition Property="hc:StatusSwitchElement.HideUncheckedElement" Value="True"/>
|
||||||
|
<Condition Property="IsChecked" Value="True"/>
|
||||||
|
</MultiTrigger.Conditions>
|
||||||
|
<Setter Property="Visibility" Value="Collapsed" TargetName="UnCheckedElement"/>
|
||||||
|
</MultiTrigger>
|
||||||
|
<Trigger Property="IsEnabled" Value="False">
|
||||||
|
<Setter Property="Opacity" Value="0.4"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!--ButtonGroup-->
|
||||||
|
<Style x:Key="ToggleButtonGroupItemDefault" BasedOn="{StaticResource ToggleButtonGroupItemBaseStyle}" TargetType="ToggleButton"/>
|
||||||
|
|
||||||
|
<Style x:Key="ToggleButtonGroupItemHorizontalFirst" BasedOn="{StaticResource ToggleButtonGroupItemBaseStyle}" TargetType="ToggleButton">
|
||||||
|
<Setter Property="hc:BorderElement.CornerRadius" Value="4,0,0,4"/>
|
||||||
|
<Setter Property="Margin" Value="0"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ToggleButtonGroupItemHorizontalLast" BasedOn="{StaticResource ToggleButtonGroupItemBaseStyle}" TargetType="ToggleButton">
|
||||||
|
<Setter Property="hc:BorderElement.CornerRadius" Value="0,4,4,0"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ToggleButtonGroupItemSingle" BasedOn="{StaticResource ToggleButtonGroupItemBaseStyle}" TargetType="ToggleButton">
|
||||||
|
<Setter Property="hc:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ToggleButtonGroupItemVerticalFirst" BasedOn="{StaticResource ToggleButtonGroupItemBaseStyle}" TargetType="ToggleButton">
|
||||||
|
<Setter Property="hc:BorderElement.CornerRadius" Value="4,4,0,0"/>
|
||||||
|
<Setter Property="Margin" Value="0"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ToggleButtonGroupItemVerticalLast" BasedOn="{StaticResource ToggleButtonGroupItemBaseStyle}" TargetType="ToggleButton">
|
||||||
|
<Setter Property="hc:BorderElement.CornerRadius" Value="0,0,4,4"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!--LoadingButton-->
|
||||||
|
<Style x:Key="ToggleButtonLoadingPrimary" BasedOn="{StaticResource ToggleButtonBaseStyle}" TargetType="ToggleButton">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource PrimaryBrush}"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="ToggleButton">
|
||||||
|
<Border x:Name="Chrome" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}">
|
||||||
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
||||||
|
<hc:SimplePanel>
|
||||||
|
<ContentPresenter Name="UnCheckedElement" Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||||
|
<ContentPresenter Name="CheckedElement" Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Visibility="Collapsed" Content="{Binding Path=(hc:StatusSwitchElement.CheckedElement),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
|
</hc:SimplePanel>
|
||||||
|
<Viewbox Margin="0,4">
|
||||||
|
<hc:LoadingCircle x:Name="Loading" Width="22" Height="22" Foreground="{TemplateBinding Foreground}" DotDiameter="3" IsRunning="{TemplateBinding IsChecked}" Visibility="Collapsed"/>
|
||||||
|
</Viewbox>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
|
<Setter Property="Opacity" Value=".9"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsPressed" Value="True">
|
||||||
|
<Setter Property="Opacity" Value=".6"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsChecked" Value="True">
|
||||||
|
<Setter Property="Visibility" Value="Visible" TargetName="Loading"/>
|
||||||
|
<Setter Property="Visibility" Value="Visible" TargetName="CheckedElement"/>
|
||||||
|
</Trigger>
|
||||||
|
<MultiTrigger>
|
||||||
|
<MultiTrigger.Conditions>
|
||||||
|
<Condition Property="hc:StatusSwitchElement.HideUncheckedElement" Value="True"/>
|
||||||
|
<Condition Property="IsChecked" Value="True"/>
|
||||||
|
</MultiTrigger.Conditions>
|
||||||
|
<Setter Property="Visibility" Value="Collapsed" TargetName="UnCheckedElement"/>
|
||||||
|
</MultiTrigger>
|
||||||
|
<Trigger Property="IsEnabled" Value="False">
|
||||||
|
<Setter Property="Opacity" Value="0.4"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ToggleButtonLoading" BasedOn="{StaticResource ToggleButtonLoadingPrimary}" TargetType="ToggleButton">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
|
||||||
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsPressed" Value="True">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource BorderBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ToggleButtonLoadingSuccess" BasedOn="{StaticResource ToggleButtonLoadingPrimary}" TargetType="ToggleButton">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource SuccessBrush}"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ToggleButtonLoadingInfo" BasedOn="{StaticResource ToggleButtonLoadingPrimary}" TargetType="ToggleButton">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource InfoBrush}"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ToggleButtonLoadingWarning" BasedOn="{StaticResource ToggleButtonLoadingPrimary}" TargetType="ToggleButton">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource WarningBrush}"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ToggleButtonLoadingDanger" BasedOn="{StaticResource ToggleButtonLoadingPrimary}" TargetType="ToggleButton">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource DangerBrush}"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
</ResourceDictionary>
|
@ -0,0 +1,49 @@
|
|||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:hc="clr-namespace:HandyControl.Controls">
|
||||||
|
|
||||||
|
<Storyboard x:Key="Right2LeftTransition" x:Shared="False">
|
||||||
|
<DoubleAnimation From="50" To="0" Duration="0:0:0.4" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)"/>
|
||||||
|
</Storyboard>
|
||||||
|
|
||||||
|
<Storyboard x:Key="Left2RightTransition" x:Shared="False">
|
||||||
|
<DoubleAnimation From="-50" To="0" Duration="0:0:0.4" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)"/>
|
||||||
|
</Storyboard>
|
||||||
|
|
||||||
|
<Storyboard x:Key="Bottom2TopTransition" x:Shared="False">
|
||||||
|
<DoubleAnimation From="50" To="0" Duration="0:0:0.4" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)"/>
|
||||||
|
</Storyboard>
|
||||||
|
|
||||||
|
<Storyboard x:Key="Top2BottomTransition" x:Shared="False">
|
||||||
|
<DoubleAnimation From="-50" To="0" Duration="0:0:0.4" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)"/>
|
||||||
|
</Storyboard>
|
||||||
|
|
||||||
|
<Storyboard x:Key="Right2LeftWithFadeTransition" x:Shared="False">
|
||||||
|
<DoubleAnimation From="0" To="1" Duration="0:0:0.4" Storyboard.TargetProperty="(UIElement.Opacity)"/>
|
||||||
|
<DoubleAnimation From="50" To="0" Duration="0:0:0.4" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)"/>
|
||||||
|
</Storyboard>
|
||||||
|
|
||||||
|
<Storyboard x:Key="Left2RightWithFadeTransition" x:Shared="False">
|
||||||
|
<DoubleAnimation From="0" To="1" Duration="0:0:0.4" Storyboard.TargetProperty="(UIElement.Opacity)"/>
|
||||||
|
<DoubleAnimation From="-50" To="0" Duration="0:0:0.4" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)"/>
|
||||||
|
</Storyboard>
|
||||||
|
|
||||||
|
<Storyboard x:Key="Bottom2TopWithFadeTransition" x:Shared="False">
|
||||||
|
<DoubleAnimation From="0" To="1" Duration="0:0:0.4" Storyboard.TargetProperty="(UIElement.Opacity)"/>
|
||||||
|
<DoubleAnimation From="50" To="0" Duration="0:0:0.4" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)"/>
|
||||||
|
</Storyboard>
|
||||||
|
|
||||||
|
<Storyboard x:Key="Top2BottomWithFadeTransition" x:Shared="False">
|
||||||
|
<DoubleAnimation From="0" To="1" Duration="0:0:0.4" Storyboard.TargetProperty="(UIElement.Opacity)"/>
|
||||||
|
<DoubleAnimation From="-50" To="0" Duration="0:0:0.4" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)"/>
|
||||||
|
</Storyboard>
|
||||||
|
|
||||||
|
<Storyboard x:Key="FadeTransition" x:Shared="False">
|
||||||
|
<DoubleAnimation From="0" To="1" Duration="0:0:0.4" Storyboard.TargetProperty="(UIElement.Opacity)"/>
|
||||||
|
</Storyboard>
|
||||||
|
|
||||||
|
<Style TargetType="hc:TransitioningContentControl">
|
||||||
|
<Setter Property="Focusable" Value="False"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
</ResourceDictionary>
|
242
src/Net_35/HandyControl_Net_35/Themes/Styles/Window.xaml
Normal file
242
src/Net_35/HandyControl_Net_35/Themes/Styles/Window.xaml
Normal file
@ -0,0 +1,242 @@
|
|||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:hc="clr-namespace:HandyControl.Controls"
|
||||||
|
xmlns:interactivity="clr-namespace:HandyControl.Interactivity"
|
||||||
|
xmlns:shell="clr-namespace:Microsoft.Windows.Shell"
|
||||||
|
xmlns:themes="clr-namespace:HandyControl.Themes">
|
||||||
|
|
||||||
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Styles/Button.xaml"/>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Basic/Converters.xaml"/>
|
||||||
|
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Basic/Geometries.xaml"/>
|
||||||
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
|
||||||
|
<LinearGradientBrush x:Key="ResizeGripperForeground" EndPoint="1,0.75" StartPoint="0,0.25">
|
||||||
|
<GradientStop Color="#FFFFFF" Offset="0.3"/>
|
||||||
|
<GradientStop Color="#BBC5D7" Offset="0.75"/>
|
||||||
|
<GradientStop Color="#6D83A9" Offset="1"/>
|
||||||
|
</LinearGradientBrush>
|
||||||
|
|
||||||
|
<Style TargetType="ResizeGrip">
|
||||||
|
<Setter Property="MinWidth" Value="11"/>
|
||||||
|
<Setter Property="MinHeight" Value="11"/>
|
||||||
|
<Setter Property="Width" Value="11"/>
|
||||||
|
<Setter Property="Height" Value="11"/>
|
||||||
|
<Setter Property="Background" Value="Transparent"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="ResizeGrip">
|
||||||
|
<Grid Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
|
||||||
|
<Path Width="11" Height="11" Data="M 9,0 L 11,0 L 11,11 L 0,11 L 0,9 L 3,9 L 3,6 L 6,6 L 6,3 L 9,3 z" HorizontalAlignment="Right" VerticalAlignment="Bottom">
|
||||||
|
<Path.Fill>
|
||||||
|
<DrawingBrush TileMode="Tile" Viewbox="0,0,3,3" Viewport="0,0,3,3" ViewportUnits="Absolute" ViewboxUnits="Absolute">
|
||||||
|
<DrawingBrush.Drawing>
|
||||||
|
<DrawingGroup>
|
||||||
|
<GeometryDrawing Brush="{StaticResource ResizeGripperForeground}">
|
||||||
|
<GeometryDrawing.Geometry>
|
||||||
|
<RectangleGeometry Rect="0,0,2,2"/>
|
||||||
|
</GeometryDrawing.Geometry>
|
||||||
|
</GeometryDrawing>
|
||||||
|
</DrawingGroup>
|
||||||
|
</DrawingBrush.Drawing>
|
||||||
|
</DrawingBrush>
|
||||||
|
</Path.Fill>
|
||||||
|
</Path>
|
||||||
|
</Grid>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style TargetType="Window">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}"/>
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="WindowWin10" BasedOn="{x:Null}" TargetType="hc:Window">
|
||||||
|
<Setter Property="OverridesDefaultStyle" Value="True"/>
|
||||||
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
|
<Setter Property="BorderBrush" Value="#262e2f"/>
|
||||||
|
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}"/>
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
|
||||||
|
<Setter Property="NonClientAreaBackground" Value="{DynamicResource RegionBrush}"/>
|
||||||
|
<Setter Property="NonClientAreaForeground" Value="{DynamicResource PrimaryTextBrush}"/>
|
||||||
|
<Setter Property="CloseButtonBackground" Value="Transparent"/>
|
||||||
|
<Setter Property="CloseButtonForeground" Value="{DynamicResource PrimaryTextBrush}"/>
|
||||||
|
<Setter Property="CloseButtonHoverBackground" Value="#e81123"/>
|
||||||
|
<Setter Property="CloseButtonHoverForeground" Value="White"/>
|
||||||
|
<Setter Property="OtherButtonBackground" Value="Transparent"/>
|
||||||
|
<Setter Property="OtherButtonForeground" Value="{DynamicResource PrimaryTextBrush}"/>
|
||||||
|
<Setter Property="OtherButtonHoverBackground" Value="{DynamicResource DarkMaskBrush}"/>
|
||||||
|
<Setter Property="OtherButtonHoverForeground" Value="{DynamicResource PrimaryTextBrush}"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="hc:Window">
|
||||||
|
<Border SnapsToDevicePixels="True" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}">
|
||||||
|
<Grid Margin="{TemplateBinding Padding}">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid Background="{TemplateBinding NonClientAreaBackground}" Name="PART_NonClientArea" TextElement.Foreground="{TemplateBinding NonClientAreaForeground}">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<StackPanel Name="ButtonPanel" shell:WindowChrome.IsHitTestVisibleInChrome="True" VerticalAlignment="Top" Grid.Column="1" HorizontalAlignment="Right" Orientation="Horizontal">
|
||||||
|
<Button Background="{TemplateBinding OtherButtonBackground}" Foreground="{TemplateBinding OtherButtonForeground}" Command="shell:SystemCommands.MinimizeWindowCommand" IsTabStop="False" Name="ButtonMin" Height="29" Style="{StaticResource ButtonIcon}" Width="45" hc:IconElement.Geometry="{StaticResource WindowMinGeometry}" BorderThickness="1,0,1,0" hc:IconElement.Width="10" hc:IconElement.Height="10"/>
|
||||||
|
<Button Background="{TemplateBinding OtherButtonBackground}" Foreground="{TemplateBinding OtherButtonForeground}" Command="shell:SystemCommands.MaximizeWindowCommand" IsTabStop="False" Name="ButtonMax" Height="29" Style="{StaticResource ButtonIcon}" Width="46" hc:IconElement.Geometry="{StaticResource WindowMaxGeometry}" BorderThickness="1,0,1,0" hc:IconElement.Width="10" hc:IconElement.Height="10"/>
|
||||||
|
<Button Background="{TemplateBinding OtherButtonBackground}" Foreground="{TemplateBinding OtherButtonForeground}" Command="shell:SystemCommands.RestoreWindowCommand" IsTabStop="False" Name="ButtonRestore" Height="29" Style="{StaticResource ButtonIcon}" Width="46" hc:IconElement.Geometry="{StaticResource WindowRestoreGeometry}" BorderThickness="1,0,1,0" hc:IconElement.Width="10" hc:IconElement.Height="10"/>
|
||||||
|
<Button Background="{TemplateBinding CloseButtonBackground}" Foreground="{TemplateBinding CloseButtonForeground}" Command="shell:SystemCommands.CloseWindowCommand" IsTabStop="False" Name="ButtonClose" Height="29" Style="{StaticResource ButtonIcon}" Width="46" hc:IconElement.Geometry="{StaticResource CloseGeometry}" BorderThickness="1,0,0,0" hc:IconElement.Width="10" hc:IconElement.Height="10"/>
|
||||||
|
</StackPanel>
|
||||||
|
<Grid Grid.Column="0">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Button Name="ButtonIcon" Visibility="{TemplateBinding Icon,Converter={StaticResource Object2VisibilityConverter}}" Command="{x:Static shell:SystemCommands.ShowSystemMenuCommand}" Background="Transparent" Margin="10,0,0,0" shell:WindowChrome.IsHitTestVisibleInChrome="True" Style="{StaticResource ButtonCustom}" VerticalAlignment="Center">
|
||||||
|
<interactivity:Interaction.Triggers>
|
||||||
|
<interactivity:EventTrigger EventName="MouseDoubleClick">
|
||||||
|
<interactivity:InvokeCommandAction Command="{x:Static shell:SystemCommands.CloseWindowCommand}" />
|
||||||
|
</interactivity:EventTrigger>
|
||||||
|
</interactivity:Interaction.Triggers>
|
||||||
|
<Image IsHitTestVisible="False" Name="Icon" Source="{TemplateBinding Icon}" VerticalAlignment="Center" Width="16" Height="16"/>
|
||||||
|
</Button>
|
||||||
|
<TextBlock Grid.Column="1" Text="{TemplateBinding Title}" Padding="10,0,0,0" VerticalAlignment="Center">
|
||||||
|
<TextBlock.Visibility>
|
||||||
|
<MultiBinding Converter="{StaticResource BooleanArr2VisibilityConverter}">
|
||||||
|
<MultiBinding.Bindings>
|
||||||
|
<Binding Path="ShowTitle" RelativeSource="{RelativeSource TemplatedParent}"/>
|
||||||
|
<Binding Path="Title" RelativeSource="{RelativeSource TemplatedParent}" Converter="{StaticResource Object2BooleanConverter}"/>
|
||||||
|
</MultiBinding.Bindings>
|
||||||
|
</MultiBinding>
|
||||||
|
</TextBlock.Visibility>
|
||||||
|
</TextBlock>
|
||||||
|
<ContentPresenter shell:WindowChrome.IsHitTestVisibleInChrome="True" Grid.Column="2" x:Name="ContentPresenterMain" Content="{TemplateBinding NonClientAreaContent}"/>
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
<AdornerDecorator Grid.Row="1">
|
||||||
|
<ContentPresenter ClipToBounds="True"/>
|
||||||
|
</AdornerDecorator>
|
||||||
|
<ResizeGrip Width="10" Height="10" x:Name="ResizeGrip" HorizontalAlignment="Right" VerticalAlignment="Bottom" Grid.Row="1" IsTabStop="False" Visibility="Collapsed"/>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsActive" Value="False">
|
||||||
|
<Setter Property="Opacity" Value=".8" TargetName="ContentPresenterMain"/>
|
||||||
|
<Setter Property="Opacity" Value=".8" TargetName="ButtonPanel"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="WindowState" Value="Maximized">
|
||||||
|
<Setter Property="Visibility" Value="Collapsed" TargetName="ButtonMax"/>
|
||||||
|
<Setter Property="Visibility" Value="Visible" TargetName="ButtonRestore"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="WindowState" Value="Normal">
|
||||||
|
<Setter Property="Visibility" Value="Visible" TargetName="ButtonMax"/>
|
||||||
|
<Setter Property="Visibility" Value="Collapsed" TargetName="ButtonRestore"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="ResizeMode" Value="NoResize">
|
||||||
|
<Setter Property="Visibility" Value="Collapsed" TargetName="ButtonMin"/>
|
||||||
|
<Setter Property="Visibility" Value="Collapsed" TargetName="ButtonMax"/>
|
||||||
|
<Setter Property="Visibility" Value="Collapsed" TargetName="ButtonRestore"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="ResizeMode" Value="CanMinimize">
|
||||||
|
<Setter Property="Visibility" Value="Collapsed" TargetName="ButtonMax"/>
|
||||||
|
<Setter Property="Visibility" Value="Collapsed" TargetName="ButtonRestore"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True" SourceName="ButtonClose">
|
||||||
|
<Setter Property="Background" TargetName="ButtonClose" Value="{Binding CloseButtonHoverBackground,RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
|
<Setter Property="Foreground" TargetName="ButtonClose" Value="{Binding CloseButtonHoverForeground,RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True" SourceName="ButtonMax">
|
||||||
|
<Setter Property="Background" TargetName="ButtonMax" Value="{Binding OtherButtonHoverBackground,RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
|
<Setter Property="Foreground" TargetName="ButtonMax" Value="{Binding OtherButtonHoverForeground,RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True" SourceName="ButtonRestore">
|
||||||
|
<Setter Property="Background" TargetName="ButtonRestore" Value="{Binding OtherButtonHoverBackground,RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
|
<Setter Property="Foreground" TargetName="ButtonRestore" Value="{Binding OtherButtonHoverForeground,RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True" SourceName="ButtonMin">
|
||||||
|
<Setter Property="Background" TargetName="ButtonMin" Value="{Binding OtherButtonHoverBackground,RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
|
<Setter Property="Foreground" TargetName="ButtonMin" Value="{Binding OtherButtonHoverForeground,RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
|
</Trigger>
|
||||||
|
<MultiTrigger>
|
||||||
|
<MultiTrigger.Conditions>
|
||||||
|
<Condition Property="ResizeMode" Value="CanResizeWithGrip"/>
|
||||||
|
<Condition Property="WindowState" Value="Normal" />
|
||||||
|
</MultiTrigger.Conditions>
|
||||||
|
<Setter TargetName="ResizeGrip" Property="Visibility" Value="Visible" />
|
||||||
|
</MultiTrigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="WindowBlur" BasedOn="{StaticResource WindowWin10}" TargetType="hc:BlurWindow">
|
||||||
|
<Setter Property="Background" Value="Transparent"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="WindowGlow" BasedOn="{StaticResource WindowWin10}" TargetType="hc:GlowWindow">
|
||||||
|
<Setter Property="ActiveGlowColor" Value="#262e2f"/>
|
||||||
|
<Setter Property="InactiveGlowColor" Value="{DynamicResource BorderColor}"/>
|
||||||
|
<Setter Property="BorderThickness" Value="0"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style TargetType="hc:ImageBrowser">
|
||||||
|
<Setter Property="Background" Value="Transparent"/>
|
||||||
|
<Setter Property="MinWidth" Value="400"/>
|
||||||
|
<Setter Property="MinHeight" Value="250"/>
|
||||||
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
|
<Setter Property="BorderBrush" Value="Black"/>
|
||||||
|
<Setter Property="ResizeMode" Value="NoResize"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="hc:ImageBrowser">
|
||||||
|
<ControlTemplate.Resources>
|
||||||
|
<Storyboard x:Key="Storyboard1">
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PART_GridTop">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0:0:.1" Value="1"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
</Storyboard>
|
||||||
|
<Storyboard x:Key="Storyboard2">
|
||||||
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PART_GridTop">
|
||||||
|
<SplineDoubleKeyFrame KeyTime="0:0:.4" Value="0"/>
|
||||||
|
</DoubleAnimationUsingKeyFrames>
|
||||||
|
</Storyboard>
|
||||||
|
</ControlTemplate.Resources>
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<hc:ImageViewer x:Name="PART_ImageViewer" ShowImgMap="True" BorderThickness="0" Background="#dd000000"/>
|
||||||
|
<Grid Name="PART_GridTop" Opacity="0" Background="{DynamicResource DarkOpacityBrush}" VerticalAlignment="Top" Grid.Row="0">
|
||||||
|
<StackPanel HorizontalAlignment="Left" VerticalAlignment="Center" Orientation="Horizontal">
|
||||||
|
<TextBlock Text="{Binding ImgPath,ElementName=PART_ImageViewer}" Foreground="White" Margin="10,0,0,0"/>
|
||||||
|
<TextBlock Text="{Binding ImgSize,ElementName=PART_ImageViewer,Converter={StaticResource Long2FileSizeConverter}}" Foreground="White" Margin="30,0,0,0"/>
|
||||||
|
</StackPanel>
|
||||||
|
<Button Command="interactivity:ControlCommands.Close" shell:WindowChrome.IsHitTestVisibleInChrome="True" Background="Red" Grid.Row="0" Padding="14" hc:IconElement.Geometry="{StaticResource DeleteGeometry}" Style="{StaticResource ButtonIcon}" HorizontalAlignment="Right" VerticalAlignment="Top" Width="40" Height="40"/>
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger SourceName="PART_ImageViewer" Property="ShowCloseButton" Value="True">
|
||||||
|
<Trigger.EnterActions>
|
||||||
|
<BeginStoryboard Storyboard="{StaticResource Storyboard1}"/>
|
||||||
|
</Trigger.EnterActions>
|
||||||
|
<Trigger.ExitActions>
|
||||||
|
<BeginStoryboard Storyboard="{StaticResource Storyboard2}"/>
|
||||||
|
</Trigger.ExitActions>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="IsFullScreen" Value="True">
|
||||||
|
<Setter Property="WindowState" Value="Maximized"/>
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
</ResourceDictionary>
|
@ -0,0 +1 @@
|
|||||||
|
|
@ -501,7 +501,7 @@
|
|||||||
</Resource>
|
</Resource>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<EmbeddedResource Include="..\..\Shared\HandyControlDemo_Shared\Properties\Langs\Lang.tr.resx">
|
<EmbeddedResource Include="..\..\Shared\HandyControlDemo_Shared\Properties\Langs\Lang.tr.resx">
|
||||||
<Link>Properties\Langs\Lang.tr.resx</Link>
|
<Link>Properties\Langs\Lang.tr.resx</Link>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="..\..\Shared\HandyControlDemo_Shared\Properties\Langs\Lang.ca-ES.resx">
|
<EmbeddedResource Include="..\..\Shared\HandyControlDemo_Shared\Properties\Langs\Lang.ca-ES.resx">
|
||||||
|
@ -7,17 +7,12 @@
|
|||||||
<PackageId>HandyControl</PackageId>
|
<PackageId>HandyControl</PackageId>
|
||||||
<IncludeSymbols>true</IncludeSymbols>
|
<IncludeSymbols>true</IncludeSymbols>
|
||||||
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
|
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
|
||||||
<NoWarn>0067;0649;1591</NoWarn>
|
<NoWarn>0067;0649;1591;0108;1717</NoWarn>
|
||||||
<UseWPF>true</UseWPF>
|
<UseWPF>true</UseWPF>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release-Net40|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release-Net40|AnyCPU' ">
|
||||||
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\HandyControl.xml</DocumentationFile>
|
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\HandyControl.xml</DocumentationFile>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
|
||||||
<PackageReference Include="Microsoft.Windows.Shell">
|
|
||||||
<Version>3.0.1</Version>
|
|
||||||
</PackageReference>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Page Update="Themes\Styles\Base\ComboBoxBaseStyle.xaml">
|
<Page Update="Themes\Styles\Base\ComboBoxBaseStyle.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
@ -100,6 +95,7 @@
|
|||||||
</Content>
|
</Content>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="..\..\Shared\HandyControl_Shared\HandyControl_Shared.projitems" Label="Shared" />
|
<Import Project="..\..\Shared\HandyControl_Shared\HandyControl_Shared.projitems" Label="Shared" />
|
||||||
|
<Import Project="..\..\Shared\Microsoft.Windows.Shell\Microsoft.Windows.Shell.projitems" Label="Shared" />
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\dropper.cur">
|
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\dropper.cur">
|
||||||
<Link>Resources\dropper.cur</Link>
|
<Link>Resources\dropper.cur</Link>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:hc="clr-namespace:HandyControl.Controls"
|
xmlns:hc="clr-namespace:HandyControl.Controls"
|
||||||
xmlns:interactivity="clr-namespace:HandyControl.Interactivity"
|
xmlns:interactivity="clr-namespace:HandyControl.Interactivity"
|
||||||
xmlns:shell="http://schemas.microsoft.com/winfx/2006/xaml/presentation/shell"
|
xmlns:shell="clr-namespace:Microsoft.Windows.Shell"
|
||||||
xmlns:themes="clr-namespace:HandyControl.Themes">
|
xmlns:themes="clr-namespace:HandyControl.Themes">
|
||||||
|
|
||||||
<ResourceDictionary.MergedDictionaries>
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:hc="clr-namespace:HandyControl.Controls"
|
xmlns:hc="clr-namespace:HandyControl.Controls"
|
||||||
xmlns:interactivity="clr-namespace:HandyControl.Interactivity"
|
xmlns:interactivity="clr-namespace:HandyControl.Interactivity"
|
||||||
xmlns:shell="http://schemas.microsoft.com/winfx/2006/xaml/presentation/shell"
|
xmlns:shell="clr-namespace:Microsoft.Windows.Shell"
|
||||||
xmlns:themes="clr-namespace:HandyControl.Themes">
|
xmlns:themes="clr-namespace:HandyControl.Themes">
|
||||||
|
|
||||||
<ResourceDictionary.MergedDictionaries>
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<UseWPF>true</UseWPF>
|
<UseWPF>true</UseWPF>
|
||||||
<AssemblyName>HandyControlDemoCode</AssemblyName>
|
<AssemblyName>HandyControlDemoCode</AssemblyName>
|
||||||
<RootNamespace>HandyControlDemoCode</RootNamespace>
|
<RootNamespace>HandyControlDemoCode</RootNamespace>
|
||||||
<TargetFrameworks>netcoreapp3.0;netcoreapp3.1;net40;net45;net462;net47;net48;net5.0</TargetFrameworks>
|
<TargetFrameworks>netcoreapp3.0;netcoreapp3.1;net35;net40;net45;net462;net47;net48;net5.0</TargetFrameworks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Window\AboutWindow.xaml">
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Window\AboutWindow.xaml">
|
||||||
|
@ -30,6 +30,201 @@
|
|||||||
<hc:EnumDataProvider x:Key="DemoTypes" Type="data:DemoType"/>
|
<hc:EnumDataProvider x:Key="DemoTypes" Type="data:DemoType"/>
|
||||||
<hc:EnumDataProvider x:Key="ShowAnimations" Type="hc:ShowAnimation"/>
|
<hc:EnumDataProvider x:Key="ShowAnimations" Type="hc:ShowAnimation"/>
|
||||||
<hc:EnumDataProvider x:Key="HatchStyles" Type="hc:HatchStyle"/>
|
<hc:EnumDataProvider x:Key="HatchStyles" Type="hc:HatchStyle"/>
|
||||||
|
|
||||||
|
<Style x:Key="CirclePanelButton" BasedOn="{StaticResource ButtonCustom}" TargetType="Button">
|
||||||
|
<!-- <Setter Property="UseLayoutRounding" Value="False"/> -->
|
||||||
|
<Setter Property="Height" Value="77"/>
|
||||||
|
<Setter Property="Width" Value="36.06"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="Button">
|
||||||
|
<hc:SimplePanel>
|
||||||
|
<Path Data="{StaticResource CirclePanelDemoGeometry}" Fill="{DynamicResource PrimaryBrush}" Height="77" Width="36.06"/>
|
||||||
|
<Path Data="{StaticResource CirclePanelRightGeometry}" Stretch="Uniform" Margin="12" Fill="White"/>
|
||||||
|
</hc:SimplePanel>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
|
<Setter Property="Opacity" Value=".9"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsPressed" Value="True">
|
||||||
|
<Setter Property="Opacity" Value=".6"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsEnabled" Value="False">
|
||||||
|
<Setter Property="Opacity" Value="0.4"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="TabItemTransparent" BasedOn="{StaticResource TabItemInLine}" TargetType="TabItem">
|
||||||
|
<Setter Property="Background" Value="Transparent"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ListBoxItemTransparent" BasedOn="{StaticResource ListBoxItemBaseStyle}" TargetType="ListBoxItem">
|
||||||
|
<Setter Property="Visibility" Value="{Binding IsVisible,Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
||||||
|
<Setter Property="hc:BorderElement.CornerRadius" Value="4"/>
|
||||||
|
<Setter Property="Background" Value="Transparent"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ListBoxItemNew" BasedOn="{StaticResource ListBoxItemTransparent}" TargetType="ListBoxItem">
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="ListBoxItem">
|
||||||
|
<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||||
|
<Path VerticalAlignment="Center" Data="{StaticResource NewGeometry}" Stretch="Uniform" Margin="10,0,0,0" Width="30" Height="14" Fill="{DynamicResource DangerBrush}"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="hc:EdgeElement.ShowEdgeContent" Value="true">
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="ListBoxItem">
|
||||||
|
<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<ContentControl Width="16" Height="16" Content="{Binding Path=(hc:EdgeElement.LeftContent),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
|
<ContentPresenter Margin="6,0,0,0" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||||
|
<Path VerticalAlignment="Center" Data="{StaticResource NewGeometry}" Stretch="Uniform" Margin="10,0,0,0" Width="30" Height="14" Fill="{DynamicResource DangerBrush}"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ListBoxTransparent" BasedOn="{StaticResource ListBoxBaseStyle}" TargetType="ListBox">
|
||||||
|
<Setter Property="Background" Value="Transparent"/>
|
||||||
|
<Setter Property="ItemContainerStyle" Value="{StaticResource ListBoxItemTransparent}"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<ItemsPanelTemplate x:Key="FluidMoveBehaviorWrapPanelItemsPanelTemplate">
|
||||||
|
<WrapPanel HorizontalAlignment="Center" VerticalAlignment="Center" hc:PanelElement.FluidMoveBehavior="{StaticResource BehaviorXY200}"/>
|
||||||
|
</ItemsPanelTemplate>
|
||||||
|
|
||||||
|
<Style x:Key="MessageBoxCustom" TargetType="hc:MessageBox" BasedOn="{StaticResource {x:Type hc:MessageBox}}">
|
||||||
|
<Setter Property="NonClientAreaBackground" Value="#262e2f"/>
|
||||||
|
<Setter Property="OtherButtonHoverBackground" Value="#888580"/>
|
||||||
|
<Setter Property="OtherButtonForeground" Value="White"/>
|
||||||
|
<Setter Property="OtherButtonHoverForeground" Value="White"/>
|
||||||
|
<Setter Property="NonClientAreaForeground" Value="White"/>
|
||||||
|
<Setter Property="CloseButtonForeground" Value="White"/>
|
||||||
|
<Setter Property="Icon" Value="/HandyControlDemo;component/Resources/Img/icon.ico"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="TextBlockFabricIcons" TargetType="TextBlock">
|
||||||
|
<Setter Property="FontFamily" Value="{StaticResource FabricIcons}"/>
|
||||||
|
<Setter Property="FontSize" Value="14"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style TargetType="hc:Sprite" BasedOn="{StaticResource {x:Type hc:Sprite}}">
|
||||||
|
<Setter Property="Padding" Value="25"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!-- <Storyboard x:Key="Custom1Transition" x:Shared="False">
|
||||||
|
<DoubleAnimation From="50" To="0" Duration="0:0:0.4" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
|
||||||
|
<DoubleAnimation.EasingFunction>
|
||||||
|
<ElasticEase Oscillations="1"/>
|
||||||
|
</DoubleAnimation.EasingFunction>
|
||||||
|
</DoubleAnimation>
|
||||||
|
</Storyboard>
|
||||||
|
|
||||||
|
<Storyboard x:Key="Custom2Transition" x:Shared="False">
|
||||||
|
<DoubleAnimation From="10" To="0" Duration="0:0:0.4" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
|
||||||
|
<DoubleAnimation.EasingFunction>
|
||||||
|
<ElasticEase Oscillations="1"/>
|
||||||
|
</DoubleAnimation.EasingFunction>
|
||||||
|
</DoubleAnimation>
|
||||||
|
</Storyboard>
|
||||||
|
|
||||||
|
<Storyboard x:Key="Custom3Transition" x:Shared="False">
|
||||||
|
<DoubleAnimation From=".8" To="1" Duration="0:0:0.4" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
|
||||||
|
<DoubleAnimation.EasingFunction>
|
||||||
|
<ElasticEase Oscillations="1"/>
|
||||||
|
</DoubleAnimation.EasingFunction>
|
||||||
|
</DoubleAnimation>
|
||||||
|
</Storyboard> -->
|
||||||
|
|
||||||
|
<!-- <Style x:Key="TextEditorCustom" TargetType="avalonedit:TextEditor">
|
||||||
|
<Setter Property="IsReadOnly" Value="True"/>
|
||||||
|
<Setter Property="FontFamily" Value="Consolas"/>
|
||||||
|
<Setter Property="Margin" Value="4"/>
|
||||||
|
<Setter Property="ShowLineNumbers" Value="True"/>
|
||||||
|
<Setter Property="LineNumbersForeground" Value="{DynamicResource EditorLineNumbersForeground}"/>
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource EditorForeground}"/>
|
||||||
|
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="avalonedit:TextEditor">
|
||||||
|
<ControlTemplate.Resources>
|
||||||
|
<Style TargetType="avalonedit:TextView">
|
||||||
|
<Setter Property="NonPrintableCharacterBrush" Value="{DynamicResource EditorNonPrintableCharacterBrush}" />
|
||||||
|
<Setter Property="LinkTextForegroundBrush" Value="{DynamicResource EditorLinkTextForegroundBrush}" />
|
||||||
|
<Setter Property="LinkTextBackgroundBrush" Value="{DynamicResource EditorLinkTextBackgroundBrush}" />
|
||||||
|
</Style>
|
||||||
|
<Style TargetType="avalonedit:TextArea">
|
||||||
|
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
|
||||||
|
<Setter Property="SelectionBrush" Value="{DynamicResource EditorSelectionBrush}" />
|
||||||
|
<Setter Property="SelectionBorder">
|
||||||
|
<Setter.Value>
|
||||||
|
<Pen Brush="{DynamicResource EditorSelectionBorder}" Thickness="1" />
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
<Setter Property="SelectionCornerRadius" Value="0" />
|
||||||
|
<Setter Property="SelectionForeground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}" />
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="avalonedit:TextArea">
|
||||||
|
<DockPanel Focusable="False">
|
||||||
|
<ItemsControl DockPanel.Dock="Left" Focusable="False" ItemsSource="{Binding LeftMargins,RelativeSource={RelativeSource TemplatedParent}}">
|
||||||
|
<ItemsControl.ItemsPanel>
|
||||||
|
<ItemsPanelTemplate>
|
||||||
|
<StackPanel Orientation="Horizontal" />
|
||||||
|
</ItemsPanelTemplate>
|
||||||
|
</ItemsControl.ItemsPanel>
|
||||||
|
</ItemsControl>
|
||||||
|
<ContentPresenter Panel.ZIndex="-1" Content="{Binding TextView,RelativeSource={RelativeSource TemplatedParent}}" Focusable="False" />
|
||||||
|
</DockPanel>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
</ControlTemplate.Resources>
|
||||||
|
<Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
|
||||||
|
<ScrollViewer Name="PART_ScrollViewer" Padding="{TemplateBinding Padding}" HorizontalContentAlignment="Left" VerticalContentAlignment="Top" CanContentScroll="True" Content="{Binding TextArea,RelativeSource={RelativeSource TemplatedParent}}" Focusable="False" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" />
|
||||||
|
</Border>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="WordWrap" Value="True">
|
||||||
|
<Setter TargetName="PART_ScrollViewer" Property="HorizontalScrollBarVisibility" Value="Disabled" />
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style> -->
|
||||||
|
|
||||||
|
<Style x:Key="Path4GeometryItem" BasedOn="{StaticResource {x:Type Path}}" TargetType="Path">
|
||||||
|
<Setter Property="Margin" Value="10"/>
|
||||||
|
<Setter Property="Data" Value="{Binding Info.Data,RelativeSource={RelativeSource AncestorType=Border}}"/>
|
||||||
|
<Setter Property="Fill" Value="{DynamicResource PrimaryBrush}"/>
|
||||||
|
<Setter Property="Width" Value="20"/>
|
||||||
|
<Setter Property="Height" Value="20"/>
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<DataTrigger Binding="{Binding Info.Line,RelativeSource={RelativeSource AncestorType=Border}}" Value="True">
|
||||||
|
<Setter Property="Fill" Value="{x:Null}"/>
|
||||||
|
<Setter Property="Stroke" Value="{DynamicResource PrimaryBrush}"/>
|
||||||
|
</DataTrigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
</Application.Resources>
|
</Application.Resources>
|
||||||
</Application>
|
</Application>
|
||||||
|
@ -3,7 +3,7 @@ using System.Diagnostics;
|
|||||||
using System.Diagnostics.CodeAnalysis;
|
using System.Diagnostics.CodeAnalysis;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
#if !NET40
|
#if !NET35 && !NET40
|
||||||
using System.Runtime;
|
using System.Runtime;
|
||||||
#endif
|
#endif
|
||||||
using System.Security.Authentication;
|
using System.Security.Authentication;
|
||||||
@ -26,7 +26,7 @@ namespace HandyControlDemo
|
|||||||
|
|
||||||
public App()
|
public App()
|
||||||
{
|
{
|
||||||
#if !NET40
|
#if !NET35 && !NET40
|
||||||
var cachePath = $"{AppDomain.CurrentDomain.BaseDirectory}Cache";
|
var cachePath = $"{AppDomain.CurrentDomain.BaseDirectory}Cache";
|
||||||
if (!Directory.Exists(cachePath))
|
if (!Directory.Exists(cachePath))
|
||||||
{
|
{
|
||||||
|
115
src/Shared/HandyControlDemo_Shared/Data/DemoInfo_Net_35.json
Normal file
115
src/Shared/HandyControlDemo_Shared/Data/DemoInfo_Net_35.json
Normal file
@ -0,0 +1,115 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"title": "Styles",
|
||||||
|
"selectedIndex": -1,
|
||||||
|
"demoItemList": [
|
||||||
|
[ "Brush", "BrushDemoCtl", "Brush_16x", "" ],
|
||||||
|
[ "Button", "ButtonDemoCtl", "ButtonClick_16x", "" ],
|
||||||
|
[ "RepeatButton", "RepeatButtonDemoCtl", "RepeatButton_16x", "" ],
|
||||||
|
[ "ToggleButton", "ToggleButtonDemoCtl", "Toggle_16x", "" ],
|
||||||
|
[ "RadioButton", "RadioButtonDemoCtl", "RadioButton_16x", "" ],
|
||||||
|
[ "CheckBox", "CheckBoxDemoCtl", "CheckBox_16x", "" ],
|
||||||
|
[ "ScrollViewer", "NativeScrollViewerDemoCtl", "ScrollBox_16x", "" ],
|
||||||
|
[ "Slider", "SliderDemoCtl", "Slider_16x", "" ],
|
||||||
|
[ "TextBlock", "TextBlockDemoCtl", "TextBlock_16x", "" ],
|
||||||
|
[ "TextBox", "NativeTextBoxDemoCtl", "TextBox_16x", "" ],
|
||||||
|
[ "ComboBox", "NativeComboBoxDemoCtl", "ComboBox_16x", "" ],
|
||||||
|
[ "PasswordBox", "NativePasswordBoxDemoCtl", "PasswordBox_16x", "" ],
|
||||||
|
[ "Expander", "ExpanderDemoCtl", "Expander_16x", "" ],
|
||||||
|
[ "ProgressBar", "NativeProgressBarDemoCtl", "ProgressBar_16x", "" ],
|
||||||
|
[ "TabControl", "NativeTabControlDemoCtl", "TabPage_16x", "" ],
|
||||||
|
[ "TreeView", "TreeViewDemoCtl", "TreeView_16x", "" ],
|
||||||
|
[ "ListBox", "ListBoxDemoCtl", "ListBox_16x", "" ],
|
||||||
|
[ "ListView", "ListViewDemoCtl", "ListView_16x", "" ],
|
||||||
|
[ "GroupBox", "GroupBoxDemoCtl", "GroupBox_16x", "" ],
|
||||||
|
[ "Menu", "MenuDemoCtl", "ContextMenu_16x", "" ],
|
||||||
|
[ "RichTextBox", "RichTextBoxDemoCtl", "RichTextBox_16x", "" ],
|
||||||
|
[ "FlowDocument", "FlowDocumentDemoCtl", "WPFFlowDocument_16x", "" ],
|
||||||
|
[ "ToolBar", "ToolBarDemoCtl", "ToolBar_16x", "" ],
|
||||||
|
[ "Border", "BorderDemoCtl", "BorderElement_16x", "" ],
|
||||||
|
[ "Label", "LabelDemoCtl", "Label_16x", "" ],
|
||||||
|
[ "Frame", "FrameDemoCtl", "frame_16xLG", "" ],
|
||||||
|
[ "Window", "NativeWindowDemoCtl", "WindowsForm_16x", "" ],
|
||||||
|
[ "Geometry", "GeometryDemoCtl", "Path_16x", "1" ]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Controls",
|
||||||
|
"selectedIndex": 0,
|
||||||
|
"demoItemList": [
|
||||||
|
[ "FloatingBlock", "FloatingBlockDemoCtl", "thumbs_up", "" ],
|
||||||
|
[ "PropertyGrid", "PropertyGridDemoCtl", "PropertyGridEditorPart_16x", "1" ],
|
||||||
|
[ "ImageSelector", "ImageSelectorDemoCtl", "Image_16x", "1" ],
|
||||||
|
[ "ImageBlock", "ImageBlockDemoCtl", "ImageStack_16x", "" ],
|
||||||
|
[ "Magnifier", "MagnifierDemoCtl", "Search_16x", "" ],
|
||||||
|
[ "Gravatar", "GravatarDemoCtl", "User_16x", "" ],
|
||||||
|
[ "Badge", "BadgeDemoCtl", "DotLarge_16x", "" ],
|
||||||
|
[ "GotoTop", "GotoTopDemoCtl", "GoToTop_16x", "" ],
|
||||||
|
[ "SplitButton", "SplitButtonDemoCtl", "SplitButton_16x", "" ],
|
||||||
|
[ "ButtonGroup", "ButtonGroupDemoCtl", "ButtonGroup_16x", "" ],
|
||||||
|
[ "ProgressButton", "ProgressButtonDemoCtl", "ProgressButton_16x", "" ],
|
||||||
|
[ "ChatBubble", "ChatBubbleDemoCtl", "Bubble_16xLG", "" ],
|
||||||
|
[ "Poptip", "PoptipDemoCtl", "PopupCursor_16x", "" ],
|
||||||
|
[ "NotifyIcon", "NotifyIconDemoCtl", "NotificationHub_16x", "" ],
|
||||||
|
[ "NumericUpDown", "NumericUpDownDemoCtl", "NumericListBox_16x", "" ],
|
||||||
|
[ "TextBox", "TextBoxDemoCtl", "TextBox_16x", "" ],
|
||||||
|
[ "ComboBox", "ComboBoxDemoCtl", "ComboBox_16x", "" ],
|
||||||
|
[ "CheckComboBox", "CheckComboBoxDemoCtl", "CheckBoxList_16x", "1" ],
|
||||||
|
[ "PasswordBox", "PasswordBoxDemoCtl", "PasswordBox_16x", "" ],
|
||||||
|
[ "PinBox", "PinBoxDemoCtl", "Ellipsis_16x", "" ],
|
||||||
|
[ "Clock", "ClockDemoCtl", "Time_color_16x", "" ],
|
||||||
|
[ "TimePicker", "TimePickerDemoCtl", "TimePicker_16x", "" ],
|
||||||
|
[ "Transfer", "TransferDemoCtl", "Transfer_16x", "" ],
|
||||||
|
[ "FlipClock", "FlipClockDemoCtl", "FlipVertical_16x", "" ],
|
||||||
|
[ "Rate", "RateDemoCtl", "Star", "" ],
|
||||||
|
[ "Shield", "ShieldDemoCtl", "Shield_16x", "" ],
|
||||||
|
[ "SearchBar", "SearchBarDemoCtl", "Search_16x", "" ],
|
||||||
|
[ "Tag", "TagDemoCtl", "Tag_16x", "" ],
|
||||||
|
[ "GifImage", "GifImageDemoCtl", "Animation_16x", "" ],
|
||||||
|
[ "OutlineText", "OutlineTextDemoCtl", "TextBlock_16x", "" ],
|
||||||
|
[ "RunningBlock", "RunningBlockDemoCtl", "Dynamic_16x", "" ],
|
||||||
|
[ "Card", "CardDemoCtl", "VSO_Card_16x", "" ],
|
||||||
|
[ "Divider", "DividerDemoCtl", "DottedSplitter_16x", "" ],
|
||||||
|
[ "CirclePanel", "CirclePanelDemoCtl", "ColorWheel_16x", "" ],
|
||||||
|
[ "Grid", "GridDemoCtl", "GridPane_16x", "" ],
|
||||||
|
[ "FlexPanel", "FlexPanelDemoCtl", "layout-FlexLayout-16", "1" ],
|
||||||
|
[ "RelativePanel", "RelativePanelDemoCtl", "TransformRelative_16x", "" ],
|
||||||
|
[ "WaterfallPanel", "WaterfallPanelDemoCtl", "Panel_16x", "" ],
|
||||||
|
[ "HoneycombPanel", "HoneycombPanelDemoCtl", "PolygonHexagon_16x", "" ],
|
||||||
|
[ "TransitioningContentControl", "TransitioningContentControlDemoCtl", "TransitioningContentControl_16x", "" ],
|
||||||
|
[ "Drawer", "DrawerDemoCtl", "View_Portrait_16x", "" ],
|
||||||
|
[ "CoverView", "CoverViewDemoCtl", "DetailDataView_16x", "" ],
|
||||||
|
[ "CoverFlow", "CoverFlowDemoCtl", "LinearCarousel_16x", "" ],
|
||||||
|
[ "ProgressBar", "ProgressBarDemoCtl", "ProgressBar_16x", "" ],
|
||||||
|
[ "StepBar", "StepBarDemoCtl", "Flow_16x", "" ],
|
||||||
|
[ "Growl", "GrowlDemoCtl", "Message_16x", "" ],
|
||||||
|
[ "Loading", "LoadingDemoCtl", "Loading_Blue_16x", "" ],
|
||||||
|
[ "ImageBrowser", "ImageBrowserDemoCtl", "ImageBrowser_16x", "" ],
|
||||||
|
[ "ColorPicker", "ColorPickerDemoCtl", "ColorPalette_16x", "" ],
|
||||||
|
[ "Carousel", "CarouselDemoCtl", "Carousel_16x", "" ],
|
||||||
|
[ "CompareSlider", "CompareSliderDemoCtl", "SplitterControl_16x", "" ],
|
||||||
|
[ "PreviewSlider", "PreviewSliderDemoCtl", "HoverMenu_16x", "" ],
|
||||||
|
[ "RangeSlider", "RangeSliderDemoCtl", "brackets_Square_16xLG", "" ],
|
||||||
|
[ "TimeBar", "TimeBarDemoCtl", "Timeline_16x", "" ],
|
||||||
|
[ "Pagination", "PaginationDemoCtl", "Paginator_16x", "" ],
|
||||||
|
[ "AnimationPath", "AnimationPathDemoCtl", "Path_16x", "" ],
|
||||||
|
[ "TabControl", "TabControlDemoCtl", "TabPage_16x", "" ],
|
||||||
|
[ "SideMenu", "SideMenuDemoCtl", "MainMenuControl_16x", "" ],
|
||||||
|
[ "ScrollViewer", "ScrollViewerDemoCtl", "ScrollBox_16x", "" ],
|
||||||
|
[ "Sprite", "SpriteDemoCtl", "HandyControl", "" ],
|
||||||
|
[ "Notification", "NotificationDemoCtl", "Procedure_16x", "" ],
|
||||||
|
[ "Dialog", "DialogDemoCtl", "Dialog_16x", "" ],
|
||||||
|
[ "Screenshot", "ScreenshotDemoCtl", "WindowScreenshot_16x", "1" ],
|
||||||
|
[ "Window", "WindowDemoCtl", "WindowsForm_16x", "" ]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Tools",
|
||||||
|
"selectedIndex": 0,
|
||||||
|
"demoItemList": [
|
||||||
|
[ "HatchBrushGenerator", "HatchBrushGeneratorDemoCtl", "DataGenerator_16x", "" ],
|
||||||
|
[ "Morphing_Animation", "GeometryAnimationDemoCtl", "Animation_16x", "" ],
|
||||||
|
[ "Effects", "EffectsDemoCtl", "Effects_16x", "" ]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
@ -1,5 +1,6 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using GalaSoft.MvvmLight;
|
using GalaSoft.MvvmLight;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace HandyControlDemo.Data
|
namespace HandyControlDemo.Data
|
||||||
{
|
{
|
||||||
@ -9,10 +10,11 @@ namespace HandyControlDemo.Data
|
|||||||
|
|
||||||
private string _title;
|
private string _title;
|
||||||
|
|
||||||
|
[JsonProperty("title")]
|
||||||
public string Title
|
public string Title
|
||||||
{
|
{
|
||||||
get => _title;
|
get => _title;
|
||||||
#if NET40
|
#if NET35 || NET40
|
||||||
set => Set(nameof(Title), ref _title, value);
|
set => Set(nameof(Title), ref _title, value);
|
||||||
#else
|
#else
|
||||||
set => Set(ref _title, value);
|
set => Set(ref _title, value);
|
||||||
@ -21,16 +23,21 @@ namespace HandyControlDemo.Data
|
|||||||
|
|
||||||
private int _selectedIndex;
|
private int _selectedIndex;
|
||||||
|
|
||||||
|
[JsonProperty("selectedIndex")]
|
||||||
public int SelectedIndex
|
public int SelectedIndex
|
||||||
{
|
{
|
||||||
get => _selectedIndex;
|
get => _selectedIndex;
|
||||||
#if NET40
|
#if NET35 || NET40
|
||||||
set => Set(nameof(SelectedIndex), ref _selectedIndex, value);
|
set => Set(nameof(SelectedIndex), ref _selectedIndex, value);
|
||||||
#else
|
#else
|
||||||
set => Set(ref _selectedIndex, value);
|
set => Set(ref _selectedIndex, value);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[JsonIgnore]
|
||||||
public IList<DemoItemModel> DemoItemList { get; set; }
|
public IList<DemoItemModel> DemoItemList { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("demoItemList")]
|
||||||
|
public IList<List<string>> DemoItemStrList { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -17,7 +17,7 @@ namespace HandyControlDemo.Data
|
|||||||
public bool IsVisible
|
public bool IsVisible
|
||||||
{
|
{
|
||||||
get => _isVisible;
|
get => _isVisible;
|
||||||
#if NET40
|
#if NET35 || NET40
|
||||||
set => Set(nameof(IsVisible), ref _isVisible, value);
|
set => Set(nameof(IsVisible), ref _isVisible, value);
|
||||||
#else
|
#else
|
||||||
set => Set(ref _isVisible, value);
|
set => Set(ref _isVisible, value);
|
||||||
|
@ -8,199 +8,6 @@
|
|||||||
<ResourceDictionary Source="../Basic/Fonts.xaml"/>
|
<ResourceDictionary Source="../Basic/Fonts.xaml"/>
|
||||||
</ResourceDictionary.MergedDictionaries>
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
|
||||||
<Style x:Key="CirclePanelButton" BasedOn="{StaticResource ButtonCustom}" TargetType="Button">
|
|
||||||
<Setter Property="UseLayoutRounding" Value="False"/>
|
|
||||||
<Setter Property="Height" Value="77"/>
|
|
||||||
<Setter Property="Width" Value="36.06"/>
|
|
||||||
<Setter Property="Template">
|
|
||||||
<Setter.Value>
|
|
||||||
<ControlTemplate TargetType="Button">
|
|
||||||
<hc:SimplePanel>
|
|
||||||
<Path Data="{StaticResource CirclePanelDemoGeometry}" Fill="{DynamicResource PrimaryBrush}" Height="77" Width="36.06"/>
|
|
||||||
<Path Data="{StaticResource CirclePanelRightGeometry}" Stretch="Uniform" Margin="12" Fill="White"/>
|
|
||||||
</hc:SimplePanel>
|
|
||||||
<ControlTemplate.Triggers>
|
|
||||||
<Trigger Property="IsMouseOver" Value="True">
|
|
||||||
<Setter Property="Opacity" Value=".9"/>
|
|
||||||
</Trigger>
|
|
||||||
<Trigger Property="IsPressed" Value="True">
|
|
||||||
<Setter Property="Opacity" Value=".6"/>
|
|
||||||
</Trigger>
|
|
||||||
<Trigger Property="IsEnabled" Value="False">
|
|
||||||
<Setter Property="Opacity" Value="0.4"/>
|
|
||||||
</Trigger>
|
|
||||||
</ControlTemplate.Triggers>
|
|
||||||
</ControlTemplate>
|
|
||||||
</Setter.Value>
|
|
||||||
</Setter>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style x:Key="TabItemTransparent" BasedOn="{StaticResource TabItemInLine}" TargetType="TabItem">
|
|
||||||
<Setter Property="Background" Value="Transparent"/>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style x:Key="ListBoxItemTransparent" BasedOn="{StaticResource ListBoxItemBaseStyle}" TargetType="ListBoxItem">
|
|
||||||
<Setter Property="Visibility" Value="{Binding IsVisible,Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
|
||||||
<Setter Property="hc:BorderElement.CornerRadius" Value="4"/>
|
|
||||||
<Setter Property="Background" Value="Transparent"/>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style x:Key="ListBoxItemNew" BasedOn="{StaticResource ListBoxItemTransparent}" TargetType="ListBoxItem">
|
|
||||||
<Setter Property="Template">
|
|
||||||
<Setter.Value>
|
|
||||||
<ControlTemplate TargetType="ListBoxItem">
|
|
||||||
<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
|
|
||||||
<StackPanel Orientation="Horizontal">
|
|
||||||
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
|
||||||
<Path VerticalAlignment="Center" Data="{StaticResource NewGeometry}" Stretch="Uniform" Margin="10,0,0,0" Width="30" Height="14" Fill="{DynamicResource DangerBrush}"/>
|
|
||||||
</StackPanel>
|
|
||||||
</Border>
|
|
||||||
</ControlTemplate>
|
|
||||||
</Setter.Value>
|
|
||||||
</Setter>
|
|
||||||
<Style.Triggers>
|
|
||||||
<Trigger Property="hc:EdgeElement.ShowEdgeContent" Value="true">
|
|
||||||
<Setter Property="Template">
|
|
||||||
<Setter.Value>
|
|
||||||
<ControlTemplate TargetType="ListBoxItem">
|
|
||||||
<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
|
|
||||||
<StackPanel Orientation="Horizontal">
|
|
||||||
<ContentControl Width="16" Height="16" Content="{Binding Path=(hc:EdgeElement.LeftContent),RelativeSource={RelativeSource TemplatedParent}}"/>
|
|
||||||
<ContentPresenter Margin="6,0,0,0" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
|
||||||
<Path VerticalAlignment="Center" Data="{StaticResource NewGeometry}" Stretch="Uniform" Margin="10,0,0,0" Width="30" Height="14" Fill="{DynamicResource DangerBrush}"/>
|
|
||||||
</StackPanel>
|
|
||||||
</Border>
|
|
||||||
</ControlTemplate>
|
|
||||||
</Setter.Value>
|
|
||||||
</Setter>
|
|
||||||
</Trigger>
|
|
||||||
</Style.Triggers>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style x:Key="ListBoxTransparent" BasedOn="{StaticResource ListBoxBaseStyle}" TargetType="ListBox">
|
|
||||||
<Setter Property="Background" Value="Transparent"/>
|
|
||||||
<Setter Property="ItemContainerStyle" Value="{StaticResource ListBoxItemTransparent}"/>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<ItemsPanelTemplate x:Key="FluidMoveBehaviorWrapPanelItemsPanelTemplate">
|
|
||||||
<WrapPanel HorizontalAlignment="Center" VerticalAlignment="Center" hc:PanelElement.FluidMoveBehavior="{StaticResource BehaviorXY200}"/>
|
|
||||||
</ItemsPanelTemplate>
|
|
||||||
|
|
||||||
<Style x:Key="MessageBoxCustom" TargetType="hc:MessageBox" BasedOn="{StaticResource {x:Type hc:MessageBox}}">
|
|
||||||
<Setter Property="NonClientAreaBackground" Value="#262e2f"/>
|
|
||||||
<Setter Property="OtherButtonHoverBackground" Value="#888580"/>
|
|
||||||
<Setter Property="OtherButtonForeground" Value="White"/>
|
|
||||||
<Setter Property="OtherButtonHoverForeground" Value="White"/>
|
|
||||||
<Setter Property="NonClientAreaForeground" Value="White"/>
|
|
||||||
<Setter Property="CloseButtonForeground" Value="White"/>
|
|
||||||
<Setter Property="Icon" Value="/HandyControlDemo;component/Resources/Img/icon.ico"/>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style x:Key="TextBlockFabricIcons" TargetType="TextBlock">
|
|
||||||
<Setter Property="FontFamily" Value="{StaticResource FabricIcons}"/>
|
|
||||||
<Setter Property="FontSize" Value="14"/>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style TargetType="hc:Sprite" BasedOn="{StaticResource {x:Type hc:Sprite}}">
|
|
||||||
<Setter Property="Padding" Value="25"/>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Storyboard x:Key="Custom1Transition" x:Shared="False">
|
|
||||||
<DoubleAnimation From="50" To="0" Duration="0:0:0.4" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
|
|
||||||
<DoubleAnimation.EasingFunction>
|
|
||||||
<ElasticEase Oscillations="1"/>
|
|
||||||
</DoubleAnimation.EasingFunction>
|
|
||||||
</DoubleAnimation>
|
|
||||||
</Storyboard>
|
|
||||||
|
|
||||||
<Storyboard x:Key="Custom2Transition" x:Shared="False">
|
|
||||||
<DoubleAnimation From="10" To="0" Duration="0:0:0.4" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
|
|
||||||
<DoubleAnimation.EasingFunction>
|
|
||||||
<ElasticEase Oscillations="1"/>
|
|
||||||
</DoubleAnimation.EasingFunction>
|
|
||||||
</DoubleAnimation>
|
|
||||||
</Storyboard>
|
|
||||||
|
|
||||||
<Storyboard x:Key="Custom3Transition" x:Shared="False">
|
|
||||||
<DoubleAnimation From=".8" To="1" Duration="0:0:0.4" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
|
|
||||||
<DoubleAnimation.EasingFunction>
|
|
||||||
<ElasticEase Oscillations="1"/>
|
|
||||||
</DoubleAnimation.EasingFunction>
|
|
||||||
</DoubleAnimation>
|
|
||||||
</Storyboard>
|
|
||||||
|
|
||||||
<Style x:Key="TextEditorCustom" TargetType="avalonedit:TextEditor">
|
|
||||||
<Setter Property="IsReadOnly" Value="True"/>
|
|
||||||
<Setter Property="FontFamily" Value="Consolas"/>
|
|
||||||
<Setter Property="Margin" Value="4"/>
|
|
||||||
<Setter Property="ShowLineNumbers" Value="True"/>
|
|
||||||
<Setter Property="LineNumbersForeground" Value="{DynamicResource EditorLineNumbersForeground}"/>
|
|
||||||
<Setter Property="Foreground" Value="{DynamicResource EditorForeground}"/>
|
|
||||||
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
|
|
||||||
<Setter Property="Template">
|
|
||||||
<Setter.Value>
|
|
||||||
<ControlTemplate TargetType="avalonedit:TextEditor">
|
|
||||||
<ControlTemplate.Resources>
|
|
||||||
<Style TargetType="avalonedit:TextView">
|
|
||||||
<Setter Property="NonPrintableCharacterBrush" Value="{DynamicResource EditorNonPrintableCharacterBrush}" />
|
|
||||||
<Setter Property="LinkTextForegroundBrush" Value="{DynamicResource EditorLinkTextForegroundBrush}" />
|
|
||||||
<Setter Property="LinkTextBackgroundBrush" Value="{DynamicResource EditorLinkTextBackgroundBrush}" />
|
|
||||||
</Style>
|
|
||||||
<Style TargetType="avalonedit:TextArea">
|
|
||||||
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
|
|
||||||
<Setter Property="SelectionBrush" Value="{DynamicResource EditorSelectionBrush}" />
|
|
||||||
<Setter Property="SelectionBorder">
|
|
||||||
<Setter.Value>
|
|
||||||
<Pen Brush="{DynamicResource EditorSelectionBorder}" Thickness="1" />
|
|
||||||
</Setter.Value>
|
|
||||||
</Setter>
|
|
||||||
<Setter Property="SelectionCornerRadius" Value="0" />
|
|
||||||
<Setter Property="SelectionForeground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}" />
|
|
||||||
<Setter Property="Template">
|
|
||||||
<Setter.Value>
|
|
||||||
<ControlTemplate TargetType="avalonedit:TextArea">
|
|
||||||
<DockPanel Focusable="False">
|
|
||||||
<ItemsControl DockPanel.Dock="Left" Focusable="False" ItemsSource="{Binding LeftMargins,RelativeSource={RelativeSource TemplatedParent}}">
|
|
||||||
<ItemsControl.ItemsPanel>
|
|
||||||
<ItemsPanelTemplate>
|
|
||||||
<StackPanel Orientation="Horizontal" />
|
|
||||||
</ItemsPanelTemplate>
|
|
||||||
</ItemsControl.ItemsPanel>
|
|
||||||
</ItemsControl>
|
|
||||||
<ContentPresenter Panel.ZIndex="-1" Content="{Binding TextView,RelativeSource={RelativeSource TemplatedParent}}" Focusable="False" />
|
|
||||||
</DockPanel>
|
|
||||||
</ControlTemplate>
|
|
||||||
</Setter.Value>
|
|
||||||
</Setter>
|
|
||||||
</Style>
|
|
||||||
</ControlTemplate.Resources>
|
|
||||||
<Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
|
|
||||||
<ScrollViewer Name="PART_ScrollViewer" Padding="{TemplateBinding Padding}" HorizontalContentAlignment="Left" VerticalContentAlignment="Top" CanContentScroll="True" Content="{Binding TextArea,RelativeSource={RelativeSource TemplatedParent}}" Focusable="False" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" />
|
|
||||||
</Border>
|
|
||||||
<ControlTemplate.Triggers>
|
|
||||||
<Trigger Property="WordWrap" Value="True">
|
|
||||||
<Setter TargetName="PART_ScrollViewer" Property="HorizontalScrollBarVisibility" Value="Disabled" />
|
|
||||||
</Trigger>
|
|
||||||
</ControlTemplate.Triggers>
|
|
||||||
</ControlTemplate>
|
|
||||||
</Setter.Value>
|
|
||||||
</Setter>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style x:Key="Path4GeometryItem" BasedOn="{StaticResource {x:Type Path}}" TargetType="Path">
|
|
||||||
<Setter Property="Margin" Value="10"/>
|
|
||||||
<Setter Property="Data" Value="{Binding Info.Data,RelativeSource={RelativeSource AncestorType=Border}}"/>
|
|
||||||
<Setter Property="Fill" Value="{DynamicResource PrimaryBrush}"/>
|
|
||||||
<Setter Property="Width" Value="20"/>
|
|
||||||
<Setter Property="Height" Value="20"/>
|
|
||||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
|
||||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
||||||
<Style.Triggers>
|
|
||||||
<DataTrigger Binding="{Binding Info.Line,RelativeSource={RelativeSource AncestorType=Border}}" Value="True">
|
|
||||||
<Setter Property="Fill" Value="{x:Null}"/>
|
|
||||||
<Setter Property="Stroke" Value="{DynamicResource PrimaryBrush}"/>
|
|
||||||
</DataTrigger>
|
|
||||||
</Style.Triggers>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
@ -118,8 +118,13 @@ namespace HandyControlDemo.Service
|
|||||||
var client = new WebClient();
|
var client = new WebClient();
|
||||||
client.Headers.Add("User-Agent", "request");
|
client.Headers.Add("User-Agent", "request");
|
||||||
var list = new List<AvatarModel>();
|
var list = new List<AvatarModel>();
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
#if NET35
|
||||||
|
var json = client.DownloadString(new Uri("https://api.github.com/repos/nabian/handycontrol/contributors"));
|
||||||
|
list = JsonConvert.DeserializeObject<List<AvatarModel>>(json);
|
||||||
|
#else
|
||||||
var json = client.DownloadString(new Uri("https://api.github.com/repos/nabian/handycontrol/contributors"));
|
var json = client.DownloadString(new Uri("https://api.github.com/repos/nabian/handycontrol/contributors"));
|
||||||
var objList = JsonConvert.DeserializeObject<List<dynamic>>(json);
|
var objList = JsonConvert.DeserializeObject<List<dynamic>>(json);
|
||||||
list.AddRange(objList.Select(item => new AvatarModel
|
list.AddRange(objList.Select(item => new AvatarModel
|
||||||
@ -128,8 +133,9 @@ namespace HandyControlDemo.Service
|
|||||||
AvatarUri = item.avatar_url,
|
AvatarUri = item.avatar_url,
|
||||||
Link = item.html_url
|
Link = item.html_url
|
||||||
}));
|
}));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
catch(Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
HandyControl.Controls.MessageBox.Error(e.Message, Lang.Error);
|
HandyControl.Controls.MessageBox.Error(e.Message, Lang.Error);
|
||||||
}
|
}
|
||||||
@ -363,7 +369,11 @@ namespace HandyControlDemo.Service
|
|||||||
{
|
{
|
||||||
var infoList = new List<DemoInfoModel>();
|
var infoList = new List<DemoInfoModel>();
|
||||||
|
|
||||||
|
#if NET35
|
||||||
|
var stream = Application.GetResourceStream(new Uri("Data/DemoInfo_Net_35.json", UriKind.Relative))?.Stream;
|
||||||
|
#else
|
||||||
var stream = Application.GetResourceStream(new Uri("Data/DemoInfo.json", UriKind.Relative))?.Stream;
|
var stream = Application.GetResourceStream(new Uri("Data/DemoInfo.json", UriKind.Relative))?.Stream;
|
||||||
|
#endif
|
||||||
if (stream == null) return infoList;
|
if (stream == null) return infoList;
|
||||||
|
|
||||||
string jsonStr;
|
string jsonStr;
|
||||||
@ -372,45 +382,22 @@ namespace HandyControlDemo.Service
|
|||||||
jsonStr = reader.ReadToEnd();
|
jsonStr = reader.ReadToEnd();
|
||||||
}
|
}
|
||||||
|
|
||||||
var jsonObj = JsonConvert.DeserializeObject<dynamic>(jsonStr);
|
infoList = JsonConvert.DeserializeObject<List<DemoInfoModel>>(jsonStr);
|
||||||
foreach (var item in jsonObj)
|
foreach (var demoInfo in infoList)
|
||||||
{
|
{
|
||||||
var titleKey = (string) item.title;
|
demoInfo.DemoItemList = Convert2DemoItemList(demoInfo.DemoItemStrList);
|
||||||
var title = titleKey;
|
|
||||||
var list = Convert2DemoItemList(item.demoItemList);
|
|
||||||
infoList.Add(new DemoInfoModel
|
|
||||||
{
|
|
||||||
Key = titleKey,
|
|
||||||
Title = title,
|
|
||||||
DemoItemList = list,
|
|
||||||
SelectedIndex = (int) item.selectedIndex
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return infoList;
|
return infoList;
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<DemoItemModel> Convert2DemoItemList(dynamic list)
|
private static List<DemoItemModel> Convert2DemoItemList(IEnumerable<List<string>> list)
|
||||||
{
|
=> list.Select(item => new DemoItemModel
|
||||||
var resultList = new List<DemoItemModel>();
|
|
||||||
|
|
||||||
foreach (var item in list)
|
|
||||||
{
|
{
|
||||||
var name = (string)item[0];
|
Name = item[0],
|
||||||
string targetCtlName = item[1];
|
TargetCtlName = item[1],
|
||||||
string imageName = item[2];
|
ImageName = $"../../Resources/Img/LeftMainContent/{item[2]}.png",
|
||||||
var isNew = !string.IsNullOrEmpty((string)item[3]);
|
IsNew = !string.IsNullOrEmpty(item[3])
|
||||||
|
}).ToList();
|
||||||
resultList.Add(new DemoItemModel
|
|
||||||
{
|
|
||||||
Name = name,
|
|
||||||
TargetCtlName = targetCtlName,
|
|
||||||
ImageName = $"../../Resources/Img/LeftMainContent/{imageName}.png",
|
|
||||||
IsNew = isNew
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
return resultList;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -11,7 +11,9 @@ namespace HandyControlDemo.UserControl
|
|||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
var animation = AnimationHelper.CreateAnimation(100, 5000);
|
var animation = AnimationHelper.CreateAnimation(100, 5000);
|
||||||
|
#if !NET35
|
||||||
animation.EasingFunction = null;
|
animation.EasingFunction = null;
|
||||||
|
#endif
|
||||||
animation.Completed += Animation_Completed;
|
animation.Completed += Animation_Completed;
|
||||||
ProgressBarTimer.BeginAnimation(RangeBase.ValueProperty, animation);
|
ProgressBarTimer.BeginAnimation(RangeBase.ValueProperty, animation);
|
||||||
}
|
}
|
||||||
|
@ -40,10 +40,10 @@
|
|||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
<TextBlock FontSize="16" FontWeight="Bold" HorizontalAlignment="Left">
|
<TextBlock FontSize="16" FontWeight="Bold" HorizontalAlignment="Left">
|
||||||
<Run Text="{ex:Lang Key={Binding Header}}"/>
|
<Run Text="{Binding Header}"/>
|
||||||
<Run Text="{Binding Index,RelativeSource={RelativeSource AncestorType=hc:StepBarItem}}"/>
|
<Run Text="{Binding Index,RelativeSource={RelativeSource AncestorType=hc:StepBarItem}}"/>
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
<TextBlock Margin="0,4,0,0" Text="{ex:Lang Key={Binding Content}}"/>
|
<TextBlock Margin="0,4,0,0" Text="{Binding Content}"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</hc:StepBar.ItemTemplate>
|
</hc:StepBar.ItemTemplate>
|
||||||
@ -53,10 +53,10 @@
|
|||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
<TextBlock FontSize="16" FontWeight="Bold" HorizontalAlignment="Left">
|
<TextBlock FontSize="16" FontWeight="Bold" HorizontalAlignment="Left">
|
||||||
<Run Text="{ex:Lang Key={Binding Header}}"/>
|
<Run/>
|
||||||
<Run Text="{Binding Index,RelativeSource={RelativeSource AncestorType=hc:StepBarItem}}"/>
|
<Run Text="{Binding Index,RelativeSource={RelativeSource AncestorType=hc:StepBarItem}}"/>
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
<TextBlock Margin="0,4,0,0" Text="{ex:Lang Key={Binding Content}}"/>
|
<TextBlock Margin="0,4,0,0" Text="{Binding Content}"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</hc:StepBar.ItemTemplate>
|
</hc:StepBar.ItemTemplate>
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
using System;
|
#if !NET35
|
||||||
|
using System;
|
||||||
using HandyControl.Data;
|
using HandyControl.Data;
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace HandyControlDemo.UserControl
|
namespace HandyControlDemo.UserControl
|
||||||
{
|
{
|
||||||
@ -9,12 +11,14 @@ namespace HandyControlDemo.UserControl
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
|
#if !NET35
|
||||||
for (int i = 0; i < 10; i++)
|
for (int i = 0; i < 10; i++)
|
||||||
{
|
{
|
||||||
var hour = 6 * i;
|
var hour = 6 * i;
|
||||||
TimeBarDemo.Hotspots.Add(new DateTimeRange(DateTime.Today.AddHours(hour), DateTime.Today.AddHours(hour + 1)));
|
TimeBarDemo.Hotspots.Add(new DateTimeRange(DateTime.Today.AddHours(hour), DateTime.Today.AddHours(hour + 1)));
|
||||||
TimeBarDemo.Hotspots.Add(new DateTimeRange(DateTime.Today.AddHours(-hour), DateTime.Today.AddHours(-hour + 1)));
|
TimeBarDemo.Hotspots.Add(new DateTimeRange(DateTime.Today.AddHours(-hour), DateTime.Today.AddHours(-hour + 1)));
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
Effect="{StaticResource EffectShadow4}">
|
Effect="{StaticResource EffectShadow4}">
|
||||||
<Border.Resources>
|
<Border.Resources>
|
||||||
<Style x:Key="DemoInfoSortButtonStyle" BasedOn="{StaticResource ToggleButtonCustom}" TargetType="ToggleButton" x:Shared="False">
|
<Style x:Key="DemoInfoSortButtonStyle" BasedOn="{StaticResource ToggleButtonCustom}" TargetType="ToggleButton" x:Shared="False">
|
||||||
<Setter Property="Content">
|
<!--<Setter Property="Content">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<Border CornerRadius="4" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}" Height="30" Width="30" >
|
<Border CornerRadius="4" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}" Height="30" Width="30" >
|
||||||
<Image Stretch="None" Source="/HandyControlDemo;component/Resources/Img/LeftMainContent/SortAscending_grey_16x.png"/>
|
<Image Stretch="None" Source="/HandyControlDemo;component/Resources/Img/LeftMainContent/SortAscending_grey_16x.png"/>
|
||||||
@ -22,7 +22,7 @@
|
|||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<Border CornerRadius="4" Height="30" Width="30" BorderThickness="1" BorderBrush="{DynamicResource PrimaryBrush}"/>
|
<Border CornerRadius="4" Height="30" Width="30" BorderThickness="1" BorderBrush="{DynamicResource PrimaryBrush}"/>
|
||||||
</Setter.Value>
|
</Setter.Value>
|
||||||
</Setter>
|
</Setter>-->
|
||||||
</Style>
|
</Style>
|
||||||
</Border.Resources>
|
</Border.Resources>
|
||||||
<DockPanel>
|
<DockPanel>
|
||||||
@ -30,28 +30,28 @@
|
|||||||
<TabControl SelectionChanged="TabControl_OnSelectionChanged" ItemContainerStyle="{StaticResource TabItemTransparent}" ItemsSource="{Binding DemoInfoCollection}" Style="{StaticResource TabControlInLine}" Background="Transparent" SelectedIndex="0">
|
<TabControl SelectionChanged="TabControl_OnSelectionChanged" ItemContainerStyle="{StaticResource TabItemTransparent}" ItemsSource="{Binding DemoInfoCollection}" Style="{StaticResource TabControlInLine}" Background="Transparent" SelectedIndex="0">
|
||||||
<TabControl.ItemTemplate>
|
<TabControl.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<TextBlock Text="{ex:Lang Key={Binding Title}}"/>
|
<TextBlock Text="{Binding Title}"/>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</TabControl.ItemTemplate>
|
</TabControl.ItemTemplate>
|
||||||
<TabControl.ContentTemplate>
|
<TabControl.ContentTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<Grid Margin="10">
|
<Grid Margin="10">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto"/>
|
<RowDefinition Height="30"/>
|
||||||
<RowDefinition/>
|
<RowDefinition/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition/>
|
<ColumnDefinition/>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<hc:SearchBar ShowClearButton="True" IsRealTime="True" SearchStarted="SearchBar_OnSearchStarted" Style="{StaticResource SearchBarPlus}" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterKey}}" Margin="0,4,4,4" Tag="{Binding ElementName=ListBoxDemo}"/>
|
<hc:SearchBar ShowClearButton="True" VerticalAlignment="Top" IsRealTime="True" SearchStarted="SearchBar_OnSearchStarted" Style="{StaticResource SearchBarPlus}" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterKey}}" Margin="0,4,4,4" Tag="{Binding ElementName=ListBoxDemo}"/>
|
||||||
<ToggleButton Tag="{Binding ElementName=ListBoxDemo}" Name="ButtonStyleAscending" Click="ButtonAscending_OnClick" Grid.Row="0" Grid.Column="1" Style="{StaticResource DemoInfoSortButtonStyle}"/>
|
<ToggleButton Tag="{Binding ElementName=ListBoxDemo}" Name="ButtonStyleAscending" Click="ButtonAscending_OnClick" Grid.Row="0" Grid.Column="1" Style="{StaticResource DemoInfoSortButtonStyle}"/>
|
||||||
<ListBox Name="ListBoxDemo" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1" VirtualizingStackPanel.IsVirtualizing="True" SelectedIndex="{Binding SelectedIndex}" ItemsSource="{Binding DemoItemList}" BorderThickness="0" SelectionMode="Single" Style="{StaticResource ListBoxTransparent}">
|
<ListBox Name="ListBoxDemo" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1" VirtualizingStackPanel.IsVirtualizing="True" SelectedIndex="{Binding SelectedIndex}" ItemsSource="{Binding DemoItemList}" BorderThickness="0" SelectionMode="Single" Style="{StaticResource ListBoxTransparent}">
|
||||||
<ListBox.ItemTemplate>
|
<ListBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<Image Width="16" Height="16" Source="{Binding ImageName}"/>
|
<Image Width="16" Height="16" Source="{Binding ImageName}"/>
|
||||||
<TextBlock Margin="6,0,0,0" Text="{ex:Lang Key={Binding Name}}"/>
|
<TextBlock Margin="6,0,0,0" Text="{Binding Name}"/>
|
||||||
<Path Visibility="{Binding IsNew,Converter={StaticResource Boolean2VisibilityConverter}}" VerticalAlignment="Center" Data="{StaticResource NewGeometry}" Stretch="Uniform" Margin="10,0,0,0" Width="30" Height="14" Fill="{DynamicResource DangerBrush}"/>
|
<Path Visibility="{Binding IsNew,Converter={StaticResource Boolean2VisibilityConverter}}" VerticalAlignment="Center" Data="{StaticResource NewGeometry}" Stretch="Uniform" Margin="10,0,0,0" Width="30" Height="14" Fill="{DynamicResource DangerBrush}"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
|
@ -1,13 +1,15 @@
|
|||||||
using System.Collections.Generic;
|
using System.Windows;
|
||||||
using System.Windows;
|
|
||||||
using System.Windows.Controls;
|
|
||||||
using GalaSoft.MvvmLight.Messaging;
|
using GalaSoft.MvvmLight.Messaging;
|
||||||
using HandyControl.Tools;
|
using HandyControl.Tools;
|
||||||
using HandyControl.Tools.Extension;
|
using HandyControl.Tools.Extension;
|
||||||
using HandyControlDemo.Data;
|
using HandyControlDemo.Data;
|
||||||
|
#if !NET35
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Windows.Controls;
|
||||||
using HandyControlDemo.ViewModel;
|
using HandyControlDemo.ViewModel;
|
||||||
using ICSharpCode.AvalonEdit;
|
using ICSharpCode.AvalonEdit;
|
||||||
using ICSharpCode.AvalonEdit.Highlighting;
|
using ICSharpCode.AvalonEdit.Highlighting;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
namespace HandyControlDemo.UserControl
|
namespace HandyControlDemo.UserControl
|
||||||
@ -19,11 +21,13 @@ namespace HandyControlDemo.UserControl
|
|||||||
{
|
{
|
||||||
private bool _isFull;
|
private bool _isFull;
|
||||||
|
|
||||||
|
#if !NET35
|
||||||
private string _currentDemoKey;
|
private string _currentDemoKey;
|
||||||
|
|
||||||
private bool _drawerCodeUsed;
|
private bool _drawerCodeUsed;
|
||||||
|
|
||||||
private Dictionary<string, TextEditor> _textEditor;
|
private Dictionary<string, TextEditor> _textEditor;
|
||||||
|
#endif
|
||||||
|
|
||||||
public MainContent()
|
public MainContent()
|
||||||
{
|
{
|
||||||
@ -62,6 +66,7 @@ namespace HandyControlDemo.UserControl
|
|||||||
|
|
||||||
private void DrawerCode_OnOpened(object sender, RoutedEventArgs e)
|
private void DrawerCode_OnOpened(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
|
#if !NET35
|
||||||
if (!_drawerCodeUsed)
|
if (!_drawerCodeUsed)
|
||||||
{
|
{
|
||||||
var textEditorCustomStyle = ResourceHelper.GetResource<Style>("TextEditorCustom");
|
var textEditorCustomStyle = ResourceHelper.GetResource<Style>("TextEditorCustom");
|
||||||
@ -128,6 +133,9 @@ namespace HandyControlDemo.UserControl
|
|||||||
_textEditor["C#"].Text = DemoHelper.GetCode($"{xamlPath}.cs");
|
_textEditor["C#"].Text = DemoHelper.GetCode($"{xamlPath}.cs");
|
||||||
_textEditor["VM"].Text = DemoHelper.GetCode($"{vmPath}.cs");
|
_textEditor["VM"].Text = DemoHelper.GetCode($"{vmPath}.cs");
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
HandyControl.Controls.MessageBox.Show("not supported!");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -6,16 +6,13 @@
|
|||||||
<UserControl.Resources>
|
<UserControl.Resources>
|
||||||
<Storyboard x:Key="StoryboardLoaded" RepeatBehavior="Forever">
|
<Storyboard x:Key="StoryboardLoaded" RepeatBehavior="Forever">
|
||||||
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(RotateTransform.Angle)" Storyboard.TargetName="TransformRotate1">
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(RotateTransform.Angle)" Storyboard.TargetName="TransformRotate1">
|
||||||
<EasingDoubleKeyFrame KeyTime="0:0:3" Value="90">
|
<SplineDoubleKeyFrame KeyTime="0:0:3" Value="90"/>
|
||||||
</EasingDoubleKeyFrame>
|
|
||||||
</DoubleAnimationUsingKeyFrames>
|
</DoubleAnimationUsingKeyFrames>
|
||||||
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(RotateTransform.Angle)" Storyboard.TargetName="TransformRotate2">
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(RotateTransform.Angle)" Storyboard.TargetName="TransformRotate2">
|
||||||
<EasingDoubleKeyFrame KeyTime="0:0:3" Value="90">
|
<SplineDoubleKeyFrame KeyTime="0:0:3" Value="90"/>
|
||||||
</EasingDoubleKeyFrame>
|
|
||||||
</DoubleAnimationUsingKeyFrames>
|
</DoubleAnimationUsingKeyFrames>
|
||||||
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(RotateTransform.Angle)" Storyboard.TargetName="TransformRotate3">
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(RotateTransform.Angle)" Storyboard.TargetName="TransformRotate3">
|
||||||
<EasingDoubleKeyFrame KeyTime="0:0:3" Value="-90">
|
<SplineDoubleKeyFrame KeyTime="0:0:3" Value="-90"/>
|
||||||
</EasingDoubleKeyFrame>
|
|
||||||
</DoubleAnimationUsingKeyFrames>
|
</DoubleAnimationUsingKeyFrames>
|
||||||
</Storyboard>
|
</Storyboard>
|
||||||
</UserControl.Resources>
|
</UserControl.Resources>
|
||||||
|
@ -8,20 +8,12 @@
|
|||||||
<Storyboard x:Key="StoryboardOnLoaded" RepeatBehavior="Forever" AutoReverse="True">
|
<Storyboard x:Key="StoryboardOnLoaded" RepeatBehavior="Forever" AutoReverse="True">
|
||||||
<hc:GeometryAnimationUsingKeyFrames Storyboard.TargetProperty="Data" Storyboard.TargetName="PathDemo">
|
<hc:GeometryAnimationUsingKeyFrames Storyboard.TargetProperty="Data" Storyboard.TargetName="PathDemo">
|
||||||
<hc:DiscreteGeometryKeyFrame KeyTime="0:0:0.7" Value="{StaticResource FaceBookGeometry}"/>
|
<hc:DiscreteGeometryKeyFrame KeyTime="0:0:0.7" Value="{StaticResource FaceBookGeometry}"/>
|
||||||
<hc:EasingGeometryKeyFrame KeyTime="0:0:1.2" Value="{StaticResource TwitterGeometry}">
|
<hc:SplineGeometryKeyFrame KeyTime="0:0:1.2" Value="{StaticResource TwitterGeometry}" KeySpline=".42,0,.58,1"/>
|
||||||
<hc:EasingGeometryKeyFrame.EasingFunction>
|
|
||||||
<QuarticEase EasingMode="EaseInOut"/>
|
|
||||||
</hc:EasingGeometryKeyFrame.EasingFunction>
|
|
||||||
</hc:EasingGeometryKeyFrame>
|
|
||||||
</hc:GeometryAnimationUsingKeyFrames>
|
</hc:GeometryAnimationUsingKeyFrames>
|
||||||
<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="Fill.(SolidColorBrush.Color)" Storyboard.TargetName="PathDemo">
|
<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="Fill.(SolidColorBrush.Color)" Storyboard.TargetName="PathDemo">
|
||||||
<DiscreteColorKeyFrame KeyTime="0:0:0.7" Value="#3b5998"/>
|
<DiscreteColorKeyFrame KeyTime="0:0:0.7" Value="#3b5998"/>
|
||||||
<EasingColorKeyFrame KeyTime="0:0:1.2" Value="#4099ff">
|
<SplineColorKeyFrame KeyTime="0:0:1.2" Value="#4099ff" KeySpline=".42,0,.58,1"/>
|
||||||
<EasingColorKeyFrame.EasingFunction>
|
<SplineColorKeyFrame KeyTime="0:0:1.9" Value="#4099ff"/>
|
||||||
<QuarticEase EasingMode="EaseInOut"/>
|
|
||||||
</EasingColorKeyFrame.EasingFunction>
|
|
||||||
</EasingColorKeyFrame>
|
|
||||||
<EasingColorKeyFrame KeyTime="0:0:1.9" Value="#4099ff"/>
|
|
||||||
</ColorAnimationUsingKeyFrames>
|
</ColorAnimationUsingKeyFrames>
|
||||||
</Storyboard>
|
</Storyboard>
|
||||||
</UserControl.Resources>
|
</UserControl.Resources>
|
||||||
@ -36,4 +28,4 @@
|
|||||||
<hc:TransitioningContentControl>
|
<hc:TransitioningContentControl>
|
||||||
<Path Name="PathDemo" Width="100" Height="100" Data="{StaticResource FaceBookGeometry}" Fill="#3b5998"/>
|
<Path Name="PathDemo" Width="100" Height="100" Data="{StaticResource FaceBookGeometry}" Fill="#3b5998"/>
|
||||||
</hc:TransitioningContentControl>
|
</hc:TransitioningContentControl>
|
||||||
</UserControl>
|
</UserControl>
|
@ -24,7 +24,7 @@ namespace HandyControlDemo.ViewModel
|
|||||||
|
|
||||||
private readonly string _id = Guid.NewGuid().ToString();
|
private readonly string _id = Guid.NewGuid().ToString();
|
||||||
|
|
||||||
private readonly Stopwatch _stopwatch = new Lazy<Stopwatch>(() => new Stopwatch()).Value;
|
private readonly Stopwatch _stopwatch = new Stopwatch();
|
||||||
|
|
||||||
public ChatBoxViewModel()
|
public ChatBoxViewModel()
|
||||||
{
|
{
|
||||||
@ -43,7 +43,7 @@ namespace HandyControlDemo.ViewModel
|
|||||||
public string ChatString
|
public string ChatString
|
||||||
{
|
{
|
||||||
get => _chatString;
|
get => _chatString;
|
||||||
#if NET40
|
#if NET35 || NET40
|
||||||
set => Set(nameof(ChatString), ref _chatString, value);
|
set => Set(nameof(ChatString), ref _chatString, value);
|
||||||
#else
|
#else
|
||||||
set => Set(ref _chatString, value);
|
set => Set(ref _chatString, value);
|
||||||
@ -52,8 +52,7 @@ namespace HandyControlDemo.ViewModel
|
|||||||
|
|
||||||
public ObservableCollection<ChatInfoModel> ChatInfos { get; set; } = new ObservableCollection<ChatInfoModel>();
|
public ObservableCollection<ChatInfoModel> ChatInfos { get; set; } = new ObservableCollection<ChatInfoModel>();
|
||||||
|
|
||||||
public RelayCommand<KeyEventArgs> SendStringCmd => new Lazy<RelayCommand<KeyEventArgs>>(() =>
|
public RelayCommand<KeyEventArgs> SendStringCmd => new RelayCommand<KeyEventArgs>(SendString);
|
||||||
new RelayCommand<KeyEventArgs>(SendString)).Value;
|
|
||||||
|
|
||||||
private void SendString(KeyEventArgs e)
|
private void SendString(KeyEventArgs e)
|
||||||
{
|
{
|
||||||
@ -73,8 +72,7 @@ namespace HandyControlDemo.ViewModel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public RelayCommand<RoutedEventArgs> ReadMessageCmd => new Lazy<RelayCommand<RoutedEventArgs>>(() =>
|
public RelayCommand<RoutedEventArgs> ReadMessageCmd => new RelayCommand<RoutedEventArgs>(ReadMessage);
|
||||||
new RelayCommand<RoutedEventArgs>(ReadMessage)).Value;
|
|
||||||
|
|
||||||
private void ReadMessage(RoutedEventArgs e)
|
private void ReadMessage(RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
@ -95,8 +93,7 @@ namespace HandyControlDemo.ViewModel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public RelayCommand StartRecordCmd => new Lazy<RelayCommand>(() =>
|
public RelayCommand StartRecordCmd => new RelayCommand(StartRecord);
|
||||||
new RelayCommand(StartRecord)).Value;
|
|
||||||
|
|
||||||
private void StartRecord()
|
private void StartRecord()
|
||||||
{
|
{
|
||||||
@ -111,8 +108,7 @@ namespace HandyControlDemo.ViewModel
|
|||||||
_stopwatch.Start();
|
_stopwatch.Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
public RelayCommand StopRecordCmd => new Lazy<RelayCommand>(() =>
|
public RelayCommand StopRecordCmd => new RelayCommand(StopRecord);
|
||||||
new RelayCommand(StopRecord)).Value;
|
|
||||||
|
|
||||||
private void StopRecord()
|
private void StopRecord()
|
||||||
{
|
{
|
||||||
@ -149,8 +145,7 @@ namespace HandyControlDemo.ViewModel
|
|||||||
Messenger.Default.Send(info, MessageToken.SendChatMessage);
|
Messenger.Default.Send(info, MessageToken.SendChatMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
public RelayCommand OpenImageCmd => new Lazy<RelayCommand>(() =>
|
public RelayCommand OpenImageCmd => new RelayCommand(OpenImage);
|
||||||
new RelayCommand(OpenImage)).Value;
|
|
||||||
|
|
||||||
private void OpenImage()
|
private void OpenImage()
|
||||||
{
|
{
|
||||||
|
@ -1,11 +1,16 @@
|
|||||||
using System;
|
using System;
|
||||||
using GalaSoft.MvvmLight;
|
using GalaSoft.MvvmLight;
|
||||||
using GalaSoft.MvvmLight.Command;
|
using GalaSoft.MvvmLight.Command;
|
||||||
|
#if !NET35
|
||||||
using HandyControl.Tools.Extension;
|
using HandyControl.Tools.Extension;
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace HandyControlDemo.ViewModel
|
namespace HandyControlDemo.ViewModel
|
||||||
{
|
{
|
||||||
public class InteractiveDialogViewModel : ViewModelBase, IDialogResultable<string>
|
public class InteractiveDialogViewModel : ViewModelBase
|
||||||
|
#if !NET35
|
||||||
|
, IDialogResultable<string>
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
public Action CloseAction { get; set; }
|
public Action CloseAction { get; set; }
|
||||||
|
|
||||||
@ -14,7 +19,7 @@ namespace HandyControlDemo.ViewModel
|
|||||||
public string Result
|
public string Result
|
||||||
{
|
{
|
||||||
get => _result;
|
get => _result;
|
||||||
#if NET40
|
#if NET35 || NET40
|
||||||
set => Set(nameof(Result), ref _result, value);
|
set => Set(nameof(Result), ref _result, value);
|
||||||
#else
|
#else
|
||||||
set => Set(ref _result, value);
|
set => Set(ref _result, value);
|
||||||
@ -26,13 +31,13 @@ namespace HandyControlDemo.ViewModel
|
|||||||
public string Message
|
public string Message
|
||||||
{
|
{
|
||||||
get => _message;
|
get => _message;
|
||||||
#if NET40
|
#if NET35 || NET40
|
||||||
set => Set(nameof(Message), ref _message, value);
|
set => Set(nameof(Message), ref _message, value);
|
||||||
#else
|
#else
|
||||||
set => Set(ref _message, value);
|
set => Set(ref _message, value);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
public RelayCommand CloseCmd => new Lazy<RelayCommand>(() => new RelayCommand(() => CloseAction?.Invoke())).Value;
|
public RelayCommand CloseCmd => new RelayCommand(() => CloseAction?.Invoke());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
using System;
|
using GalaSoft.MvvmLight;
|
||||||
using GalaSoft.MvvmLight;
|
|
||||||
using GalaSoft.MvvmLight.Command;
|
using GalaSoft.MvvmLight.Command;
|
||||||
|
|
||||||
namespace HandyControlDemo.ViewModel
|
namespace HandyControlDemo.ViewModel
|
||||||
@ -11,14 +10,13 @@ namespace HandyControlDemo.ViewModel
|
|||||||
public int Count
|
public int Count
|
||||||
{
|
{
|
||||||
get => _count;
|
get => _count;
|
||||||
#if NET40
|
#if NET35 || NET40
|
||||||
set => Set(nameof(Count), ref _count, value);
|
set => Set(nameof(Count), ref _count, value);
|
||||||
#else
|
#else
|
||||||
set => Set(ref _count, value);
|
set => Set(ref _count, value);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
public RelayCommand CountCmd => new Lazy<RelayCommand>(() =>
|
public RelayCommand CountCmd => new RelayCommand(() => Count++);
|
||||||
new RelayCommand(() => Count++)).Value;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
using System;
|
using GalaSoft.MvvmLight.Command;
|
||||||
using GalaSoft.MvvmLight.Command;
|
|
||||||
using HandyControlDemo.Data;
|
using HandyControlDemo.Data;
|
||||||
using HandyControlDemo.Service;
|
using HandyControlDemo.Service;
|
||||||
|
|
||||||
@ -15,16 +14,14 @@ namespace HandyControlDemo.ViewModel
|
|||||||
DataList = dataService.GetCardDataList();
|
DataList = dataService.GetCardDataList();
|
||||||
}
|
}
|
||||||
|
|
||||||
public RelayCommand AddItemCmd => new Lazy<RelayCommand>(() =>
|
public RelayCommand AddItemCmd => new RelayCommand(() => DataList.Insert(0, _dataService.GetCardData()));
|
||||||
new RelayCommand(() => DataList.Insert(0, _dataService.GetCardData()))).Value;
|
|
||||||
|
|
||||||
public RelayCommand RemoveItemCmd => new Lazy<RelayCommand>(() =>
|
public RelayCommand RemoveItemCmd => new RelayCommand(() =>
|
||||||
new RelayCommand(() =>
|
{
|
||||||
|
if (DataList.Count > 0)
|
||||||
{
|
{
|
||||||
if (DataList.Count > 0)
|
DataList.RemoveAt(0);
|
||||||
{
|
}
|
||||||
DataList.RemoveAt(0);
|
});
|
||||||
}
|
|
||||||
})).Value;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,15 +1,16 @@
|
|||||||
using System;
|
using System.Windows;
|
||||||
using System.Windows;
|
|
||||||
using GalaSoft.MvvmLight;
|
using GalaSoft.MvvmLight;
|
||||||
using GalaSoft.MvvmLight.Command;
|
using GalaSoft.MvvmLight.Command;
|
||||||
#if !NET40
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
#endif
|
|
||||||
using HandyControl.Controls;
|
using HandyControl.Controls;
|
||||||
using HandyControl.Tools.Extension;
|
|
||||||
using HandyControlDemo.Data;
|
using HandyControlDemo.Data;
|
||||||
using HandyControlDemo.UserControl;
|
using HandyControlDemo.UserControl;
|
||||||
using HandyControlDemo.Window;
|
using HandyControlDemo.Window;
|
||||||
|
#if !NET35 && !NET40
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
#endif
|
||||||
|
#if !NET35
|
||||||
|
using HandyControl.Tools.Extension;
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace HandyControlDemo.ViewModel
|
namespace HandyControlDemo.ViewModel
|
||||||
{
|
{
|
||||||
@ -20,15 +21,14 @@ namespace HandyControlDemo.ViewModel
|
|||||||
public string DialogResult
|
public string DialogResult
|
||||||
{
|
{
|
||||||
get => _dialogResult;
|
get => _dialogResult;
|
||||||
#if NET40
|
#if NET35 || NET40
|
||||||
set => Set(nameof(DialogResult), ref _dialogResult, value);
|
set => Set(nameof(DialogResult), ref _dialogResult, value);
|
||||||
#else
|
#else
|
||||||
set => Set(ref _dialogResult, value);
|
set => Set(ref _dialogResult, value);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
public RelayCommand<FrameworkElement> ShowTextCmd => new Lazy<RelayCommand<FrameworkElement>>(() =>
|
public RelayCommand<FrameworkElement> ShowTextCmd => new RelayCommand<FrameworkElement>(ShowText);
|
||||||
new RelayCommand<FrameworkElement>(ShowText)).Value;
|
|
||||||
|
|
||||||
private void ShowText(FrameworkElement element)
|
private void ShowText(FrameworkElement element)
|
||||||
{
|
{
|
||||||
@ -42,12 +42,12 @@ namespace HandyControlDemo.ViewModel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if NET40
|
#if NET35 || NET40
|
||||||
public RelayCommand<bool> ShowInteractiveDialogCmd => new Lazy<RelayCommand<bool>>(() =>
|
public RelayCommand<bool> ShowInteractiveDialogCmd => new RelayCommand<bool>(ShowInteractiveDialog);
|
||||||
new RelayCommand<bool>(ShowInteractiveDialog)).Value;
|
|
||||||
|
|
||||||
private void ShowInteractiveDialog(bool withTimer)
|
private void ShowInteractiveDialog(bool withTimer)
|
||||||
{
|
{
|
||||||
|
#if NET40
|
||||||
if (!withTimer)
|
if (!withTimer)
|
||||||
{
|
{
|
||||||
Dialog.Show<InteractiveDialog>()
|
Dialog.Show<InteractiveDialog>()
|
||||||
@ -57,11 +57,11 @@ namespace HandyControlDemo.ViewModel
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
Dialog.Show<TextDialogWithTimer>(MessageToken.MainWindow).GetResultAsync<string>();
|
Dialog.Show<TextDialogWithTimer>(MessageToken.MainWindow).GetResultAsync<string>();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
public RelayCommand<bool> ShowInteractiveDialogCmd => new Lazy<RelayCommand<bool>>(() =>
|
public RelayCommand<bool> ShowInteractiveDialogCmd => new RelayCommand<bool>(async withTimer => await ShowInteractiveDialog(withTimer));
|
||||||
new RelayCommand<bool>(async withTimer => await ShowInteractiveDialog(withTimer))).Value;
|
|
||||||
|
|
||||||
private async Task ShowInteractiveDialog(bool withTimer)
|
private async Task ShowInteractiveDialog(bool withTimer)
|
||||||
{
|
{
|
||||||
@ -78,13 +78,11 @@ namespace HandyControlDemo.ViewModel
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
public RelayCommand NewWindowCmd => new Lazy<RelayCommand>(() =>
|
public RelayCommand NewWindowCmd => new RelayCommand(() => new DialogDemoWindow
|
||||||
new RelayCommand(() => new DialogDemoWindow
|
{
|
||||||
{
|
Owner = Application.Current.MainWindow
|
||||||
Owner = Application.Current.MainWindow
|
}.Show());
|
||||||
}.Show())).Value;
|
|
||||||
|
|
||||||
public RelayCommand<string> ShowWithTokenCmd => new Lazy<RelayCommand<string>>(() =>
|
public RelayCommand<string> ShowWithTokenCmd => new RelayCommand<string>(token => Dialog.Show(new TextDialog(), token));
|
||||||
new RelayCommand<string>(token => Dialog.Show(new TextDialog(), token))).Value;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System.Windows;
|
||||||
using System.Windows;
|
|
||||||
using GalaSoft.MvvmLight.Command;
|
using GalaSoft.MvvmLight.Command;
|
||||||
using HandyControl.Controls;
|
using HandyControl.Controls;
|
||||||
using HandyControl.Data;
|
using HandyControl.Data;
|
||||||
@ -23,94 +22,79 @@ namespace HandyControlDemo.ViewModel
|
|||||||
|
|
||||||
#region Window
|
#region Window
|
||||||
|
|
||||||
public RelayCommand InfoCmd => new Lazy<RelayCommand>(() =>
|
public RelayCommand InfoCmd => new RelayCommand(() => Growl.Info(Properties.Langs.Lang.GrowlInfo, _token));
|
||||||
new RelayCommand(() => Growl.Info(Properties.Langs.Lang.GrowlInfo, _token))).Value;
|
|
||||||
|
|
||||||
public RelayCommand SuccessCmd => new Lazy<RelayCommand>(() =>
|
public RelayCommand SuccessCmd => new RelayCommand(() => Growl.Success(Properties.Langs.Lang.GrowlSuccess, _token));
|
||||||
new RelayCommand(() => Growl.Success(Properties.Langs.Lang.GrowlSuccess, _token))).Value;
|
|
||||||
|
|
||||||
public RelayCommand WarningCmd => new Lazy<RelayCommand>(() =>
|
public RelayCommand WarningCmd => new RelayCommand(() => Growl.Warning(new GrowlInfo
|
||||||
new RelayCommand(() => Growl.Warning(new GrowlInfo
|
{
|
||||||
{
|
Message = Properties.Langs.Lang.GrowlWarning,
|
||||||
Message = Properties.Langs.Lang.GrowlWarning,
|
CancelStr = Properties.Langs.Lang.Ignore,
|
||||||
CancelStr = Properties.Langs.Lang.Ignore,
|
ActionBeforeClose = isConfirmed =>
|
||||||
ActionBeforeClose = isConfirmed =>
|
|
||||||
{
|
|
||||||
Growl.Info(isConfirmed.ToString());
|
|
||||||
return true;
|
|
||||||
},
|
|
||||||
Token = _token
|
|
||||||
}))).Value;
|
|
||||||
|
|
||||||
public RelayCommand ErrorCmd => new Lazy<RelayCommand>(() =>
|
|
||||||
new RelayCommand(() => Growl.Error(Properties.Langs.Lang.GrowlError, _token))).Value;
|
|
||||||
|
|
||||||
public RelayCommand AskCmd => new Lazy<RelayCommand>(() =>
|
|
||||||
new RelayCommand(() => Growl.Ask(Properties.Langs.Lang.GrowlAsk, isConfirmed =>
|
|
||||||
{
|
{
|
||||||
Growl.Info(isConfirmed.ToString());
|
Growl.Info(isConfirmed.ToString());
|
||||||
return true;
|
return true;
|
||||||
}, _token))).Value;
|
},
|
||||||
|
Token = _token
|
||||||
|
}));
|
||||||
|
|
||||||
public RelayCommand FatalCmd => new Lazy<RelayCommand>(() =>
|
public RelayCommand ErrorCmd => new RelayCommand(() => Growl.Error(Properties.Langs.Lang.GrowlError, _token));
|
||||||
new RelayCommand(() => Growl.Fatal(new GrowlInfo
|
|
||||||
{
|
|
||||||
Message = Properties.Langs.Lang.GrowlFatal,
|
|
||||||
ShowDateTime = false,
|
|
||||||
Token = _token
|
|
||||||
}))).Value;
|
|
||||||
|
|
||||||
public RelayCommand ClearCmd => new Lazy<RelayCommand>(() =>
|
public RelayCommand AskCmd => new RelayCommand(() => Growl.Ask(Properties.Langs.Lang.GrowlAsk, isConfirmed =>
|
||||||
new RelayCommand(() => Growl.Clear(_token))).Value;
|
{
|
||||||
|
Growl.Info(isConfirmed.ToString());
|
||||||
|
return true;
|
||||||
|
}, _token));
|
||||||
|
|
||||||
|
public RelayCommand FatalCmd => new RelayCommand(() => Growl.Fatal(new GrowlInfo
|
||||||
|
{
|
||||||
|
Message = Properties.Langs.Lang.GrowlFatal,
|
||||||
|
ShowDateTime = false,
|
||||||
|
Token = _token
|
||||||
|
}));
|
||||||
|
|
||||||
|
public RelayCommand ClearCmd => new RelayCommand(() => Growl.Clear(_token));
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Desktop
|
#region Desktop
|
||||||
|
|
||||||
public RelayCommand InfoGlobalCmd => new Lazy<RelayCommand>(() =>
|
public RelayCommand InfoGlobalCmd => new RelayCommand(() => Growl.InfoGlobal(Properties.Langs.Lang.GrowlInfo));
|
||||||
new RelayCommand(() => Growl.InfoGlobal(Properties.Langs.Lang.GrowlInfo))).Value;
|
|
||||||
|
|
||||||
public RelayCommand SuccessGlobalCmd => new Lazy<RelayCommand>(() =>
|
public RelayCommand SuccessGlobalCmd => new RelayCommand(() => Growl.SuccessGlobal(Properties.Langs.Lang.GrowlSuccess));
|
||||||
new RelayCommand(() => Growl.SuccessGlobal(Properties.Langs.Lang.GrowlSuccess))).Value;
|
|
||||||
|
|
||||||
public RelayCommand WarningGlobalCmd => new Lazy<RelayCommand>(() =>
|
public RelayCommand WarningGlobalCmd => new RelayCommand(() => Growl.WarningGlobal(new GrowlInfo
|
||||||
new RelayCommand(() => Growl.WarningGlobal(new GrowlInfo
|
{
|
||||||
{
|
Message = Properties.Langs.Lang.GrowlWarning,
|
||||||
Message = Properties.Langs.Lang.GrowlWarning,
|
CancelStr = Properties.Langs.Lang.Ignore,
|
||||||
CancelStr = Properties.Langs.Lang.Ignore,
|
ActionBeforeClose = isConfirmed =>
|
||||||
ActionBeforeClose = isConfirmed =>
|
|
||||||
{
|
|
||||||
Growl.InfoGlobal(isConfirmed.ToString());
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}))).Value;
|
|
||||||
|
|
||||||
public RelayCommand ErrorGlobalCmd => new Lazy<RelayCommand>(() =>
|
|
||||||
new RelayCommand(() => Growl.ErrorGlobal(Properties.Langs.Lang.GrowlError))).Value;
|
|
||||||
|
|
||||||
public RelayCommand AskGlobalCmd => new Lazy<RelayCommand>(() =>
|
|
||||||
new RelayCommand(() => Growl.AskGlobal(Properties.Langs.Lang.GrowlAsk, isConfirmed =>
|
|
||||||
{
|
{
|
||||||
Growl.InfoGlobal(isConfirmed.ToString());
|
Growl.InfoGlobal(isConfirmed.ToString());
|
||||||
return true;
|
return true;
|
||||||
}))).Value;
|
}
|
||||||
|
}));
|
||||||
|
|
||||||
public RelayCommand FatalGlobalCmd => new Lazy<RelayCommand>(() =>
|
public RelayCommand ErrorGlobalCmd => new RelayCommand(() => Growl.ErrorGlobal(Properties.Langs.Lang.GrowlError));
|
||||||
new RelayCommand(() => Growl.FatalGlobal(new GrowlInfo
|
|
||||||
{
|
|
||||||
Message = Properties.Langs.Lang.GrowlFatal,
|
|
||||||
ShowDateTime = false
|
|
||||||
}))).Value;
|
|
||||||
|
|
||||||
public RelayCommand ClearGlobalCmd => new Lazy<RelayCommand>(() =>
|
public RelayCommand AskGlobalCmd => new RelayCommand(() => Growl.AskGlobal(Properties.Langs.Lang.GrowlAsk, isConfirmed =>
|
||||||
new RelayCommand(Growl.ClearGlobal)).Value;
|
{
|
||||||
|
Growl.InfoGlobal(isConfirmed.ToString());
|
||||||
|
return true;
|
||||||
|
}));
|
||||||
|
|
||||||
|
public RelayCommand FatalGlobalCmd => new RelayCommand(() => Growl.FatalGlobal(new GrowlInfo
|
||||||
|
{
|
||||||
|
Message = Properties.Langs.Lang.GrowlFatal,
|
||||||
|
ShowDateTime = false
|
||||||
|
}));
|
||||||
|
|
||||||
|
public RelayCommand ClearGlobalCmd => new RelayCommand(Growl.ClearGlobal);
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public RelayCommand NewWindowCmd => new Lazy<RelayCommand>(() =>
|
public RelayCommand NewWindowCmd => new RelayCommand(() => new GrowlDemoWindow
|
||||||
new RelayCommand(() => new GrowlDemoWindow
|
{
|
||||||
{
|
Owner = Application.Current.MainWindow
|
||||||
Owner = Application.Current.MainWindow
|
}.Show());
|
||||||
}.Show())).Value;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -6,8 +6,7 @@ namespace HandyControlDemo.ViewModel
|
|||||||
{
|
{
|
||||||
public class ImageBrowserDemoViewModel
|
public class ImageBrowserDemoViewModel
|
||||||
{
|
{
|
||||||
public RelayCommand OpenImgCmd => new Lazy<RelayCommand>(() =>
|
public RelayCommand OpenImgCmd => new RelayCommand(() =>
|
||||||
new RelayCommand(() =>
|
new ImageBrowser(new Uri("pack://application:,,,/Resources/Img/1.jpg")).Show());
|
||||||
new ImageBrowser(new Uri("pack://application:,,,/Resources/Img/1.jpg")).Show())).Value;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,5 +1,4 @@
|
|||||||
using GalaSoft.MvvmLight.Command;
|
using GalaSoft.MvvmLight.Command;
|
||||||
using System;
|
|
||||||
using GalaSoft.MvvmLight;
|
using GalaSoft.MvvmLight;
|
||||||
using HandyControl.Controls;
|
using HandyControl.Controls;
|
||||||
using HandyControl.Data;
|
using HandyControl.Data;
|
||||||
@ -9,15 +8,14 @@ namespace HandyControlDemo.ViewModel
|
|||||||
{
|
{
|
||||||
public class NotificationDemoViewModel : ViewModelBase
|
public class NotificationDemoViewModel : ViewModelBase
|
||||||
{
|
{
|
||||||
public RelayCommand OpenCmd => new Lazy<RelayCommand>(() =>
|
public RelayCommand OpenCmd => new RelayCommand(() => Notification.Show(new AppNotification(), ShowAnimation, StaysOpen));
|
||||||
new RelayCommand(() => Notification.Show(new AppNotification(), ShowAnimation, StaysOpen))).Value;
|
|
||||||
|
|
||||||
private ShowAnimation _showAnimation;
|
private ShowAnimation _showAnimation;
|
||||||
|
|
||||||
public ShowAnimation ShowAnimation
|
public ShowAnimation ShowAnimation
|
||||||
{
|
{
|
||||||
get => _showAnimation;
|
get => _showAnimation;
|
||||||
#if NET40
|
#if NET35 || NET40
|
||||||
set => Set(nameof(ShowAnimation) ,ref _showAnimation, value);
|
set => Set(nameof(ShowAnimation) ,ref _showAnimation, value);
|
||||||
#else
|
#else
|
||||||
set => Set(ref _showAnimation, value);
|
set => Set(ref _showAnimation, value);
|
||||||
@ -29,7 +27,7 @@ namespace HandyControlDemo.ViewModel
|
|||||||
public bool StaysOpen
|
public bool StaysOpen
|
||||||
{
|
{
|
||||||
get => _staysOpen;
|
get => _staysOpen;
|
||||||
#if NET40
|
#if NET35 || NET40
|
||||||
set => Set(nameof(StaysOpen) ,ref _staysOpen, value);
|
set => Set(nameof(StaysOpen) ,ref _staysOpen, value);
|
||||||
#else
|
#else
|
||||||
set => Set(ref _staysOpen, value);
|
set => Set(ref _staysOpen, value);
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user