No files matched your search
@@ -46,8 +46,18 @@ Step 2:Add code in App.xaml as follows:
|
||||
```
|
||||
Step 3:enjoy coding
|
||||
|
||||
## Overview
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
## Latest examples
|
||||
|
||||
### SideMenu
|
||||
|
||||

|
||||
|
||||
### NotifyIcon
|
||||
|
||||

|
||||
@@ -64,12 +74,12 @@ Step 3:enjoy coding
|
||||
|
||||

|
||||
|
||||
## History publication
|
||||
|
||||
### Gravatar
|
||||
|
||||

|
||||
|
||||
## History publication
|
||||
|
||||
### GoToTop
|
||||
|
||||

|
||||
|
||||
|
After Width: | Height: | Size: 346 KiB |
|
After Width: | Height: | Size: 361 KiB |
|
After Width: | Height: | Size: 12 KiB |
@@ -5,7 +5,7 @@
|
||||
<UseWPF>true</UseWPF>
|
||||
<AssemblyName>HandyControlDemo</AssemblyName>
|
||||
<RootNamespace>HandyControlDemo</RootNamespace>
|
||||
<Version>1.5.4</Version>
|
||||
<Version>1.5.5</Version>
|
||||
<ApplicationIcon>..\..\Shared\HandyControlDemo_Shared\Resources\Img\icon.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
@@ -321,6 +321,30 @@
|
||||
<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\Img\LeftMainContent\MainMenuControl_16x.png">
|
||||
<Link>Resources\Img\LeftMainContent\MainMenuControl_16x.png</Link>
|
||||
</Resource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="..\..\Shared\HandyControlDemo_Shared\Properties\Langs\Lang.en.resx">
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
<UseWPF>true</UseWPF>
|
||||
<AssemblyName>HandyControl</AssemblyName>
|
||||
<RootNamespace>HandyControl</RootNamespace>
|
||||
<Version>1.5.4</Version>
|
||||
<AssemblyVersion>1.5.4.0</AssemblyVersion>
|
||||
<Version>1.5.5</Version>
|
||||
<AssemblyVersion>1.5.5.0</AssemblyVersion>
|
||||
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
|
||||
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||
<s:Boolean x:Key="/Default/CodeInspection/CodeAnnotations/NamespacesWithAnnotations/=HandyControl_002EAnnotations/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
|
||||
@@ -69,6 +69,9 @@
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>MessageToken.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="..\..\Shared\HandyControlDemo_Shared\Properties\AssemblyInfo.cs">
|
||||
<Link>Properties\AssemblyInfo.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="UserControl\Main\NoUserContent.xaml.cs">
|
||||
<DependentUpon>NoUserContent.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -381,13 +384,35 @@
|
||||
<LastGenOutput>Lang.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\fabric-icons.ttf">
|
||||
<Link>Resources\fabric-icons.ttf</Link>
|
||||
</Resource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="..\..\Shared\HandyControlDemo_Shared\Data\MessageToken.tt">
|
||||
<Link>Data\MessageToken.tt</Link>
|
||||
<Generator>TextTemplatingFileGenerator</Generator>
|
||||
<LastGenOutput>MessageToken.cs</LastGenOutput>
|
||||
</Content>
|
||||
<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\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\RepeatButton_16x.png">
|
||||
<Link>Resources\Img\LeftMainContent\RepeatButton_16x.png</Link>
|
||||
</Resource>
|
||||
|
||||
@@ -35,6 +35,9 @@
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\..\Shared\HandyControl_Shared\Properties\AssemblyInfo.cs">
|
||||
<Link>Properties\AssemblyInfo.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\Shared\HandyControl_Shared\Properties\Langs\Lang.Designer.cs">
|
||||
<Link>Properties\Langs\Lang.Designer.cs</Link>
|
||||
<AutoGen>True</AutoGen>
|
||||
|
||||
@@ -96,6 +96,9 @@
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>MessageToken.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="..\..\Shared\HandyControlDemo_Shared\Properties\AssemblyInfo.cs">
|
||||
<Link>Properties\AssemblyInfo.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\Shared\HandyControlDemo_Shared\Properties\Langs\Lang.Designer.cs">
|
||||
<Link>Properties\Langs\Lang.Designer.cs</Link>
|
||||
<AutoGen>True</AutoGen>
|
||||
@@ -411,6 +414,32 @@
|
||||
<Generator>TextTemplatingFileGenerator</Generator>
|
||||
<LastGenOutput>MessageToken.cs</LastGenOutput>
|
||||
</Content>
|
||||
<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\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>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\fabric-icons.ttf">
|
||||
<Link>Resources\fabric-icons.ttf</Link>
|
||||
</Resource>
|
||||
</ItemGroup>
|
||||
<Import Project="..\..\Shared\HandyControlDemo_Shared\HandyControlDemo_Shared.projitems" Label="Shared" />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
|
||||
@@ -81,6 +81,9 @@
|
||||
<netVersion>netgt40</netVersion>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\..\Shared\HandyControl_Shared\Properties\AssemblyInfo.cs">
|
||||
<Link>Properties\AssemblyInfo.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\Shared\HandyControl_Shared\Properties\Langs\Lang.Designer.cs">
|
||||
<Link>Properties\Langs\Lang.Designer.cs</Link>
|
||||
<AutoGen>True</AutoGen>
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace HandyControlDemo
|
||||
base.OnStartup(e);
|
||||
|
||||
GlobalData.Init();
|
||||
Thread.CurrentThread.CurrentUICulture = new CultureInfo(GlobalData.Config.Lang);
|
||||
ConfigHelper.Instance.SetLang(GlobalData.Config.Lang);
|
||||
|
||||
if (GlobalData.Config.Skin != SkinType.Default)
|
||||
{
|
||||
@@ -28,7 +28,7 @@ namespace HandyControlDemo
|
||||
}
|
||||
|
||||
#if !Core
|
||||
BlurWindow.SystemVersionInfo = CommonHelper.GetSystemVersionInfo();
|
||||
ConfigHelper.Instance.SetSystemVersionInfo(CommonHelper.GetSystemVersionInfo());
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -92,6 +92,10 @@
|
||||
|
||||
public static readonly string DialogDemoCtl = nameof(DialogDemoCtl);
|
||||
|
||||
public static readonly string SideMenuDemoCtl = nameof(SideMenuDemoCtl);
|
||||
|
||||
public static readonly string GridDemoCtl = nameof(GridDemoCtl);
|
||||
|
||||
public static readonly string ButtonDemoCtl = nameof(ButtonDemoCtl);
|
||||
|
||||
public static readonly string RepeatButtonDemoCtl = nameof(RepeatButtonDemoCtl);
|
||||
@@ -168,5 +172,7 @@
|
||||
|
||||
public static readonly string MainWindow = nameof(MainWindow);
|
||||
|
||||
public static readonly string OverView = nameof(OverView);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -48,7 +48,9 @@ var controlList = new List<string>
|
||||
"NotifyIconDemoCtl",
|
||||
"BadgeDemoCtl",
|
||||
"GravatarDemoCtl",
|
||||
"DialogDemoCtl"
|
||||
"DialogDemoCtl",
|
||||
"SideMenuDemoCtl",
|
||||
"GridDemoCtl"
|
||||
};
|
||||
var styleList = new List<string>
|
||||
{
|
||||
@@ -95,7 +97,8 @@ var messageList = new List<string>
|
||||
"SendChatMessage",
|
||||
"GrowlDemoPanel",
|
||||
"DialogDemoWindow",
|
||||
"MainWindow"
|
||||
"MainWindow",
|
||||
"OverView"
|
||||
};
|
||||
#>
|
||||
namespace HandyControlDemo.Data
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Basic\ChatBox.xaml.cs">
|
||||
<DependentUpon>ChatBox.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Basic\IFull.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Basic\InteractiveDialog.xaml.cs">
|
||||
<DependentUpon>InteractiveDialog.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -74,6 +75,9 @@
|
||||
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Controls\CompareSliderDemoCtl.xaml.cs">
|
||||
<DependentUpon>CompareSliderDemoCtl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Controls\GridDemoCtl.xaml.cs">
|
||||
<DependentUpon>GridDemoCtl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Controls\CoverFlowDemoCtl.xaml.cs">
|
||||
<DependentUpon>CoverFlowDemoCtl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -146,6 +150,9 @@
|
||||
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Controls\ShieldDemoCtl.xaml.cs">
|
||||
<DependentUpon>ShieldDemoCtl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Controls\SideMenuDemoCtl.xaml.cs">
|
||||
<DependentUpon>SideMenuDemoCtl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Controls\StepBarDemoCtl.xaml.cs">
|
||||
<DependentUpon>StepBarDemoCtl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -173,6 +180,9 @@
|
||||
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Controls\WindowDemoCtl.xaml.cs">
|
||||
<DependentUpon>WindowDemoCtl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Main\OverView.xaml.cs">
|
||||
<DependentUpon>OverView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Main\ContributorsView.xaml.cs">
|
||||
<DependentUpon>ContributorsView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -280,6 +290,7 @@
|
||||
<Compile Include="$(MSBuildThisFileDirectory)ViewModel\Controls\NotifyIconDemoViewModel.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)ViewModel\Controls\PaginationDemoViewModel.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)ViewModel\Controls\SearchBarDemoViewModel.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)ViewModel\Controls\SideMenuDemoViewModel.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)ViewModel\Controls\StepBarDemoViewModel.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)ViewModel\Controls\WindowDemoViewModel.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)ViewModel\DemoViewModelBase!1.cs" />
|
||||
@@ -333,6 +344,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="$(MSBuildThisFileDirectory)Resources\Themes\Basic\Fonts.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="$(MSBuildThisFileDirectory)Resources\Themes\Basic\Geometries.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
@@ -409,6 +424,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="$(MSBuildThisFileDirectory)UserControl\Controls\GridDemoCtl.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="$(MSBuildThisFileDirectory)UserControl\Controls\CoverFlowDemoCtl.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
@@ -505,6 +524,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="$(MSBuildThisFileDirectory)UserControl\Controls\SideMenuDemoCtl.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="$(MSBuildThisFileDirectory)UserControl\Controls\StepBarDemoCtl.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
@@ -541,6 +564,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="$(MSBuildThisFileDirectory)UserControl\Main\OverView.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="$(MSBuildThisFileDirectory)UserControl\Main\ContributorsView.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
using System.ComponentModel;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using GalaSoft.MvvmLight.Messaging;
|
||||
using HandyControl.Controls;
|
||||
using HandyControlDemo.Data;
|
||||
using HandyControlDemo.Tools;
|
||||
|
||||
namespace HandyControlDemo
|
||||
{
|
||||
@@ -11,6 +14,15 @@ namespace HandyControlDemo
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
protected override void OnInitialized(EventArgs e)
|
||||
{
|
||||
base.OnInitialized(e);
|
||||
|
||||
Messenger.Default.Send<object>(null, MessageToken.ClearLeftSelected);
|
||||
Messenger.Default.Send(true, MessageToken.FullSwitch);
|
||||
Messenger.Default.Send(AssemblyHelper.CreateInternalInstance($"UserControl.{MessageToken.OverView}"), MessageToken.LoadShowContent);
|
||||
}
|
||||
|
||||
protected override void OnClosing(CancelEventArgs e)
|
||||
{
|
||||
if (GlobalData.NotifyIconIsShow)
|
||||
|
||||
@@ -13,5 +13,5 @@ using System.Windows;
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: ComVisible(false)]
|
||||
[assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)]
|
||||
[assembly: AssemblyVersion("1.5.4")]
|
||||
[assembly: AssemblyVersion("1.5.5")]
|
||||
#endif
|
||||
@@ -47,7 +47,7 @@ namespace HandyControlDemo.Properties.Langs {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 使用此强类型资源类,为所有资源查找
|
||||
/// 重写当前线程的 CurrentUICulture 属性
|
||||
/// 重写当前线程的 CurrentUICulture 属性。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
@@ -528,6 +528,15 @@ namespace HandyControlDemo.Properties.Langs {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 栅格 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string Grid {
|
||||
get {
|
||||
return ResourceManager.GetString("Grid", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 分组框 的本地化字符串。
|
||||
/// </summary>
|
||||
@@ -879,6 +888,15 @@ namespace HandyControlDemo.Properties.Langs {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 概览 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string Overview {
|
||||
get {
|
||||
return ResourceManager.GetString("Overview", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 页码条 的本地化字符串。
|
||||
/// </summary>
|
||||
@@ -1158,6 +1176,15 @@ namespace HandyControlDemo.Properties.Langs {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 侧边菜单 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string SideMenu {
|
||||
get {
|
||||
return ResourceManager.GetString("SideMenu", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 滑块 的本地化字符串。
|
||||
/// </summary>
|
||||
|
||||
@@ -576,4 +576,13 @@
|
||||
<data name="ShowInMainWindow" xml:space="preserve">
|
||||
<value>Show in the main window</value>
|
||||
</data>
|
||||
<data name="SideMenu" xml:space="preserve">
|
||||
<value>SideMenu</value>
|
||||
</data>
|
||||
<data name="Overview" xml:space="preserve">
|
||||
<value>Overview</value>
|
||||
</data>
|
||||
<data name="Grid" xml:space="preserve">
|
||||
<value>Grid</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -576,4 +576,13 @@
|
||||
<data name="ShowInMainWindow" xml:space="preserve">
|
||||
<value>在主窗口显示</value>
|
||||
</data>
|
||||
<data name="SideMenu" xml:space="preserve">
|
||||
<value>侧边菜单</value>
|
||||
</data>
|
||||
<data name="Overview" xml:space="preserve">
|
||||
<value>概览</value>
|
||||
</data>
|
||||
<data name="Grid" xml:space="preserve">
|
||||
<value>栅格</value>
|
||||
</data>
|
||||
</root>
|
||||
|
After Width: | Height: | Size: 4.8 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 5.3 KiB |
|
After Width: | Height: | Size: 6.7 KiB |
|
After Width: | Height: | Size: 5.2 KiB |
|
After Width: | Height: | Size: 129 B |
|
After Width: | Height: | Size: 155 B |
@@ -4,6 +4,7 @@
|
||||
<ResourceDictionary Source="Brushes.xaml"/>
|
||||
<ResourceDictionary Source="Geometries.xaml"/>
|
||||
<ResourceDictionary Source="Converters.xaml"/>
|
||||
<ResourceDictionary Source="Fonts.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -0,0 +1,6 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<FontFamily x:Key="FabricIcons">pack://application:,,,/HandyControlDemo;component/Resources/fabric-icons.ttf#Fabric MDL2 Assets</FontFamily>
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="../Basic/Geometries.xaml"/>
|
||||
<ResourceDictionary Source="../Basic/Fonts.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<Style x:Key="CirclePanelButton" BasedOn="{StaticResource ButtonCustom}" TargetType="Button">
|
||||
@@ -99,4 +100,9 @@
|
||||
<Setter Property="CloseButtonForeground" Value="White"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="TextBlockFabricIcons" TargetType="TextBlock">
|
||||
<Setter Property="FontFamily" Value="{StaticResource FabricIcons}"/>
|
||||
<Setter Property="FontSize" Value="14"/>
|
||||
</Style>
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
internal interface IFull
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.GridDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
xmlns:extension="clr-namespace:HandyControl.Tools.Extension;assembly=HandyControl"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<ScrollViewer>
|
||||
<StackPanel Margin="32">
|
||||
<controls:Row>
|
||||
<controls:Col>
|
||||
<Border Background="{DynamicResource BorderBrush}" Height="36" CornerRadius="4" Margin="10"/>
|
||||
</controls:Col>
|
||||
<controls:Col>
|
||||
<Border Background="{DynamicResource SecondaryBorderBrush}" Height="36" CornerRadius="4" Margin="10"/>
|
||||
</controls:Col>
|
||||
<controls:Col>
|
||||
<Border Background="{DynamicResource BorderBrush}" Height="36" CornerRadius="4" Margin="10"/>
|
||||
</controls:Col>
|
||||
<controls:Col>
|
||||
<Border Background="{DynamicResource SecondaryBorderBrush}" Height="36" CornerRadius="4" Margin="10"/>
|
||||
</controls:Col>
|
||||
<controls:Col>
|
||||
<Border Background="{DynamicResource BorderBrush}" Height="36" CornerRadius="4" Margin="10"/>
|
||||
</controls:Col>
|
||||
<controls:Col>
|
||||
<Border Background="{DynamicResource SecondaryBorderBrush}" Height="36" CornerRadius="4" Margin="10"/>
|
||||
</controls:Col>
|
||||
<controls:Col>
|
||||
<Border Background="{DynamicResource BorderBrush}" Height="36" CornerRadius="4" Margin="10"/>
|
||||
</controls:Col>
|
||||
<controls:Col>
|
||||
<Border Background="{DynamicResource SecondaryBorderBrush}" Height="36" CornerRadius="4" Margin="10"/>
|
||||
</controls:Col>
|
||||
<controls:Col>
|
||||
<Border Background="{DynamicResource BorderBrush}" Height="36" CornerRadius="4" Margin="10"/>
|
||||
</controls:Col>
|
||||
<controls:Col>
|
||||
<Border Background="{DynamicResource SecondaryBorderBrush}" Height="36" CornerRadius="4" Margin="10"/>
|
||||
</controls:Col>
|
||||
<controls:Col>
|
||||
<Border Background="{DynamicResource BorderBrush}" Height="36" CornerRadius="4" Margin="10"/>
|
||||
</controls:Col>
|
||||
<controls:Col>
|
||||
<Border Background="{DynamicResource SecondaryBorderBrush}" Height="36" CornerRadius="4" Margin="10"/>
|
||||
</controls:Col>
|
||||
<controls:Col>
|
||||
<Border Background="{DynamicResource BorderBrush}" Height="36" CornerRadius="4" Margin="10"/>
|
||||
</controls:Col>
|
||||
<controls:Col>
|
||||
<Border Background="{DynamicResource SecondaryBorderBrush}" Height="36" CornerRadius="4" Margin="10"/>
|
||||
</controls:Col>
|
||||
<controls:Col>
|
||||
<Border Background="{DynamicResource BorderBrush}" Height="36" CornerRadius="4" Margin="10"/>
|
||||
</controls:Col>
|
||||
<controls:Col>
|
||||
<Border Background="{DynamicResource SecondaryBorderBrush}" Height="36" CornerRadius="4" Margin="10"/>
|
||||
</controls:Col>
|
||||
</controls:Row>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class GridDemoCtl : IFull
|
||||
{
|
||||
public GridDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -15,27 +15,27 @@
|
||||
<Border BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}">
|
||||
<controls:ScrollViewer Orientation="Horizontal" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Hidden" IsEnableInertia="True">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Background="{DynamicResource PrimaryBrush}">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</Border>
|
||||
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Background="{DynamicResource PrimaryBrush}">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</Border>
|
||||
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Background="{DynamicResource PrimaryBrush}">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</Border>
|
||||
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Background="{DynamicResource PrimaryBrush}">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</Border>
|
||||
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Background="{DynamicResource PrimaryBrush}">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
@@ -46,27 +46,27 @@
|
||||
<Border Grid.Row="1" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}" Margin="0,16,0,0">
|
||||
<controls:ScrollViewer IsEnableInertia="True">
|
||||
<WrapPanel Orientation="Horizontal">
|
||||
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Background="{DynamicResource PrimaryBrush}">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</Border>
|
||||
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Background="{DynamicResource PrimaryBrush}">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</Border>
|
||||
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Background="{DynamicResource PrimaryBrush}">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</Border>
|
||||
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Background="{DynamicResource PrimaryBrush}">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</Border>
|
||||
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Background="{DynamicResource PrimaryBrush}">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
|
||||
@@ -0,0 +1,155 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.SideMenuDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
|
||||
xmlns:command="http://www.galasoft.ch/mvvmlight"
|
||||
DataContext="{Binding SideMenuDemo,Source={StaticResource Locator}}"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
|
||||
<controls:TransitioningContentControl>
|
||||
<controls:SideMenu BorderThickness="1" Width="200" Margin="32">
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="SelectionChanged">
|
||||
<command:EventToCommand Command="{Binding SwitchItemCmd}" PassEventArgsToCommand="True" />
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
<controls:SideMenuItem Header="Overview">
|
||||
<controls:SideMenuItem.Icon>
|
||||
<Image Source="/HandyControlDemo;component/Resources/Img/DevOps/DevOps-Overview.png" Width="24" Height="24"/>
|
||||
</controls:SideMenuItem.Icon>
|
||||
<controls:SideMenuItem Header="Summary">
|
||||
<controls:SideMenuItem.Icon>
|
||||
<TextBlock Text="" Style="{StaticResource TextBlockFabricIcons}"/>
|
||||
</controls:SideMenuItem.Icon>
|
||||
</controls:SideMenuItem>
|
||||
<controls:SideMenuItem Header="Dashboards">
|
||||
<controls:SideMenuItem.Icon>
|
||||
<TextBlock Text="" Style="{StaticResource TextBlockFabricIcons}"/>
|
||||
</controls:SideMenuItem.Icon>
|
||||
</controls:SideMenuItem>
|
||||
<controls:SideMenuItem Header="Wiki">
|
||||
<controls:SideMenuItem.Icon>
|
||||
<TextBlock Text="" Style="{StaticResource TextBlockFabricIcons}"/>
|
||||
</controls:SideMenuItem.Icon>
|
||||
</controls:SideMenuItem>
|
||||
</controls:SideMenuItem>
|
||||
<controls:SideMenuItem Header="Boards">
|
||||
<controls:SideMenuItem.Icon>
|
||||
<Image Source="/HandyControlDemo;component/Resources/Img/DevOps/DevOps-Boards.png" Width="24" Height="24"/>
|
||||
</controls:SideMenuItem.Icon>
|
||||
<controls:SideMenuItem Header="Work Items">
|
||||
<controls:SideMenuItem.Icon>
|
||||
<TextBlock Text="" Style="{StaticResource TextBlockFabricIcons}"/>
|
||||
</controls:SideMenuItem.Icon>
|
||||
</controls:SideMenuItem>
|
||||
<controls:SideMenuItem Header="Boards">
|
||||
<controls:SideMenuItem.Icon>
|
||||
<TextBlock Text="" Style="{StaticResource TextBlockFabricIcons}"/>
|
||||
</controls:SideMenuItem.Icon>
|
||||
</controls:SideMenuItem>
|
||||
<controls:SideMenuItem Header="Backlogs">
|
||||
<controls:SideMenuItem.Icon>
|
||||
<TextBlock Text="" Style="{StaticResource TextBlockFabricIcons}"/>
|
||||
</controls:SideMenuItem.Icon>
|
||||
</controls:SideMenuItem>
|
||||
<controls:SideMenuItem Header="Sprints">
|
||||
<controls:SideMenuItem.Icon>
|
||||
<TextBlock Text="" Style="{StaticResource TextBlockFabricIcons}"/>
|
||||
</controls:SideMenuItem.Icon>
|
||||
</controls:SideMenuItem>
|
||||
<controls:SideMenuItem Header="Queries">
|
||||
<controls:SideMenuItem.Icon>
|
||||
<TextBlock Text="" Style="{StaticResource TextBlockFabricIcons}"/>
|
||||
</controls:SideMenuItem.Icon>
|
||||
</controls:SideMenuItem>
|
||||
</controls:SideMenuItem>
|
||||
<controls:SideMenuItem Header="Repos">
|
||||
<controls:SideMenuItem.Icon>
|
||||
<Image Source="/HandyControlDemo;component/Resources/Img/DevOps/DevOps-Repos.png" Width="24" Height="24"/>
|
||||
</controls:SideMenuItem.Icon>
|
||||
<controls:SideMenuItem Header="Files">
|
||||
<controls:SideMenuItem.Icon>
|
||||
<TextBlock Text="" Style="{StaticResource TextBlockFabricIcons}"/>
|
||||
</controls:SideMenuItem.Icon>
|
||||
</controls:SideMenuItem>
|
||||
<controls:SideMenuItem Header="Commits">
|
||||
<controls:SideMenuItem.Icon>
|
||||
<TextBlock Text="" Style="{StaticResource TextBlockFabricIcons}"/>
|
||||
</controls:SideMenuItem.Icon>
|
||||
</controls:SideMenuItem>
|
||||
<controls:SideMenuItem Header="Pushes">
|
||||
<controls:SideMenuItem.Icon>
|
||||
<TextBlock Text="" Style="{StaticResource TextBlockFabricIcons}"/>
|
||||
</controls:SideMenuItem.Icon>
|
||||
</controls:SideMenuItem>
|
||||
<controls:SideMenuItem Header="Branches">
|
||||
<controls:SideMenuItem.Icon>
|
||||
<TextBlock Text="" Style="{StaticResource TextBlockFabricIcons}"/>
|
||||
</controls:SideMenuItem.Icon>
|
||||
</controls:SideMenuItem>
|
||||
<controls:SideMenuItem Header="Tags">
|
||||
<controls:SideMenuItem.Icon>
|
||||
<TextBlock Text="" Style="{StaticResource TextBlockFabricIcons}"/>
|
||||
</controls:SideMenuItem.Icon>
|
||||
</controls:SideMenuItem>
|
||||
<controls:SideMenuItem Header="Pull requests">
|
||||
<controls:SideMenuItem.Icon>
|
||||
<TextBlock Text="" Style="{StaticResource TextBlockFabricIcons}"/>
|
||||
</controls:SideMenuItem.Icon>
|
||||
</controls:SideMenuItem>
|
||||
</controls:SideMenuItem>
|
||||
<controls:SideMenuItem Header="Pipelines">
|
||||
<controls:SideMenuItem.Icon>
|
||||
<Image Source="/HandyControlDemo;component/Resources/Img/DevOps/DevOps-Pipelines.png" Width="24" Height="24"/>
|
||||
</controls:SideMenuItem.Icon>
|
||||
<controls:SideMenuItem Header="Builds">
|
||||
<controls:SideMenuItem.Icon>
|
||||
<TextBlock Text="" Style="{StaticResource TextBlockFabricIcons}"/>
|
||||
</controls:SideMenuItem.Icon>
|
||||
</controls:SideMenuItem>
|
||||
<controls:SideMenuItem Header="Releases">
|
||||
<controls:SideMenuItem.Icon>
|
||||
<TextBlock Text="" Style="{StaticResource TextBlockFabricIcons}"/>
|
||||
</controls:SideMenuItem.Icon>
|
||||
</controls:SideMenuItem>
|
||||
<controls:SideMenuItem Header="Library">
|
||||
<controls:SideMenuItem.Icon>
|
||||
<TextBlock Text="" Style="{StaticResource TextBlockFabricIcons}"/>
|
||||
</controls:SideMenuItem.Icon>
|
||||
</controls:SideMenuItem>
|
||||
<controls:SideMenuItem Header="Task groups">
|
||||
<controls:SideMenuItem.Icon>
|
||||
<TextBlock Text="" Style="{StaticResource TextBlockFabricIcons}"/>
|
||||
</controls:SideMenuItem.Icon>
|
||||
</controls:SideMenuItem>
|
||||
<controls:SideMenuItem Header="Deployment groups">
|
||||
<controls:SideMenuItem.Icon>
|
||||
<TextBlock Text="" Style="{StaticResource TextBlockFabricIcons}"/>
|
||||
</controls:SideMenuItem.Icon>
|
||||
</controls:SideMenuItem>
|
||||
</controls:SideMenuItem>
|
||||
<controls:SideMenuItem Header="Test Plans">
|
||||
<controls:SideMenuItem.Icon>
|
||||
<Image Source="/HandyControlDemo;component/Resources/Img/DevOps/DevOps-TestPlans.png" Width="24" Height="24"/>
|
||||
</controls:SideMenuItem.Icon>
|
||||
<controls:SideMenuItem Header="Test Plans">
|
||||
<controls:SideMenuItem.Icon>
|
||||
<TextBlock Text="" Style="{StaticResource TextBlockFabricIcons}"/>
|
||||
</controls:SideMenuItem.Icon>
|
||||
</controls:SideMenuItem>
|
||||
<controls:SideMenuItem Header="Runs">
|
||||
<controls:SideMenuItem.Icon>
|
||||
<TextBlock Text="" Style="{StaticResource TextBlockFabricIcons}"/>
|
||||
</controls:SideMenuItem.Icon>
|
||||
</controls:SideMenuItem>
|
||||
<controls:SideMenuItem Header="Load test">
|
||||
<controls:SideMenuItem.Icon>
|
||||
<TextBlock Text="" Style="{StaticResource TextBlockFabricIcons}"/>
|
||||
</controls:SideMenuItem.Icon>
|
||||
</controls:SideMenuItem>
|
||||
</controls:SideMenuItem>
|
||||
</controls:SideMenu>
|
||||
</controls:TransitioningContentControl>
|
||||
|
||||
</UserControl>
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class SideMenuDemoCtl
|
||||
{
|
||||
public SideMenuDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,408 +8,421 @@
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||
<TabControl SelectionChanged="TabControl_OnSelectionChanged" Style="{StaticResource TabControlInLine}" Background="Transparent" >
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="SelectionChanged">
|
||||
<command:EventToCommand Command="{Binding SwitchDemoCmd}" PassEventArgsToCommand="True" />
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
<TabItem Background="Transparent" Header="{x:Static langs:Lang.Styles}">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<controls:SearchBar x:Name="SearchBarStyle" SearchStarted="SearchBarStyle_OnSearchStarted" Style="{StaticResource SearchBarPlus}" controls:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterKey}" Margin="4"/>
|
||||
<ToggleButton Name="ButtonStyleAscending" Click="ButtonStyleAscending_OnClick" Grid.Row="0" Grid.Column="1" Margin="0,0,4,0" Style="{StaticResource ToggleButtonCustom}">
|
||||
<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"/>
|
||||
</Border>
|
||||
<controls:StatusSwitchElement.CheckedElement>
|
||||
<Border CornerRadius="4" Height="30" Width="30" BorderThickness="1" BorderBrush="{DynamicResource PrimaryBrush}"/>
|
||||
</controls:StatusSwitchElement.CheckedElement>
|
||||
</ToggleButton>
|
||||
<ListBox Name="ListBoxStyle" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1" BorderThickness="0" SelectionMode="Single" Style="{StaticResource ListBoxTransparent}">
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.BrushDemoCtl}" Content="{x:Static langs:Lang.Brush}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Brush_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.ButtonDemoCtl}" Content="{x:Static langs:Lang.Button}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/ButtonClick_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.RepeatButtonDemoCtl}" Content="{x:Static langs:Lang.RepeatButton}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/RepeatButton_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.ToggleButtonDemoCtl}" Content="{x:Static langs:Lang.ToggleButton}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Toggle_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.RadioButtonDemoCtl}" Content="{x:Static langs:Lang.RadioButton}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/RadioButton_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.CheckBoxDemoCtl}" Content="{x:Static langs:Lang.CheckBox}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/CheckBox_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.NativeScrollViewerDemoCtl}" Content="{x:Static langs:Lang.ScrollViewer}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/ScrollBox_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.SliderDemoCtl}" Content="{x:Static langs:Lang.Slider}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Slider_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.TextBlockDemoCtl}" Content="{x:Static langs:Lang.TextBlock}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/TextBlock_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.NativeTextBoxDemoCtl}" Content="{x:Static langs:Lang.TextBox}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/TextBox_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.NativeComboBoxDemoCtl}" Content="{x:Static langs:Lang.ComboBox}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/ComboBox_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.NativePasswordBoxDemoCtl}" Content="{x:Static langs:Lang.PasswordBox}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/PasswordBox_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.ExpanderDemoCtl}" Content="{x:Static langs:Lang.Expander}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Expander_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.NativeProgressBarDemoCtl}" Content="{x:Static langs:Lang.ProgressBar}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/ProgressBar_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.CalendarDemoCtl}" Content="{x:Static langs:Lang.Calendar}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Calendar_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.NativeDatePickerDemoCtl}" Content="{x:Static langs:Lang.DatePicker}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/DatePicker_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.NativeTabControlDemoCtl}" Content="{x:Static langs:Lang.TabControl}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/TabPage_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.DataGridDemoCtl}" Content="{x:Static langs:Lang.DataGrid}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/DataGrid_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.TreeViewDemoCtl}" Content="{x:Static langs:Lang.TreeView}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/TreeView_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.ListBoxDemoCtl}" Content="{x:Static langs:Lang.ListBox}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/ListBox_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.ListViewDemoCtl}" Content="{x:Static langs:Lang.ListView}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/ListView_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.GroupBoxDemoCtl}" Content="{x:Static langs:Lang.GroupBox}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/GroupBox_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.MenuDemoCtl}" Content="{x:Static langs:Lang.Menu}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/ContextMenu_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.RichTextBoxDemoCtl}" Content="{x:Static langs:Lang.RichTextBox}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/RichTextBox_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.ToolBarDemoCtl}" Content="{x:Static langs:Lang.ToolBar}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/ToolBar_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.BorderDemoCtl}" Content="{x:Static langs:Lang.Border1}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/BorderElement_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.LabelDemoCtl}" Content="{x:Static langs:Lang.Label}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Label_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
|
||||
</ListBox>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
<TabItem Background="Transparent" Header="{x:Static langs:Lang.Controls}">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<controls:SearchBar SearchStarted="SearchBarControl_OnSearchStarted" Style="{StaticResource SearchBarPlus}" controls:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterKey}" Margin="4"/>
|
||||
<ToggleButton Name="ButtonControlAscending" Click="ButtonControlAscending_OnClick" Grid.Row="0" Grid.Column="1" Margin="0,0,4,0" Style="{StaticResource ToggleButtonCustom}">
|
||||
<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"/>
|
||||
</Border>
|
||||
<controls:StatusSwitchElement.CheckedElement>
|
||||
<Border CornerRadius="4" Height="30" Width="30" BorderThickness="1" BorderBrush="{DynamicResource PrimaryBrush}"/>
|
||||
</controls:StatusSwitchElement.CheckedElement>
|
||||
</ToggleButton>
|
||||
<ListBox Name="ListBoxControl" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1" BorderThickness="0" SelectionMode="Single" Style="{StaticResource ListBoxTransparent}">
|
||||
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.GravatarDemoCtl}" Content="{x:Static langs:Lang.Gravatar}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/User_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.BadgeDemoCtl}" Content="{x:Static langs:Lang.Badge}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/DotLarge_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.GotoTopDemoCtl}" Content="{x:Static langs:Lang.GotoTop}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/GoToTop_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.ProgressButtonDemoCtl}" Content="{x:Static langs:Lang.ProgressButton}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/ProgressButton_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.ChatBubbleDemoCtl}" Content="{x:Static langs:Lang.ChatBubble}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Bubble_16xLG.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.NotifyIconDemoCtl}" Content="{x:Static langs:Lang.NotifyIcon}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/NotificationHub_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.NumericUpDownDemoCtl}" Content="{x:Static langs:Lang.NumericUpDown}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/NumericListBox_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.TextBoxDemoCtl}" Content="{x:Static langs:Lang.TextBox}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/TextBox_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.ComboBoxDemoCtl}" Content="{x:Static langs:Lang.ComboBox}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/ComboBox_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.PasswordBoxDemoCtl}" Content="{x:Static langs:Lang.PasswordBox}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/PasswordBox_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.DatePickerDemoCtl}" Content="{x:Static langs:Lang.DatePicker}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/DatePicker_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.ClockDemoCtl}" Content="{x:Static langs:Lang.Clock}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Time_color_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.TimePickerDemoCtl}" Content="{x:Static langs:Lang.TimePicker}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/TimePicker_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.CalendarWithClockDemoCtl}" Content="{x:Static langs:Lang.CalendarWithClock}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Calendar_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.DateTimePickerDemoCtl}" Content="{x:Static langs:Lang.DateTimePicker}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/DatePicker_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.TransferDemoCtl}" Content="{x:Static langs:Lang.Transfer}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Transfer_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.FlipClockDemoCtl}" Content="{x:Static langs:Lang.FlipClock}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/FlipVertical_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.RateDemoCtl}" Content="{x:Static langs:Lang.Rate}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Star.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.ShieldDemoCtl}" Content="{x:Static langs:Lang.Shield}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Shield_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.SearchBarDemoCtl}" Content="{x:Static langs:Lang.SearchBar}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Search_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.TagDemoCtl}" Content="{x:Static langs:Lang.Tag}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Tag_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.GifImageDemoCtl}" Content="{x:Static langs:Lang.GifImage}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Animation_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.OutlineTextDemoCtl}" Content="{x:Static langs:Lang.OutlineText}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/TextBlock_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.CirclePanelDemoCtl}" Content="{x:Static langs:Lang.CirclePanel}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/ColorWheel_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.WaterfallPanelDemoCtl}" Content="{x:Static langs:Lang.WaterfallPanel}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Panel_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.CoverViewDemoCtl}" Content="{x:Static langs:Lang.CoverView}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/DetailDataView_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.CoverFlowDemoCtl}" Content="{x:Static langs:Lang.CoverFlow}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/LinearCarousel_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.ProgressBarDemoCtl}" Content="{x:Static langs:Lang.ProgressBar}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/ProgressBar_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.StepBarDemoCtl}" Content="{x:Static langs:Lang.StepBar}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Flow_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.GrowlDemoCtl}" Content="{x:Static langs:Lang.Growl}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Message_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.LoadingDemoCtl}" Content="{x:Static langs:Lang.Loading}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Loading_Blue_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.ImageBrowserDemoCtl}" Content="{x:Static langs:Lang.ImageBrowser}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/ImageBrowser_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.ColorPickerDemoCtl}" Content="{x:Static langs:Lang.ColorPicker}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/ColorPalette_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.CarouselDemoCtl}" Content="{x:Static langs:Lang.Carousel}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Carousel_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.CompareSliderDemoCtl}" Content="{x:Static langs:Lang.CompareSlider}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/SplitterControl_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.PreviewSliderDemoCtl}" Content="{x:Static langs:Lang.PreviewSlider}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/HoverMenu_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.TimeBarDemoCtl}" Content="{x:Static langs:Lang.TimeBar}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Timeline_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.PaginationDemoCtl}" Content="{x:Static langs:Lang.Pagination}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Paginator_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.AnimationPathDemoCtl}" Content="{x:Static langs:Lang.AnimationPath}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Path_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.TabControlDemoCtl}" Content="{x:Static langs:Lang.TabControl}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/TabPage_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.ScrollViewerDemoCtl}" Content="{x:Static langs:Lang.ScrollViewer}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/ScrollBox_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.DialogDemoCtl}" Content="{x:Static langs:Lang.Dialog}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Dialog_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.WindowDemoCtl}" Content="{x:Static langs:Lang.Window}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/WindowsForm_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
</ListBox>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
<DockPanel>
|
||||
<Button Command="{Binding OpenOverviewCmd}" DockPanel.Dock="Top" HorizontalAlignment="Stretch" Margin="4,4,4,0" Content="{x:Static langs:Lang.Overview}"/>
|
||||
<TabControl SelectionChanged="TabControl_OnSelectionChanged" Style="{StaticResource TabControlInLine}" Background="Transparent" >
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="SelectionChanged">
|
||||
<command:EventToCommand Command="{Binding SwitchDemoCmd}" PassEventArgsToCommand="True" />
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
<TabItem Background="Transparent" Header="{x:Static langs:Lang.Styles}">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<controls:SearchBar x:Name="SearchBarStyle" SearchStarted="SearchBarStyle_OnSearchStarted" Style="{StaticResource SearchBarPlus}" controls:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterKey}" Margin="4"/>
|
||||
<ToggleButton Name="ButtonStyleAscending" Click="ButtonStyleAscending_OnClick" Grid.Row="0" Grid.Column="1" Margin="0,0,4,0" Style="{StaticResource ToggleButtonCustom}">
|
||||
<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"/>
|
||||
</Border>
|
||||
<controls:StatusSwitchElement.CheckedElement>
|
||||
<Border CornerRadius="4" Height="30" Width="30" BorderThickness="1" BorderBrush="{DynamicResource PrimaryBrush}"/>
|
||||
</controls:StatusSwitchElement.CheckedElement>
|
||||
</ToggleButton>
|
||||
<ListBox Name="ListBoxStyle" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1" BorderThickness="0" SelectionMode="Single" Style="{StaticResource ListBoxTransparent}">
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.BrushDemoCtl}" Content="{x:Static langs:Lang.Brush}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Brush_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.ButtonDemoCtl}" Content="{x:Static langs:Lang.Button}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/ButtonClick_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.RepeatButtonDemoCtl}" Content="{x:Static langs:Lang.RepeatButton}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/RepeatButton_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.ToggleButtonDemoCtl}" Content="{x:Static langs:Lang.ToggleButton}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Toggle_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.RadioButtonDemoCtl}" Content="{x:Static langs:Lang.RadioButton}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/RadioButton_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.CheckBoxDemoCtl}" Content="{x:Static langs:Lang.CheckBox}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/CheckBox_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.NativeScrollViewerDemoCtl}" Content="{x:Static langs:Lang.ScrollViewer}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/ScrollBox_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.SliderDemoCtl}" Content="{x:Static langs:Lang.Slider}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Slider_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.TextBlockDemoCtl}" Content="{x:Static langs:Lang.TextBlock}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/TextBlock_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.NativeTextBoxDemoCtl}" Content="{x:Static langs:Lang.TextBox}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/TextBox_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.NativeComboBoxDemoCtl}" Content="{x:Static langs:Lang.ComboBox}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/ComboBox_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.NativePasswordBoxDemoCtl}" Content="{x:Static langs:Lang.PasswordBox}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/PasswordBox_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.ExpanderDemoCtl}" Content="{x:Static langs:Lang.Expander}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Expander_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.NativeProgressBarDemoCtl}" Content="{x:Static langs:Lang.ProgressBar}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/ProgressBar_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.CalendarDemoCtl}" Content="{x:Static langs:Lang.Calendar}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Calendar_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.NativeDatePickerDemoCtl}" Content="{x:Static langs:Lang.DatePicker}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/DatePicker_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.NativeTabControlDemoCtl}" Content="{x:Static langs:Lang.TabControl}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/TabPage_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.DataGridDemoCtl}" Content="{x:Static langs:Lang.DataGrid}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/DataGrid_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.TreeViewDemoCtl}" Content="{x:Static langs:Lang.TreeView}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/TreeView_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.ListBoxDemoCtl}" Content="{x:Static langs:Lang.ListBox}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/ListBox_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.ListViewDemoCtl}" Content="{x:Static langs:Lang.ListView}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/ListView_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.GroupBoxDemoCtl}" Content="{x:Static langs:Lang.GroupBox}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/GroupBox_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.MenuDemoCtl}" Content="{x:Static langs:Lang.Menu}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/ContextMenu_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.RichTextBoxDemoCtl}" Content="{x:Static langs:Lang.RichTextBox}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/RichTextBox_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.ToolBarDemoCtl}" Content="{x:Static langs:Lang.ToolBar}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/ToolBar_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.BorderDemoCtl}" Content="{x:Static langs:Lang.Border1}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/BorderElement_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.LabelDemoCtl}" Content="{x:Static langs:Lang.Label}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Label_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
|
||||
</ListBox>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
<TabItem Background="Transparent" Header="{x:Static langs:Lang.Controls}">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<controls:SearchBar SearchStarted="SearchBarControl_OnSearchStarted" Style="{StaticResource SearchBarPlus}" controls:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterKey}" Margin="4"/>
|
||||
<ToggleButton Name="ButtonControlAscending" Click="ButtonControlAscending_OnClick" Grid.Row="0" Grid.Column="1" Margin="0,0,4,0" Style="{StaticResource ToggleButtonCustom}">
|
||||
<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"/>
|
||||
</Border>
|
||||
<controls:StatusSwitchElement.CheckedElement>
|
||||
<Border CornerRadius="4" Height="30" Width="30" BorderThickness="1" BorderBrush="{DynamicResource PrimaryBrush}"/>
|
||||
</controls:StatusSwitchElement.CheckedElement>
|
||||
</ToggleButton>
|
||||
<ListBox Name="ListBoxControl" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1" BorderThickness="0" SelectionMode="Single" Style="{StaticResource ListBoxTransparent}">
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.GravatarDemoCtl}" Content="{x:Static langs:Lang.Gravatar}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/User_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.BadgeDemoCtl}" Content="{x:Static langs:Lang.Badge}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/DotLarge_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.GotoTopDemoCtl}" Content="{x:Static langs:Lang.GotoTop}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/GoToTop_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.ProgressButtonDemoCtl}" Content="{x:Static langs:Lang.ProgressButton}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/ProgressButton_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.ChatBubbleDemoCtl}" Content="{x:Static langs:Lang.ChatBubble}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Bubble_16xLG.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.NotifyIconDemoCtl}" Content="{x:Static langs:Lang.NotifyIcon}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/NotificationHub_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.NumericUpDownDemoCtl}" Content="{x:Static langs:Lang.NumericUpDown}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/NumericListBox_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.TextBoxDemoCtl}" Content="{x:Static langs:Lang.TextBox}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/TextBox_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.ComboBoxDemoCtl}" Content="{x:Static langs:Lang.ComboBox}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/ComboBox_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.PasswordBoxDemoCtl}" Content="{x:Static langs:Lang.PasswordBox}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/PasswordBox_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.DatePickerDemoCtl}" Content="{x:Static langs:Lang.DatePicker}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/DatePicker_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.ClockDemoCtl}" Content="{x:Static langs:Lang.Clock}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Time_color_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.TimePickerDemoCtl}" Content="{x:Static langs:Lang.TimePicker}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/TimePicker_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.CalendarWithClockDemoCtl}" Content="{x:Static langs:Lang.CalendarWithClock}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Calendar_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.DateTimePickerDemoCtl}" Content="{x:Static langs:Lang.DateTimePicker}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/DatePicker_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.TransferDemoCtl}" Content="{x:Static langs:Lang.Transfer}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Transfer_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.FlipClockDemoCtl}" Content="{x:Static langs:Lang.FlipClock}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/FlipVertical_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.RateDemoCtl}" Content="{x:Static langs:Lang.Rate}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Star.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.ShieldDemoCtl}" Content="{x:Static langs:Lang.Shield}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Shield_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.SearchBarDemoCtl}" Content="{x:Static langs:Lang.SearchBar}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Search_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.TagDemoCtl}" Content="{x:Static langs:Lang.Tag}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Tag_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.GifImageDemoCtl}" Content="{x:Static langs:Lang.GifImage}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Animation_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.OutlineTextDemoCtl}" Content="{x:Static langs:Lang.OutlineText}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/TextBlock_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.CirclePanelDemoCtl}" Content="{x:Static langs:Lang.CirclePanel}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/ColorWheel_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.GridDemoCtl}" Content="{x:Static langs:Lang.Grid}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/GridPane_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.WaterfallPanelDemoCtl}" Content="{x:Static langs:Lang.WaterfallPanel}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Panel_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.CoverViewDemoCtl}" Content="{x:Static langs:Lang.CoverView}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/DetailDataView_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.CoverFlowDemoCtl}" Content="{x:Static langs:Lang.CoverFlow}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/LinearCarousel_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.ProgressBarDemoCtl}" Content="{x:Static langs:Lang.ProgressBar}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/ProgressBar_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.StepBarDemoCtl}" Content="{x:Static langs:Lang.StepBar}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Flow_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.GrowlDemoCtl}" Content="{x:Static langs:Lang.Growl}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Message_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.LoadingDemoCtl}" Content="{x:Static langs:Lang.Loading}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Loading_Blue_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.ImageBrowserDemoCtl}" Content="{x:Static langs:Lang.ImageBrowser}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/ImageBrowser_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.ColorPickerDemoCtl}" Content="{x:Static langs:Lang.ColorPicker}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/ColorPalette_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.CarouselDemoCtl}" Content="{x:Static langs:Lang.Carousel}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Carousel_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.CompareSliderDemoCtl}" Content="{x:Static langs:Lang.CompareSlider}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/SplitterControl_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.PreviewSliderDemoCtl}" Content="{x:Static langs:Lang.PreviewSlider}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/HoverMenu_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.TimeBarDemoCtl}" Content="{x:Static langs:Lang.TimeBar}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Timeline_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.PaginationDemoCtl}" Content="{x:Static langs:Lang.Pagination}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Paginator_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.AnimationPathDemoCtl}" Content="{x:Static langs:Lang.AnimationPath}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Path_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.TabControlDemoCtl}" Content="{x:Static langs:Lang.TabControl}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/TabPage_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.SideMenuDemoCtl}" Content="{x:Static langs:Lang.SideMenu}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/MainMenuControl_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.ScrollViewerDemoCtl}" Content="{x:Static langs:Lang.ScrollViewer}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/ScrollBox_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.DialogDemoCtl}" Content="{x:Static langs:Lang.Dialog}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Dialog_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.WindowDemoCtl}" Content="{x:Static langs:Lang.Window}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/WindowsForm_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
</ListBox>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
</DockPanel>
|
||||
</Border>
|
||||
@@ -0,0 +1,364 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.OverView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d"
|
||||
Background="{DynamicResource RegionBrush}"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
xmlns:userControl="clr-namespace:HandyControlDemo.UserControl"
|
||||
xmlns:interactivity="clr-namespace:HandyControl.Interactivity;assembly=HandyControl">
|
||||
<ScrollViewer HorizontalScrollBarVisibility="Auto">
|
||||
<Canvas HorizontalAlignment="Center" VerticalAlignment="Center" Name="CanvasMain" Margin="32" Width="1665" Height="1300" Effect="{StaticResource EffectShadow5}">
|
||||
<Border Visibility="Visible" BorderThickness="1" Padding="16" Style="{StaticResource BorderRegion}" CornerRadius="4">
|
||||
<StackPanel>
|
||||
<Button Width="80" Content="Button" Margin="0,0,0,10"/>
|
||||
<Button Width="80" Content="Button" Style="{StaticResource ButtonPrimary}" Margin="0,0,0,10"/>
|
||||
<Button Width="80" Padding="16,8" controls:IconElement.Geometry="{StaticResource DeleteGeometry}" Margin="0,0,0,10"/>
|
||||
<Button Width="80" Content="Clock" Margin="0,0,0,10" Style="{StaticResource ButtonPrimary}" controls:IconElement.Geometry="{StaticResource ClockGeometry}"/>
|
||||
<Button Width="80" Margin="0,0,0,10" Height="28" Padding="10,0" Background="#24292e" Foreground="White" Content="Button" Style="{StaticResource ButtonCustom}" controls:BackgroundSwitchElement.MouseHoverBackground="Red" controls:BackgroundSwitchElement.MouseDownBackground="PaleVioletRed"/>
|
||||
<Button Width="80" Padding="16,8" Style="{StaticResource ButtonIcon}" Foreground="{DynamicResource PrimaryTextBrush}" controls:IconElement.Geometry="{StaticResource UpDownGeometry}"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Border Visibility="Visible" BorderThickness="1" Padding="16" Style="{StaticResource BorderRegion}" CornerRadius="4" Canvas.Left="128">
|
||||
<StackPanel>
|
||||
<ToggleButton Width="128" Margin="0,0,0,10" IsChecked="True" Content="ToggleButton"/>
|
||||
<ToggleButton Width="128" Margin="0,0,0,10" Content="ToggleButton" Style="{StaticResource ToggleButtonPrimary}"/>
|
||||
<ToggleButton Width="128" Margin="0,0,0,10" Style="{StaticResource ToggleButtonIcon}" controls:IconSwitchElement.Geometry="{StaticResource DeleteGeometry}" controls:IconSwitchElement.GeometrySelected="{StaticResource DownGeometry}"/>
|
||||
<ToggleButton Width="128" Margin="0,0,0,10" IsChecked="True" Content="ToggleButton" controls:IconElement.Geometry="{StaticResource ClockGeometry}" Style="{StaticResource ToggleButtonPrimary}"/>
|
||||
<ToggleButton Margin="0,0,0,10" IsChecked="True" Style="{StaticResource ToggleButtonCustom}" controls:StatusSwitchElement.HiddenElement="True">
|
||||
<controls:StatusSwitchElement.CheckedElement>
|
||||
<Border Width="128" Height="30" CornerRadius="4" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}">
|
||||
<Ellipse Width="20" Height="20" Fill="{DynamicResource PrimaryBrush}" StrokeThickness="1" Stroke="{DynamicResource BorderBrush}"/>
|
||||
</Border>
|
||||
</controls:StatusSwitchElement.CheckedElement>
|
||||
<Border Width="128" Height="30" CornerRadius="4" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}">
|
||||
<Ellipse Width="20" Height="20" Fill="{DynamicResource BorderBrush}" StrokeThickness="1" Stroke="{DynamicResource BorderBrush}"/>
|
||||
</Border>
|
||||
</ToggleButton>
|
||||
<ToggleButton Margin="0,0,0,10" IsChecked="True" HorizontalAlignment="Center" Style="{StaticResource ToggleButtonSwitch}"/>
|
||||
<ToggleButton Style="{StaticResource ToggleButtonIconTransparent}" controls:IconSwitchElement.Geometry="{StaticResource DeleteGeometry}" controls:IconSwitchElement.GeometrySelected="{StaticResource DownGeometry}"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Border Visibility="Visible" BorderThickness="1" Padding="16" Style="{StaticResource BorderRegion}" CornerRadius="4" Canvas.Left="611">
|
||||
<userControl:SideMenuDemoCtl Height="424" Margin="-32" Background="Transparent"/>
|
||||
</Border>
|
||||
<Border Visibility="Visible" BorderThickness="1" Padding="16" Style="{StaticResource BorderRegion}" CornerRadius="4" Canvas.Left="304">
|
||||
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<StackPanel>
|
||||
<RadioButton Content="Radio"/>
|
||||
<RadioButton Margin="0,16,0,0" Content="Radio" IsChecked="True" IsEnabled="False"/>
|
||||
<RadioButton Margin="0,16,0,0" Content="Radio"/>
|
||||
<RadioButton Margin="0,16,0,0" Content="Radio" IsEnabled="False"/>
|
||||
</StackPanel>
|
||||
<UniformGrid Margin="22,0,0,0" Rows="2" Columns="2">
|
||||
<RadioButton Margin="10,0,0,0" Background="{DynamicResource SecondaryRegionBrush}" controls:IconElement.Geometry="{StaticResource CalendarGeometry}" Style="{StaticResource RadioButtonIcon}" Content="Radio"/>
|
||||
<RadioButton Margin="10,0,0,0" Background="{DynamicResource SecondaryRegionBrush}" Style="{StaticResource RadioButtonIcon}" Content="Radio" IsChecked="True"/>
|
||||
<RadioButton Margin="10,0,0,0" BorderThickness="1" controls:IconElement.Geometry="{StaticResource CalendarGeometry}" Style="{StaticResource RadioButtonIcon}" Content="Radio"/>
|
||||
<RadioButton Margin="10,0,0,0" BorderThickness="1" Style="{StaticResource RadioButtonIcon}" Content="Radio"/>
|
||||
</UniformGrid>
|
||||
</StackPanel>
|
||||
<controls:RadioGroup Margin="0,32,0,0">
|
||||
<RadioButton Content="Radio" IsChecked="True"/>
|
||||
<RadioButton Content="Radio"/>
|
||||
<RadioButton IsEnabled="False" Content="Radio"/>
|
||||
<RadioButton Content="Radio"/>
|
||||
</controls:RadioGroup>
|
||||
<controls:RadioGroup Margin="0,16,0,0" Style="{StaticResource RadioGroupSolid}">
|
||||
<RadioButton Content="Radio"/>
|
||||
<RadioButton Content="Radio"/>
|
||||
<RadioButton IsEnabled="False" Content="Radio"/>
|
||||
<RadioButton Content="Radio" IsChecked="True"/>
|
||||
</controls:RadioGroup>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<controls:RadioGroup Margin="0,16,8,0" Orientation="Vertical">
|
||||
<RadioButton Content="Radio" IsChecked="True"/>
|
||||
<RadioButton Content="Radio"/>
|
||||
<RadioButton IsEnabled="False" Content="Radio"/>
|
||||
<RadioButton Content="Radio"/>
|
||||
</controls:RadioGroup>
|
||||
<controls:RadioGroup Margin="8,16,0,0" Orientation="Vertical" Style="{StaticResource RadioGroupSolid}">
|
||||
<RadioButton Content="Radio"/>
|
||||
<RadioButton Content="Radio"/>
|
||||
<RadioButton IsEnabled="False" Content="Radio"/>
|
||||
<RadioButton Content="Radio" IsChecked="True"/>
|
||||
</controls:RadioGroup>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Border Visibility="Visible" BorderThickness="1" Padding="16" Style="{StaticResource BorderRegion}" CornerRadius="4" Canvas.Top="276" Height="226">
|
||||
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<CheckBox Content="CheckBox" IsChecked="True"/>
|
||||
<CheckBox Margin="0,16,0,0" Content="CheckBox" IsChecked="True" IsEnabled="False"/>
|
||||
<CheckBox Margin="0,16,0,0" Content="CheckBox"/>
|
||||
<CheckBox Margin="0,16,0,0" Content="CheckBox" IsEnabled="False"/>
|
||||
<CheckBox Margin="0,16,0,0" Content="CheckBox" IsChecked="{x:Null}"/>
|
||||
<CheckBox Margin="0,16,0,0" Content="CheckBox" IsChecked="{x:Null}" IsEnabled="False"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Border Visibility="Visible" BorderThickness="1" Padding="16" Style="{StaticResource BorderRegion}" CornerRadius="4" Canvas.Top="516">
|
||||
<StackPanel>
|
||||
<Slider Width="400" IsSnapToTickEnabled="True" Value="8"/>
|
||||
<Slider Width="400" IsSnapToTickEnabled="True" Value="3" Margin="0,32,0,0" IsEnabled="False"/>
|
||||
<Slider Width="400" IsSnapToTickEnabled="True" TickFrequency="5" Maximum="100" TickPlacement="TopLeft" Value="10" IsSelectionRangeEnabled="True" SelectionStart="10" SelectionEnd="80" Margin="0,32,0,0"/>
|
||||
<Slider Width="400" controls:TipElement.Visibility="Visible" IsSnapToTickEnabled="True" Maximum="100" Value="60" TickFrequency="10" TickPlacement="BottomRight" Margin="0,32,0,0"/>
|
||||
<Slider Width="400" controls:TipElement.Visibility="Visible" controls:TipElement.Placement="BottomRight" IsSnapToTickEnabled="True" Value="5" TickPlacement="Both" Margin="0,32,0,0"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Border Visibility="Visible" BorderThickness="1" Padding="16" Style="{StaticResource BorderRegion}" CornerRadius="4" Canvas.Top="806" Width="349">
|
||||
<TabControl Height="200" Style="{StaticResource TabControlInLine}">
|
||||
<TabItem Header="Title" HeaderStringFormat="{}{0}1">
|
||||
<Border Background="{DynamicResource PrimaryBrush}">
|
||||
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
|
||||
<Run Text="Text"/>
|
||||
<Run Text="1"/>
|
||||
</TextBlock>
|
||||
</Border>
|
||||
</TabItem>
|
||||
<TabItem Header="Title" HeaderStringFormat="{}{0}2">
|
||||
<Border Background="{DynamicResource SuccessBrush}">
|
||||
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
|
||||
<Run Text="Text"/>
|
||||
<Run Text="2"/>
|
||||
</TextBlock>
|
||||
</Border>
|
||||
</TabItem>
|
||||
<TabItem Header="Title" HeaderStringFormat="{}{0}3">
|
||||
<Border Background="{DynamicResource InfoBrush}">
|
||||
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
|
||||
<Run Text="Text"/>
|
||||
<Run Text="3"/>
|
||||
</TextBlock>
|
||||
</Border>
|
||||
</TabItem>
|
||||
<TabItem Header="Title" HeaderStringFormat="{}{0}4">
|
||||
<Border Background="{DynamicResource WarningBrush}">
|
||||
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
|
||||
<Run Text="Text"/>
|
||||
<Run Text="4"/>
|
||||
</TextBlock>
|
||||
</Border>
|
||||
</TabItem>
|
||||
<TabItem IsSelected="True" Header="Title" HeaderStringFormat="{}{0}5">
|
||||
<Border Background="{DynamicResource DangerBrush}">
|
||||
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
|
||||
<Run Text="Text"/>
|
||||
<Run Text="5"/>
|
||||
</TextBlock>
|
||||
</Border>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
</Border>
|
||||
<Border Visibility="Visible" BorderThickness="1" Padding="16" Style="{StaticResource BorderRegion}" CornerRadius="4" Canvas.Left="859" Width="240">
|
||||
<StackPanel>
|
||||
<ProgressBar Value="20" Margin="0,0,0,10"/>
|
||||
<ProgressBar Style="{StaticResource ProgressBarDangerStripe}" Margin="0,0,0,10" Value="120" Maximum="200" />
|
||||
<ProgressBar Style="{StaticResource ProgressBarFlat}" Margin="0,8,0,10" Value="110" Maximum="200" />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Border Visibility="Visible" BorderThickness="1" Padding="16" Style="{StaticResource BorderRegion}" CornerRadius="4" Canvas.Left="859" Height="264" Canvas.Top="130">
|
||||
<ScrollViewer>
|
||||
<StackPanel VerticalAlignment="Top">
|
||||
<Expander Header="Title" BorderThickness="1,1,1,0" BorderBrush="{DynamicResource BorderBrush}" Width="206" HorizontalAlignment="Left">
|
||||
<Border Height="100" Background="{DynamicResource SecondaryRegionBrush}"/>
|
||||
</Expander>
|
||||
<Expander Header="Title" BorderThickness="1,1,1,0" BorderBrush="{DynamicResource BorderBrush}" Width="206" HorizontalAlignment="Left">
|
||||
<Border Height="100" Background="{DynamicResource SecondaryRegionBrush}"/>
|
||||
</Expander>
|
||||
<Expander Header="Title" BorderThickness="1,1,1,0" BorderBrush="{DynamicResource BorderBrush}" Width="206" HorizontalAlignment="Left">
|
||||
<Border Height="100" Background="{DynamicResource SecondaryRegionBrush}"/>
|
||||
</Expander>
|
||||
<Expander Header="Title" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}" Width="206" HorizontalAlignment="Left">
|
||||
<Border Height="100" Background="{DynamicResource SecondaryRegionBrush}"/>
|
||||
</Expander>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</Border>
|
||||
<Border Visibility="Visible" BorderThickness="1" Padding="16" Style="{StaticResource BorderRegion}" CornerRadius="4" Canvas.Left="1113">
|
||||
<Calendar SelectionMode="MultipleRange"/>
|
||||
</Border>
|
||||
<Border Visibility="Visible" BorderThickness="1" Padding="16" Style="{StaticResource BorderRegion}" CornerRadius="4" Canvas.Left="1421" Height="346">
|
||||
<controls:Clock/>
|
||||
</Border>
|
||||
<Border Visibility="Visible" BorderThickness="1" Padding="16" Style="{StaticResource BorderRegion}" CornerRadius="4" Canvas.Left="611" Height="326" Canvas.Top="408" Width="488">
|
||||
<DataGrid HeadersVisibility="All" RowHeaderWidth="60" AutoGenerateColumns="False" ItemsSource="{Binding DataList}">
|
||||
<DataGrid.RowHeaderTemplate>
|
||||
<DataTemplate>
|
||||
<CheckBox IsChecked="{Binding IsSelected,RelativeSource={RelativeSource AncestorType=DataGridRow}}"/>
|
||||
</DataTemplate>
|
||||
</DataGrid.RowHeaderTemplate>
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn IsReadOnly="True" Width="80" CanUserResize="False" Binding="{Binding Index}" Header="Index"/>
|
||||
<DataGridTemplateColumn Width="60" CanUserResize="False">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Image Source="{Binding ImgPath}" Width="32" Height="32" Stretch="Uniform"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTextColumn Width="1*" Binding="{Binding Name}" Header="Name"/>
|
||||
<DataGridCheckBoxColumn Width="100" CanUserResize="False" Binding="{Binding IsSelected}" Header="Selected"/>
|
||||
<DataGridComboBoxColumn ItemsSource="{Binding Source={StaticResource DemoTypes}}" Width="100" CanUserResize="False" SelectedValueBinding="{Binding Type}" Header="Type"/>
|
||||
<DataGridTextColumn Width="1*" Binding="{Binding Remark}" Header="Remark"/>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
</Border>
|
||||
<Border Visibility="Visible" BorderThickness="1" Padding="16" Style="{StaticResource BorderRegion}" CornerRadius="4" Canvas.Left="363" Height="234" Canvas.Top="806">
|
||||
<TreeView Width="200" ItemsSource="{Binding DataList}">
|
||||
<TreeView.ItemTemplate>
|
||||
<HierarchicalDataTemplate ItemsSource="{Binding DataList}">
|
||||
<TextBlock Text="{Binding Name}"/>
|
||||
</HierarchicalDataTemplate>
|
||||
</TreeView.ItemTemplate>
|
||||
</TreeView>
|
||||
</Border>
|
||||
<Border Visibility="Visible" BorderThickness="1" Padding="16" Style="{StaticResource BorderRegion}" CornerRadius="4" Canvas.Left="1158" Height="334" Canvas.Top="748" Width="219">
|
||||
<ListBox ItemsSource="{Binding DataList}">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Name}"/>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</Border>
|
||||
<Border Visibility="Visible" BorderThickness="1" Padding="16" Style="{StaticResource BorderRegion}" CornerRadius="4" Canvas.Left="1113" Canvas.Top="360" Width="264">
|
||||
<GroupBox Height="200" Header="GroupBox" Padding="10" Margin="0,0,-2,0" >
|
||||
<Border Background="{DynamicResource PrimaryBrush}" CornerRadius="4">
|
||||
<TextBlock Text="GroupBox" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</GroupBox>
|
||||
</Border>
|
||||
<Border Visibility="Visible" BorderThickness="1" Padding="16" Style="{StaticResource BorderRegion}" CornerRadius="4" Canvas.Top="1054" Width="597">
|
||||
<ToolBarTray VerticalAlignment="Center">
|
||||
<ToolBar Padding="6">
|
||||
<CheckBox IsChecked="True" Margin="10,0,0,0"/>
|
||||
<Separator Margin="10,0,0,0"/>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<RadioButton IsChecked="True" Margin="10,0,0,0"/>
|
||||
<RadioButton Margin="10,0,0,0"/>
|
||||
</StackPanel>
|
||||
<Button Content="Button" Margin="10,0,0,0"/>
|
||||
<Button Content="Button" Margin="10,0,0,0" Style="{StaticResource ButtonPrimary}"/>
|
||||
</ToolBar>
|
||||
<ToolBar Band="1" Padding="6">
|
||||
<ComboBox DataContext="{Binding ComboBoxDemo,Source={StaticResource Locator}}" ItemsSource="{Binding DataList}" SelectedIndex="0" Width="230"/>
|
||||
<TextBox Text="TextTextTextText" Margin="10,0,0,0" Width="230"/>
|
||||
</ToolBar>
|
||||
<ToolBar Band="0" Padding="6">
|
||||
<Menu Background="Transparent" VerticalAlignment="Center">
|
||||
<MenuItem Header="Repository">
|
||||
<MenuItem Header="GitHub">
|
||||
<MenuItem.Icon>
|
||||
<Path Data="{StaticResource GithubGeometry}" Fill="{DynamicResource PrimaryTextBrush}"/>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Header="NuGet">
|
||||
<MenuItem.Icon>
|
||||
<Path Data="{StaticResource NugetGeometry}" Fill="#224880"/>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
</MenuItem>
|
||||
<MenuItem Header="About">
|
||||
<MenuItem Header="Email">
|
||||
<MenuItem.Icon>
|
||||
<Path Data="{StaticResource EmailGeometry}" Fill="{DynamicResource PrimaryBrush}"/>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Header="Chatroom">
|
||||
<MenuItem.Icon>
|
||||
<Path Data="{StaticResource GitterGeometry}" Fill="#e52e64"/>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Header="Blog">
|
||||
<MenuItem.Icon>
|
||||
<Path Data="{StaticResource CnblogsGeometry}" Fill="{DynamicResource PrimaryTextBrush}"/>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
</MenuItem>
|
||||
<MenuItem Header="Contributors"/>
|
||||
</Menu>
|
||||
</ToolBar>
|
||||
</ToolBarTray>
|
||||
</Border>
|
||||
<Border Visibility="Visible" BorderThickness="1" Padding="16" Style="{StaticResource BorderRegion}" CornerRadius="4" Canvas.Left="1391" Canvas.Top="360">
|
||||
<UniformGrid Rows="3" Columns="3" Width="240" Height="240">
|
||||
<controls:Gravatar Id="User1"/>
|
||||
<controls:Gravatar Id="User2"/>
|
||||
<controls:Gravatar Style="{StaticResource GravatarCircleImg}">
|
||||
<Image Source="/HandyControlDemo;component/Resources/Img/Album/2.jpg"/>
|
||||
</controls:Gravatar>
|
||||
<controls:Gravatar Id="User4"/>
|
||||
<controls:Gravatar Id="User5" Style="{StaticResource GravatarCircle}"/>
|
||||
<controls:Gravatar Id="User6"/>
|
||||
<controls:Gravatar Style="{StaticResource GravatarCircle}" Source="/HandyControlDemo;component/Resources/Img/Album/1.jpg"/>
|
||||
<controls:Gravatar Id="User8"/>
|
||||
<controls:Gravatar Id="User9"/>
|
||||
</UniformGrid>
|
||||
</Border>
|
||||
<Border Visibility="Visible" BorderThickness="1" Padding="16" Style="{StaticResource BorderRegion}" CornerRadius="4" Canvas.Left="448" Canvas.Top="516" Height="276" Width="149">
|
||||
<StackPanel VerticalAlignment="Center">
|
||||
<controls:Badge HorizontalAlignment="Center" Text="New" BadgeMargin="0,-14,-20,0" Height="30">
|
||||
<Button Content="Comment"/>
|
||||
</controls:Badge>
|
||||
<controls:Badge DataContext="{Binding BadgeDemo, Source={StaticResource Locator}}" HorizontalAlignment="Center" Value="{Binding Count}" BadgeMargin="0,-14,-10,0" Height="30" Margin="0,16,0,0" Style="{StaticResource BadgePrimary}">
|
||||
<Button Content="Click2Count" Command="{Binding CountCmd}"/>
|
||||
</controls:Badge>
|
||||
<controls:Badge HorizontalAlignment="Center" Value="100" BadgeMargin="0,-14,-20,0" Height="30" Margin="0,16,0,0" Style="{StaticResource BadgeDanger}">
|
||||
<Button Content="Comment"/>
|
||||
</controls:Badge>
|
||||
<controls:Badge HorizontalAlignment="Center" Status="Dot" Height="30" Margin="0,16,0,0" Style="{StaticResource BadgeDanger}">
|
||||
<Button Content="Reply"/>
|
||||
</controls:Badge>
|
||||
<controls:Badge HorizontalAlignment="Center" Status="Processing" Height="30" Margin="0,16,0,0" Style="{StaticResource BadgeDanger}">
|
||||
<Button Content="Reply" />
|
||||
</controls:Badge>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Border Visibility="Visible" BorderThickness="1" Padding="16" Style="{StaticResource BorderRegion}" CornerRadius="4" Canvas.Left="128" Canvas.Top="310" Width="162" Height="84">
|
||||
<WrapPanel VerticalAlignment="Center" HorizontalAlignment="Center">
|
||||
<controls:Shield Subject="chat" Status="on gitter" Margin="0,0,0,0" Color="#4eb899" Command="interactivity:ControlCommands.OpenLink" controls:LinkElement.Link="https://gitter.im/HandyControl/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge"/>
|
||||
<controls:Shield Subject="qq" Status="714704041" Margin="0,4,0,0" Color="#d8624c" Command="interactivity:ControlCommands.OpenLink" controls:LinkElement.Link="http://shang.qq.com/wpa/qunwpa?idkey=a571e5553c9d41e49c4f22f3a8b2865451497a795ff281fedf3285def247efc1"/>
|
||||
</WrapPanel>
|
||||
</Border>
|
||||
<Border Visibility="Visible" BorderThickness="1" Padding="16" Style="{StaticResource BorderRegion}" CornerRadius="4" Canvas.Left="128" Canvas.Top="408">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<StackPanel Width="271" VerticalAlignment="Center" Margin="0,0,32,0">
|
||||
<controls:LoadingLine/>
|
||||
<controls:LoadingLine Margin="0,28,0,0" Foreground="BlueViolet" Style="{StaticResource LoadingLineLarge}"/>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<controls:LoadingCircle/>
|
||||
<Border VerticalAlignment="Center" Margin="32,0,0,0" Background="{DynamicResource PrimaryBrush}" CornerRadius="10">
|
||||
<controls:LoadingCircle Style="{StaticResource LoadingCircleLight}" Margin="10"/>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Border Visibility="Visible" BorderThickness="1" Padding="16" Style="{StaticResource BorderRegion}" CornerRadius="4" Canvas.Left="611" Canvas.Top="748" Height="214">
|
||||
<controls:Transfer ItemsSource="{Binding DataList}">
|
||||
<controls:Transfer.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Name}"/>
|
||||
</DataTemplate>
|
||||
</controls:Transfer.ItemTemplate>
|
||||
</controls:Transfer>
|
||||
</Border>
|
||||
<Border Visibility="Collapsed" BorderThickness="1" Padding="16" Style="{StaticResource BorderRegion}" CornerRadius="4" Canvas.Left="611" Canvas.Top="976">
|
||||
<userControl:CoverFlowDemoCtl Width="563" Margin="-32" Background="Transparent"/>
|
||||
</Border>
|
||||
<Border Visibility="Collapsed" BorderThickness="1" Padding="16" Style="{StaticResource BorderRegion}" CornerRadius="4" Canvas.Left="1391" Canvas.Top="648" Width="274">
|
||||
<userControl:ColorPickerDemoCtl Margin="-32" Background="Transparent"/>
|
||||
</Border>
|
||||
<Border Visibility="Collapsed" BorderThickness="1" Padding="16" Style="{StaticResource BorderRegion}" CornerRadius="4" Canvas.Left="1113" Canvas.Top="608" Width="264" Height="126">
|
||||
<controls:TagPanel Orientation="Horizontal" MaxWidth="400" VerticalAlignment="Center">
|
||||
<controls:Tag ShowCloseButton="False" Content="TextText"/>
|
||||
<controls:Tag Content="Text"/>
|
||||
<controls:Tag IsSelected="True" Selectable="True" ShowCloseButton="False" Content="Text"/>
|
||||
<controls:Tag IsSelected="True" Selectable="True" Content="Text"/>
|
||||
<controls:Tag ShowCloseButton="False" Content="TextText"/>
|
||||
</controls:TagPanel>
|
||||
</Border>
|
||||
</Canvas>
|
||||
</ScrollViewer>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,18 @@
|
||||
using System.Windows;
|
||||
using HandyControl.Tools.Extension;
|
||||
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class OverView
|
||||
{
|
||||
public OverView()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
foreach (UIElement child in CanvasMain.Children)
|
||||
{
|
||||
child.Show();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,32 +6,32 @@
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<controls:TransitioningContentControl>
|
||||
<UniformGrid Margin="32,32,0,0" Columns="3" Rows="2">
|
||||
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="0,0,32,32">
|
||||
<Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="0,0,32,32">
|
||||
<Border Background="{DynamicResource PrimaryBrush}">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</Border>
|
||||
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="0,0,32,32" Effect="{StaticResource EffectShadow1}">
|
||||
<Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="0,0,32,32" Effect="{StaticResource EffectShadow1}">
|
||||
<Border Background="{DynamicResource InfoBrush}">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</Border>
|
||||
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="0,0,32,32" Effect="{StaticResource EffectShadow2}">
|
||||
<Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="0,0,32,32" Effect="{StaticResource EffectShadow2}">
|
||||
<Border Background="{DynamicResource WarningBrush}">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</Border>
|
||||
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="0,0,32,32" Effect="{StaticResource EffectShadow3}">
|
||||
<Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="0,0,32,32" Effect="{StaticResource EffectShadow3}">
|
||||
<Border Background="{DynamicResource DangerBrush}">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</Border>
|
||||
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="0,0,32,32" Effect="{StaticResource EffectShadow4}">
|
||||
<Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="0,0,32,32" Effect="{StaticResource EffectShadow4}">
|
||||
<Border Background="{DynamicResource AccentBrush}">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</Border>
|
||||
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="0,0,32,32" Effect="{StaticResource EffectShadow5}">
|
||||
<Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="0,0,32,32" Effect="{StaticResource EffectShadow5}">
|
||||
<Border Background="{DynamicResource BorderBrush}">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
||||
</Border>
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
|
||||
namespace HandyControlDemo.UserControl
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class CalendarDemoCtl
|
||||
{
|
||||
|
||||
@@ -15,27 +15,27 @@
|
||||
<Border BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}">
|
||||
<ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Hidden">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Background="{DynamicResource PrimaryBrush}">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</Border>
|
||||
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Background="{DynamicResource PrimaryBrush}">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</Border>
|
||||
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Background="{DynamicResource PrimaryBrush}">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</Border>
|
||||
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Background="{DynamicResource PrimaryBrush}">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</Border>
|
||||
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Background="{DynamicResource PrimaryBrush}">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
@@ -46,27 +46,27 @@
|
||||
<Border Grid.Row="1" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}" Margin="0,16,0,0">
|
||||
<ScrollViewer>
|
||||
<WrapPanel Orientation="Horizontal">
|
||||
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Background="{DynamicResource PrimaryBrush}">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</Border>
|
||||
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Background="{DynamicResource PrimaryBrush}">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</Border>
|
||||
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Background="{DynamicResource PrimaryBrush}">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</Border>
|
||||
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Background="{DynamicResource PrimaryBrush}">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</Border>
|
||||
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Background="{DynamicResource PrimaryBrush}">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using GalaSoft.MvvmLight;
|
||||
using HandyControl.Controls;
|
||||
using HandyControl.Data;
|
||||
#if netle40
|
||||
using GalaSoft.MvvmLight.Command;
|
||||
#else
|
||||
using GalaSoft.MvvmLight.CommandWpf;
|
||||
# endif
|
||||
|
||||
namespace HandyControlDemo.ViewModel
|
||||
{
|
||||
public class SideMenuDemoViewModel : ViewModelBase
|
||||
{
|
||||
public RelayCommand<FunctionEventArgs<object>> SwitchItemCmd => new Lazy<RelayCommand<FunctionEventArgs<object>>>(() =>
|
||||
new RelayCommand<FunctionEventArgs<object>>(SwitchItem)).Value;
|
||||
|
||||
private void SwitchItem(FunctionEventArgs<object> info) => Growl.Info((info.Info as SideMenuItem)?.Header.ToString());
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,7 @@ using GalaSoft.MvvmLight.Messaging;
|
||||
using HandyControlDemo.Data;
|
||||
using HandyControlDemo.Service;
|
||||
using HandyControlDemo.Tools;
|
||||
using HandyControlDemo.UserControl;
|
||||
|
||||
namespace HandyControlDemo.ViewModel
|
||||
{
|
||||
@@ -91,6 +92,12 @@ namespace HandyControlDemo.ViewModel
|
||||
new Lazy<RelayCommand<SelectionChangedEventArgs>>(() =>
|
||||
new RelayCommand<SelectionChangedEventArgs>(SwitchDemo)).Value;
|
||||
|
||||
/// <summary>
|
||||
/// 打开概览命令
|
||||
/// </summary>
|
||||
public RelayCommand OpenOverviewCmd => new Lazy<RelayCommand>(() =>
|
||||
new RelayCommand(OpenOverview)).Value;
|
||||
|
||||
#endregion
|
||||
|
||||
#region 方法
|
||||
@@ -108,9 +115,10 @@ namespace HandyControlDemo.ViewModel
|
||||
if (Equals(_listBoxItemCurrent, item)) return;
|
||||
_listBoxItemCurrent = item;
|
||||
ContentTitle = item.Content;
|
||||
Messenger.Default.Send(false, MessageToken.FullSwitch);
|
||||
var obj = AssemblyHelper.ResolveByKey(tag);
|
||||
Messenger.Default.Send(obj ?? AssemblyHelper.CreateInternalInstance($"UserControl.{tag}"), MessageToken.LoadShowContent);
|
||||
var ctl = obj ?? AssemblyHelper.CreateInternalInstance($"UserControl.{tag}");
|
||||
Messenger.Default.Send(ctl is IFull, MessageToken.FullSwitch);
|
||||
Messenger.Default.Send(ctl, MessageToken.LoadShowContent);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -121,6 +129,16 @@ namespace HandyControlDemo.ViewModel
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
/// <summary>
|
||||
/// 打开概览
|
||||
/// </summary>
|
||||
private void OpenOverview()
|
||||
{
|
||||
Messenger.Default.Send<object>(null, MessageToken.ClearLeftSelected);
|
||||
Messenger.Default.Send(true, MessageToken.FullSwitch);
|
||||
Messenger.Default.Send(AssemblyHelper.CreateInternalInstance($"UserControl.{MessageToken.OverView}"), MessageToken.LoadShowContent);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -33,6 +33,7 @@ namespace HandyControlDemo.ViewModel
|
||||
SimpleIoc.Default.Register<NotifyIconDemoViewModel>();
|
||||
SimpleIoc.Default.Register<InteractiveDialogViewModel>();
|
||||
SimpleIoc.Default.Register<BadgeDemoViewModel>();
|
||||
SimpleIoc.Default.Register<SideMenuDemoViewModel>();
|
||||
}
|
||||
|
||||
public static ViewModelLocator Instance => new Lazy<ViewModelLocator>(() =>
|
||||
@@ -71,6 +72,9 @@ namespace HandyControlDemo.ViewModel
|
||||
public InteractiveDialogViewModel InteractiveDialog => ServiceLocator.Current.GetInstance<InteractiveDialogViewModel>();
|
||||
|
||||
public BadgeDemoViewModel BadgeDemo => ServiceLocator.Current.GetInstance<BadgeDemoViewModel>();
|
||||
|
||||
public SideMenuDemoViewModel SideMenuDemo => ServiceLocator.Current.GetInstance<SideMenuDemoViewModel>();
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using System.Windows;
|
||||
|
||||
namespace HandyControl.Controls
|
||||
{
|
||||
public class HeaderedSimpleItemsControl : SimpleItemsControl
|
||||
{
|
||||
public static readonly DependencyProperty HeaderProperty = DependencyProperty.Register(
|
||||
"Header", typeof(object), typeof(HeaderedSimpleItemsControl), new PropertyMetadata(default(object)));
|
||||
|
||||
public object Header
|
||||
{
|
||||
get => GetValue(HeaderProperty);
|
||||
set => SetValue(HeaderProperty, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,7 @@ using System.ComponentModel;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Markup;
|
||||
using HandyControl.Data;
|
||||
|
||||
namespace HandyControl.Controls
|
||||
{
|
||||
@@ -33,7 +34,14 @@ namespace HandyControl.Controls
|
||||
public SimpleItemsControl()
|
||||
{
|
||||
var items = new ObservableCollection<object>();
|
||||
items.CollectionChanged += OnItemsChanged;
|
||||
items.CollectionChanged += (s, e) =>
|
||||
{
|
||||
if (e.NewItems != null && e.NewItems.Count > 0)
|
||||
{
|
||||
SetValue(HasItemsPropertyKey, true);
|
||||
}
|
||||
OnItemsChanged(s, e);
|
||||
};
|
||||
Items = items;
|
||||
}
|
||||
|
||||
@@ -118,6 +126,14 @@ namespace HandyControl.Controls
|
||||
|
||||
protected virtual void OnItemContainerStyleChanged(DependencyPropertyChangedEventArgs e) => Refresh();
|
||||
|
||||
internal static readonly DependencyPropertyKey HasItemsPropertyKey =
|
||||
DependencyProperty.RegisterReadOnly(nameof(HasItems), typeof(bool), typeof(SimpleItemsControl),
|
||||
new PropertyMetadata(ValueBoxes.FalseBox));
|
||||
|
||||
public static readonly DependencyProperty HasItemsProperty = HasItemsPropertyKey.DependencyProperty;
|
||||
|
||||
public bool HasItems => (bool) GetValue(HasItemsProperty);
|
||||
|
||||
protected virtual void Refresh()
|
||||
{
|
||||
if (ItemsHost == null) return;
|
||||
|
||||
@@ -194,6 +194,8 @@ namespace HandyControl.Controls
|
||||
var index = PageIndex - 1;
|
||||
PageIndex = index < 0 ? (Loop ? _uriList.Count - 1 : 0) : index;
|
||||
}
|
||||
|
||||
e.Handled = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using HandyControl.Data;
|
||||
using HandyControl.Tools.Extension;
|
||||
|
||||
namespace HandyControl.Controls
|
||||
{
|
||||
public class Col : ContentControl
|
||||
{
|
||||
public static readonly DependencyProperty LayoutProperty = DependencyProperty.Register(
|
||||
"Layout", typeof(ColLayout), typeof(Col), new PropertyMetadata(new ColLayout()));
|
||||
|
||||
public ColLayout Layout
|
||||
{
|
||||
get => (ColLayout)GetValue(LayoutProperty);
|
||||
set => SetValue(LayoutProperty, value);
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty OffsetProperty = DependencyProperty.Register(
|
||||
"Offset", typeof(int), typeof(Col), new PropertyMetadata(default(int)));
|
||||
|
||||
public int Offset
|
||||
{
|
||||
get => (int)GetValue(OffsetProperty);
|
||||
set => SetValue(OffsetProperty, value);
|
||||
}
|
||||
|
||||
internal int GetLayoutCellCount(ColLayoutStatus status)
|
||||
{
|
||||
switch (status)
|
||||
{
|
||||
case ColLayoutStatus.Xs: return Layout.Xs;
|
||||
case ColLayoutStatus.Sm: return Layout.Sm;
|
||||
case ColLayoutStatus.Md: return Layout.Md;
|
||||
case ColLayoutStatus.Lg: return Layout.Lg;
|
||||
case ColLayoutStatus.Xl: return Layout.Xl;
|
||||
case ColLayoutStatus.Xxl: return Layout.Xxl;
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
using HandyControl.Tools.Extension;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using HandyControl.Data;
|
||||
|
||||
namespace HandyControl.Controls
|
||||
{
|
||||
public class Row : Panel
|
||||
{
|
||||
private ColLayoutStatus _layoutStatus;
|
||||
|
||||
public static readonly DependencyProperty GutterProperty = DependencyProperty.Register(
|
||||
"Gutter", typeof(double), typeof(Row), new PropertyMetadata(default(double)));
|
||||
|
||||
public double Gutter
|
||||
{
|
||||
get => (double)GetValue(GutterProperty);
|
||||
set => SetValue(GutterProperty, value);
|
||||
}
|
||||
|
||||
protected override Size MeasureOverride(Size constraint)
|
||||
{
|
||||
var itemWidth = constraint.Width / ColLayout.ColMaxCellCount;
|
||||
var totalCellCount = 0;
|
||||
var totalRowCount = 1;
|
||||
var maxChildDesiredHeight = .0;
|
||||
|
||||
for (int i = 0, count = InternalChildren.Count; i < count; ++i)
|
||||
{
|
||||
var child = InternalChildren[i];
|
||||
|
||||
child.Measure(constraint);
|
||||
var childDesiredSize = child.DesiredSize;
|
||||
|
||||
if (maxChildDesiredHeight < childDesiredSize.Height)
|
||||
{
|
||||
maxChildDesiredHeight = childDesiredSize.Height;
|
||||
}
|
||||
}
|
||||
|
||||
var childBounds = new Rect(0, 0, 0, maxChildDesiredHeight);
|
||||
_layoutStatus = ColLayout.GetLayoutStatus(constraint.Width);
|
||||
|
||||
foreach (var child in InternalChildren.OfType<Col>())
|
||||
{
|
||||
var cellCount = child.GetLayoutCellCount(_layoutStatus);
|
||||
totalCellCount += cellCount;
|
||||
|
||||
if (totalCellCount > ColLayout.ColMaxCellCount)
|
||||
{
|
||||
childBounds.X = 0;
|
||||
childBounds.Y += maxChildDesiredHeight;
|
||||
totalCellCount = cellCount;
|
||||
totalRowCount++;
|
||||
}
|
||||
|
||||
var childWidth = cellCount * itemWidth;
|
||||
childBounds.Width = childWidth;
|
||||
child.Arrange(childBounds);
|
||||
childBounds.X += childWidth;
|
||||
}
|
||||
|
||||
return new Size(constraint.Width, maxChildDesiredHeight * totalRowCount);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -152,7 +152,7 @@ namespace HandyControl.Controls
|
||||
/// </summary>
|
||||
public static readonly DependencyProperty ValueProperty = DependencyProperty.Register(
|
||||
"Value", typeof(double), typeof(NumericUpDown),
|
||||
new FrameworkPropertyMetadata(default(double), FrameworkPropertyMetadataOptions.BindsTwoWayByDefault,
|
||||
new FrameworkPropertyMetadata(ValueBoxes.Double0Box, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault,
|
||||
OnValueChanged, CoerceValue), ArithmeticHelper.IsValidDoubleValue);
|
||||
|
||||
private static void OnValueChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||
@@ -204,7 +204,7 @@ namespace HandyControl.Controls
|
||||
/// 最大值
|
||||
/// </summary>
|
||||
public static readonly DependencyProperty MaximumProperty = DependencyProperty.Register(
|
||||
"Maximum", typeof(double), typeof(NumericUpDown), new PropertyMetadata(100.0, OnMaximumChanged, CoerceMaximum), ArithmeticHelper.IsValidDoubleValue);
|
||||
"Maximum", typeof(double), typeof(NumericUpDown), new PropertyMetadata(double.MaxValue, OnMaximumChanged, CoerceMaximum), ArithmeticHelper.IsValidDoubleValue);
|
||||
|
||||
private static void OnMaximumChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
|
||||
@@ -0,0 +1,189 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using HandyControl.Data;
|
||||
|
||||
namespace HandyControl.Controls
|
||||
{
|
||||
public class SideMenu : HeaderedSimpleItemsControl
|
||||
{
|
||||
private SideMenuItem _selectedItem;
|
||||
|
||||
private SideMenuItem _selectedHeader;
|
||||
|
||||
private bool _isItemSelected;
|
||||
|
||||
public SideMenu()
|
||||
{
|
||||
AddHandler(SideMenuItem.SelectedEvent, new RoutedEventHandler(SideMenuItemSelected));
|
||||
|
||||
Loaded += (s, e) => Init();
|
||||
}
|
||||
|
||||
protected override void Refresh()
|
||||
{
|
||||
base.Refresh();
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
private void Init()
|
||||
{
|
||||
if (ItemsHost == null) return;
|
||||
|
||||
OnExpandModeChanged(ExpandMode);
|
||||
}
|
||||
|
||||
private void SideMenuItemSelected(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (e.OriginalSource is SideMenuItem item)
|
||||
{
|
||||
if (item.Role == SideMenuItemRole.Item)
|
||||
{
|
||||
if (Equals(item, _selectedItem)) return;
|
||||
|
||||
if (_selectedItem != null)
|
||||
{
|
||||
_selectedItem.IsSelected = false;
|
||||
}
|
||||
|
||||
_selectedItem = item;
|
||||
_selectedItem.IsSelected = true;
|
||||
RaiseEvent(new FunctionEventArgs<object>(SelectionChangedEvent, this)
|
||||
{
|
||||
Info = e.OriginalSource
|
||||
});
|
||||
_isItemSelected = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!Equals(item, _selectedHeader))
|
||||
{
|
||||
if (_selectedHeader != null)
|
||||
{
|
||||
if (ExpandMode == ExpandMode.Freedom && item.ItemsHost.IsVisible && !_isItemSelected)
|
||||
{
|
||||
item.IsSelected = false;
|
||||
SwitchPanelArea(item);
|
||||
return;
|
||||
}
|
||||
|
||||
_selectedHeader.IsSelected = false;
|
||||
if (ExpandMode != ExpandMode.Freedom)
|
||||
{
|
||||
SwitchPanelArea(_selectedHeader);
|
||||
}
|
||||
}
|
||||
|
||||
_selectedHeader = item;
|
||||
_selectedHeader.IsSelected = true;
|
||||
SwitchPanelArea(_selectedHeader);
|
||||
}
|
||||
else if (ExpandMode == ExpandMode.Freedom && !_isItemSelected)
|
||||
{
|
||||
_selectedHeader.IsSelected = false;
|
||||
SwitchPanelArea(_selectedHeader);
|
||||
_selectedHeader = null;
|
||||
}
|
||||
|
||||
if (_isItemSelected)
|
||||
{
|
||||
_isItemSelected = false;
|
||||
}
|
||||
else if(_selectedHeader != null)
|
||||
{
|
||||
_selectedHeader.SelectDefaultItem();
|
||||
_isItemSelected = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void SwitchPanelArea(SideMenuItem oldItem)
|
||||
{
|
||||
switch (ExpandMode)
|
||||
{
|
||||
case ExpandMode.ShowAll:
|
||||
return;
|
||||
case ExpandMode.ShowOne:
|
||||
case ExpandMode.Freedom:
|
||||
case ExpandMode.Accordion:
|
||||
oldItem.SwitchPanelArea(oldItem.IsSelected);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
protected override DependencyObject GetContainerForItemOverride() => new SideMenuItem();
|
||||
|
||||
protected override bool IsItemItsOwnContainerOverride(object item) => item is SideMenuItem;
|
||||
|
||||
public static readonly DependencyProperty ExpandModeProperty = DependencyProperty.Register(
|
||||
"ExpandMode", typeof(ExpandMode), typeof(SideMenu), new PropertyMetadata(default(ExpandMode), OnExpandModeChanged));
|
||||
|
||||
private static void OnExpandModeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
var ctl = (SideMenu) d;
|
||||
var v = (ExpandMode) e.NewValue;
|
||||
|
||||
if (ctl.ItemsHost == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
ctl.OnExpandModeChanged(v);
|
||||
}
|
||||
|
||||
private void OnExpandModeChanged(ExpandMode mode)
|
||||
{
|
||||
if (mode == ExpandMode.ShowAll)
|
||||
{
|
||||
ShowAll();
|
||||
}
|
||||
else if (mode == ExpandMode.ShowOne)
|
||||
{
|
||||
var sideMenuItem = ItemsHost.Children.OfType<SideMenuItem>().FirstOrDefault(item => item.IsSelected);
|
||||
ShowSelectedOne(sideMenuItem);
|
||||
}
|
||||
}
|
||||
|
||||
public ExpandMode ExpandMode
|
||||
{
|
||||
get => (ExpandMode) GetValue(ExpandModeProperty);
|
||||
set => SetValue(ExpandModeProperty, value);
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty PanelAreaLengthProperty = DependencyProperty.Register(
|
||||
"PanelAreaLength", typeof(double), typeof(SideMenu), new PropertyMetadata(double.NaN));
|
||||
|
||||
public double PanelAreaLength
|
||||
{
|
||||
get => (double) GetValue(PanelAreaLengthProperty);
|
||||
set => SetValue(PanelAreaLengthProperty, value);
|
||||
}
|
||||
|
||||
private void ShowAll()
|
||||
{
|
||||
foreach (var sideMenuItem in ItemsHost.Children.OfType<SideMenuItem>())
|
||||
{
|
||||
sideMenuItem.SwitchPanelArea(true);
|
||||
}
|
||||
}
|
||||
|
||||
private void ShowSelectedOne(SideMenuItem item)
|
||||
{
|
||||
foreach (var sideMenuItem in ItemsHost.Children.OfType<SideMenuItem>())
|
||||
{
|
||||
sideMenuItem.SwitchPanelArea(Equals(sideMenuItem, item));
|
||||
}
|
||||
}
|
||||
|
||||
public static readonly RoutedEvent SelectionChangedEvent = EventManager.RegisterRoutedEvent(
|
||||
"SelectionChanged", RoutingStrategy.Bubble, typeof(EventHandler<FunctionEventArgs<object>>), typeof(SideMenu));
|
||||
|
||||
public event EventHandler<FunctionEventArgs<object>> SelectionChanged
|
||||
{
|
||||
add => AddHandler(SelectionChangedEvent, value);
|
||||
remove => RemoveHandler(SelectionChangedEvent, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,152 @@
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Input;
|
||||
using HandyControl.Data;
|
||||
using HandyControl.Tools.Extension;
|
||||
|
||||
namespace HandyControl.Controls
|
||||
{
|
||||
public class SideMenuItem : HeaderedSimpleItemsControl, ISelectable
|
||||
{
|
||||
private bool _isMouseLeftButtonDown;
|
||||
|
||||
public static readonly DependencyProperty IconProperty = DependencyProperty.Register(
|
||||
"Icon", typeof(object), typeof(SideMenuItem), new PropertyMetadata(default(object)));
|
||||
|
||||
public object Icon
|
||||
{
|
||||
get => GetValue(IconProperty);
|
||||
set => SetValue(IconProperty, value);
|
||||
}
|
||||
|
||||
public SideMenuItem()
|
||||
{
|
||||
SetBinding(ExpandModeProperty, new Binding(SideMenu.ExpandModeProperty.Name)
|
||||
{
|
||||
RelativeSource = new RelativeSource(RelativeSourceMode.FindAncestor, typeof(SideMenu), 1)
|
||||
});
|
||||
}
|
||||
|
||||
internal static readonly DependencyProperty ExpandModeProperty =
|
||||
SideMenu.ExpandModeProperty.AddOwner(typeof(SideMenuItem), new PropertyMetadata(default(ExpandMode)));
|
||||
|
||||
internal ExpandMode ExpandMode
|
||||
{
|
||||
get => (ExpandMode) GetValue(ExpandModeProperty);
|
||||
set => SetValue(ExpandModeProperty, value);
|
||||
}
|
||||
|
||||
protected override void Refresh()
|
||||
{
|
||||
if (ItemsHost == null) return;
|
||||
|
||||
ItemsHost.Children.Clear();
|
||||
foreach (var item in Items)
|
||||
{
|
||||
DependencyObject container;
|
||||
if (IsItemItsOwnContainerOverride(item))
|
||||
{
|
||||
container = item as DependencyObject;
|
||||
}
|
||||
else
|
||||
{
|
||||
container = GetContainerForItemOverride();
|
||||
PrepareContainerForItemOverride(container, item);
|
||||
}
|
||||
|
||||
if (container is FrameworkElement element)
|
||||
{
|
||||
element.Style = ItemContainerStyle;
|
||||
ItemsHost.Children.Add(element);
|
||||
}
|
||||
}
|
||||
|
||||
if (IsLoaded)
|
||||
{
|
||||
SwitchPanelArea(ExpandMode == ExpandMode.ShowAll || IsSelected);
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual void OnSelected(RoutedEventArgs e) => RaiseEvent(e);
|
||||
|
||||
public static readonly RoutedEvent SelectedEvent =
|
||||
EventManager.RegisterRoutedEvent("Selected", RoutingStrategy.Bubble,
|
||||
typeof(RoutedEventHandler), typeof(SideMenuItem));
|
||||
|
||||
public event RoutedEventHandler Selected
|
||||
{
|
||||
add => AddHandler(SelectedEvent, value);
|
||||
remove => RemoveHandler(SelectedEvent, value);
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty IsSelectedProperty = DependencyProperty.Register(
|
||||
"IsSelected", typeof(bool), typeof(SideMenuItem), new PropertyMetadata(ValueBoxes.FalseBox));
|
||||
|
||||
public bool IsSelected
|
||||
{
|
||||
get => (bool) GetValue(IsSelectedProperty);
|
||||
set => SetValue(IsSelectedProperty, value);
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty RoleProperty = DependencyProperty.Register(
|
||||
"Role", typeof(SideMenuItemRole), typeof(SideMenuItem), new PropertyMetadata(default(SideMenuItemRole)));
|
||||
|
||||
public SideMenuItemRole Role
|
||||
{
|
||||
get => (SideMenuItemRole) GetValue(RoleProperty);
|
||||
internal set => SetValue(RoleProperty, value);
|
||||
}
|
||||
|
||||
protected override DependencyObject GetContainerForItemOverride() => new SideMenuItem();
|
||||
|
||||
protected override bool IsItemItsOwnContainerOverride(object item) => item is SideMenuItem;
|
||||
|
||||
protected override void OnMouseLeave(MouseEventArgs e)
|
||||
{
|
||||
base.OnMouseLeave(e);
|
||||
|
||||
_isMouseLeftButtonDown = false;
|
||||
}
|
||||
|
||||
protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
|
||||
{
|
||||
base.OnMouseLeftButtonDown(e);
|
||||
|
||||
_isMouseLeftButtonDown = true;
|
||||
}
|
||||
|
||||
protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e)
|
||||
{
|
||||
base.OnMouseLeftButtonUp(e);
|
||||
|
||||
if (_isMouseLeftButtonDown)
|
||||
{
|
||||
IsSelected = true;
|
||||
OnSelected(new RoutedEventArgs(SelectedEvent, this));
|
||||
_isMouseLeftButtonDown = false;
|
||||
}
|
||||
}
|
||||
|
||||
internal void SelectDefaultItem()
|
||||
{
|
||||
if (Role == SideMenuItemRole.Header && ItemsHost.Children.Count > 0)
|
||||
{
|
||||
var item = ItemsHost.Children.OfType<SideMenuItem>().FirstOrDefault();
|
||||
if (item != null && !item.IsSelected)
|
||||
{
|
||||
item.OnSelected(new RoutedEventArgs(SelectedEvent, item));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal void SwitchPanelArea(bool isShow)
|
||||
{
|
||||
if (ItemsHost == null) return;
|
||||
if (Role == SideMenuItemRole.Header)
|
||||
{
|
||||
ItemsHost.Show(isShow);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -30,6 +30,10 @@ namespace HandyControl.Controls
|
||||
|
||||
private IEnumerable _itemsSourceInternal;
|
||||
|
||||
private IEnumerable _initEnumerable;
|
||||
|
||||
private NotifyCollectionChangedEventArgs _initArgs;
|
||||
|
||||
public static readonly RoutedEvent SelectionChangedEvent =
|
||||
EventManager.RegisterRoutedEvent("SelectionChanged", RoutingStrategy.Bubble,
|
||||
typeof(SelectionChangedEventHandler), typeof(Transfer));
|
||||
@@ -71,7 +75,22 @@ namespace HandyControl.Controls
|
||||
_itemsOrigin = GetTemplateChild(ElementItemsOrigin) as SimpleItemsControl;
|
||||
_itemsSelected = GetTemplateChild(ElementItemsSelected) as SimpleItemsControl;
|
||||
|
||||
Refresh();
|
||||
if (_itemsOrigin != null && _itemsSelected != null)
|
||||
{
|
||||
if (_initEnumerable != null)
|
||||
{
|
||||
OnItemsSourceChanged(null, _itemsSourceInternal);
|
||||
_itemsSourceInternal = null;
|
||||
}
|
||||
|
||||
if (_initArgs != null)
|
||||
{
|
||||
InternalCollectionChanged(null, _initArgs);
|
||||
_initArgs = null;
|
||||
}
|
||||
|
||||
Refresh();
|
||||
}
|
||||
}
|
||||
|
||||
private void AddItem(object item)
|
||||
@@ -114,6 +133,12 @@ namespace HandyControl.Controls
|
||||
|
||||
protected override void OnItemsSourceChanged(IEnumerable oldValue, IEnumerable newValue)
|
||||
{
|
||||
if (_itemsOrigin == null || _itemsSelected == null)
|
||||
{
|
||||
_initEnumerable = newValue;
|
||||
return;
|
||||
}
|
||||
|
||||
if (_itemsSourceInternal != null)
|
||||
{
|
||||
if (_itemsSourceInternal is INotifyCollectionChanged s)
|
||||
@@ -139,6 +164,12 @@ namespace HandyControl.Controls
|
||||
|
||||
private void InternalCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
|
||||
{
|
||||
if (_itemsOrigin == null || _itemsSelected == null)
|
||||
{
|
||||
_initArgs = e;
|
||||
return;
|
||||
}
|
||||
|
||||
if (e.OldItems != null)
|
||||
{
|
||||
foreach (var item in e.OldItems)
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
namespace HandyControl.Data
|
||||
{
|
||||
public enum ColLayoutStatus
|
||||
{
|
||||
Xs,
|
||||
Sm,
|
||||
Md,
|
||||
Lg,
|
||||
Xl,
|
||||
Xxl,
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
namespace HandyControl.Data
|
||||
{
|
||||
public enum ExpandMode
|
||||
{
|
||||
/// <summary>
|
||||
/// 最多只能显示一项,且不可折叠
|
||||
/// </summary>
|
||||
ShowOne,
|
||||
|
||||
/// <summary>
|
||||
/// 显示所有项,且不可折叠
|
||||
/// </summary>
|
||||
ShowAll,
|
||||
|
||||
/// <summary>
|
||||
/// 类似ShowOne,但是控件的尺寸不随项的数量而改变
|
||||
/// </summary>
|
||||
Accordion,
|
||||
|
||||
/// <summary>
|
||||
/// 没有任何限制
|
||||
/// </summary>
|
||||
Freedom
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace HandyControl.Data
|
||||
{
|
||||
public enum SideMenuItemRole
|
||||
{
|
||||
Header,
|
||||
Item
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace HandyControl.Data
|
||||
{
|
||||
public class HandyControlConfig
|
||||
{
|
||||
public SystemVersionInfo SystemVersionInfo { get; set; }
|
||||
|
||||
public string Lang { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -25,6 +25,7 @@
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Attach\VisualElement.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Attach\WindowAttach.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Base\HeaderedSelectableItem.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Base\HeaderedSimpleItemsControl.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Base\IGravatarGenerator.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Base\ISelectable.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Base\ISingleOpen.cs" />
|
||||
@@ -39,6 +40,8 @@
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Cover\CoverView\CoverView.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Cover\CoverView\CoverViewContent.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Cover\CoverView\CoverViewItem.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Grid\Col.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Grid\Row.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Image\GifImage.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Image\ImageViewer.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Input\ComboBox.cs" />
|
||||
@@ -77,6 +80,8 @@
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\ProgressBar\WaveProgressBar.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Rate\Rate.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Rate\RateItem.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\SideMenu\SideMenu.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\SideMenu\SideMenuItem.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Slider\CompareSlider.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Slider\CompareTrack.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Slider\PreviewSlider.cs" />
|
||||
@@ -109,9 +114,12 @@
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Data\Enum\BadgeStatus.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Data\Enum\ChatMessageType.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Data\Enum\ChatRoleType.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Data\Enum\ColLayoutStatus.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Data\Enum\ExpandMode.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Data\Enum\InfoType.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Data\Enum\IpType.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Data\Enum\ResultType.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Data\Enum\SideMenuItemRole.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Data\Enum\SkinType.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Data\Enum\StepStatus.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Data\Enum\TextType.cs" />
|
||||
@@ -123,6 +131,7 @@
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Data\Gif\GifPropertyItemInternal.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Data\Gif\GPStream.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Data\GrowlInfo.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Data\HandyControlConfig.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Data\MessageBoxInfo.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Data\Operation\OperationResult!1.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Data\Operation\OperationResult.cs" />
|
||||
@@ -211,6 +220,7 @@
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Tools\Converter\String2VisibilityConverter.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Tools\Converter\String2VisibilityReConverter.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Tools\Converter\TreeViewItemMarginConverter.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Tools\Extension\ColLayout.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Tools\Extension\ColorExtension.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Tools\Extension\DialogExtension.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Tools\Extension\EnumerableExtension.cs" />
|
||||
@@ -221,6 +231,7 @@
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Tools\Helper\AnimationHelper.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Tools\Helper\ArithmeticHelper.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Tools\Helper\ColorHelper.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Tools\Helper\ConfigHelper.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Tools\Helper\CreateParams.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Tools\Helper\DesignerHelper.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Tools\Helper\ExternDllHelper.cs" />
|
||||
@@ -439,6 +450,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="$(MSBuildThisFileDirectory)Themes\Styles\Base\SideMenuBaseStyle.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="$(MSBuildThisFileDirectory)Themes\Styles\Base\StepBarBaseStyle.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
@@ -639,6 +654,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="$(MSBuildThisFileDirectory)Themes\Styles\SideMenu.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="$(MSBuildThisFileDirectory)Themes\Styles\SimpleItemsControl.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
|
||||
@@ -11,5 +11,5 @@ using System.Runtime.InteropServices;
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: ComVisible(false)]
|
||||
[assembly: AssemblyVersion("1.5.4")]
|
||||
[assembly: AssemblyVersion("1.5.5")]
|
||||
#endif
|
||||
@@ -150,7 +150,7 @@
|
||||
|
||||
<Style x:Key="RadioGroupItemBaseStyle" TargetType="RadioButton">
|
||||
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
|
||||
<Setter Property="Background" Value="{DynamicResource DefaultBrush}"/>
|
||||
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<Style x:Key="RadioGroupBaseStyle" TargetType="controls:RadioGroup">
|
||||
<Setter Property="ItemsPanel" Value="{StaticResource RadioGroupHorizontalItemsPanelTemplate}"/>
|
||||
<Setter Property="controls:TitleElement.BorderBrush" Value="{DynamicResource PrimaryBrush}"/>
|
||||
<Setter Property="controls:TitleElement.Background" Value="{DynamicResource DefaultBrush}"/>
|
||||
<Setter Property="controls:TitleElement.Background" Value="{DynamicResource RegionBrush}"/>
|
||||
<Setter Property="controls:TitleElement.Foreground" Value="{DynamicResource PrimaryBrush}"/>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="Orientation" Value="Vertical">
|
||||
|
||||
@@ -0,0 +1,188 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls">
|
||||
|
||||
<Style x:Key="SideMenuItemBaseStyle" TargetType="controls:SideMenuItem">
|
||||
<Setter Property="Role" Value="Item"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
|
||||
<Setter Property="MinHeight" Value="40"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="controls:SideMenuItem">
|
||||
<Border Name="BorderRoot" Background="{TemplateBinding Background}">
|
||||
<controls:SimplePanel>
|
||||
<Rectangle Width="4" Fill="{TemplateBinding BorderBrush}" HorizontalAlignment="Left"/>
|
||||
<ContentControl Margin="4,0,0,0">
|
||||
<DockPanel Margin="{TemplateBinding Padding}">
|
||||
<ContentControl Width="40" Name="PresenterIcon">
|
||||
<ContentPresenter ContentSource="Icon" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
</ContentControl>
|
||||
<ContentPresenter Name="PresenterHeader" ContentSource="Header" Margin="6,0,0,0" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
|
||||
</DockPanel>
|
||||
</ContentControl>
|
||||
</controls:SimplePanel>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="Icon" Value="{x:Null}">
|
||||
<Setter TargetName="PresenterIcon" Property="Visibility" Value="Collapsed"/>
|
||||
</Trigger>
|
||||
<DataTrigger Binding="{Binding IsSelected,RelativeSource={RelativeSource AncestorType=controls:SideMenuItem}}" Value="True">
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
|
||||
</DataTrigger>
|
||||
<Trigger Property="IsSelected" Value="True">
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}"/>
|
||||
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}"/>
|
||||
<Setter Property="TextElement.FontWeight" Value="Bold" TargetName="PresenterHeader"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsMouseOver" Value="true">
|
||||
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="SideMenuItemAccordionBaseStyle" BasedOn="{StaticResource SideMenuItemBaseStyle}" TargetType="controls:SideMenuItem">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="controls:SideMenuItem">
|
||||
<Border Name="BorderRoot" Background="{TemplateBinding Background}">
|
||||
<controls:SimplePanel>
|
||||
<Rectangle Width="4" Fill="{TemplateBinding BorderBrush}" HorizontalAlignment="Left"/>
|
||||
<ContentControl Margin="4,0,0,0">
|
||||
<DockPanel Margin="{TemplateBinding Padding}">
|
||||
<ContentControl Width="40" Name="PresenterIcon">
|
||||
<ContentPresenter ContentSource="Icon" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
</ContentControl>
|
||||
<ContentPresenter Name="PresenterHeader" ContentSource="Header" Margin="6,0,0,0" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
|
||||
</DockPanel>
|
||||
</ContentControl>
|
||||
</controls:SimplePanel>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="Icon" Value="{x:Null}">
|
||||
<Setter TargetName="PresenterIcon" Property="Visibility" Value="Collapsed"/>
|
||||
</Trigger>
|
||||
<DataTrigger Binding="{Binding IsSelected,RelativeSource={RelativeSource AncestorType=controls:SideMenuItem}}" Value="True">
|
||||
<Setter Property="BorderBrush" Value="Transparent"/>
|
||||
</DataTrigger>
|
||||
<Trigger Property="IsSelected" Value="True">
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}"/>
|
||||
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}"/>
|
||||
<Setter Property="TextElement.FontWeight" Value="Bold" TargetName="PresenterHeader"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsMouseOver" Value="true">
|
||||
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="SideMenuItemHeaderBaseStyle" TargetType="controls:SideMenuItem">
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
|
||||
<Setter Property="ItemContainerStyle" Value="{StaticResource SideMenuItemBaseStyle}"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="controls:SideMenuItem">
|
||||
<Border Name="BorderRoot" Background="{TemplateBinding Background}">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition MinHeight="48"/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<Border Name="BorderBack" Background="{TemplateBinding Background}"/>
|
||||
<ContentControl Grid.Row="0" Margin="4,0,0,0">
|
||||
<DockPanel Margin="{TemplateBinding Padding}" Name="PanelHeader" Background="Transparent">
|
||||
<ContentControl Width="40" Name="PresenterIcon">
|
||||
<ContentPresenter ContentSource="Icon" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
</ContentControl>
|
||||
<ContentPresenter Name="PresenterHeader" ContentSource="Header" Margin="6,0,0,0" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
|
||||
</DockPanel>
|
||||
</ContentControl>
|
||||
<StackPanel Grid.Row="1" x:Name="PART_Panel" Visibility="Collapsed" Height="{Binding PanelAreaLength,RelativeSource={RelativeSource AncestorType=controls:SideMenu}}"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="Icon" Value="{x:Null}">
|
||||
<Setter TargetName="PresenterIcon" Property="Visibility" Value="Collapsed"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsSelected" Value="True">
|
||||
<Setter TargetName="BorderBack" Property="BorderThickness" Value="4,0,0,0"/>
|
||||
<Setter TargetName="BorderBack" Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
|
||||
<Setter Property="TextElement.FontWeight" Value="Bold" TargetName="PresenterHeader"/>
|
||||
</Trigger>
|
||||
<Trigger SourceName="PanelHeader" Property="IsMouseOver" Value="true">
|
||||
<Setter TargetName="BorderBack" Property="Background" Value="{DynamicResource SecondaryRegionBrush}"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="SideMenuItemHeaderAccordionBaseStyle" BasedOn="{StaticResource SideMenuItemHeaderBaseStyle}" TargetType="controls:SideMenuItem">
|
||||
<Setter Property="ItemContainerStyle" Value="{StaticResource SideMenuItemAccordionBaseStyle}"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="controls:SideMenuItem">
|
||||
<Border Name="BorderRoot" Background="{TemplateBinding Background}">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition MinHeight="48"/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<Border Name="BorderBack" Background="{TemplateBinding Background}"/>
|
||||
<ContentControl Grid.Row="0" Margin="4,0,0,0">
|
||||
<DockPanel Margin="{TemplateBinding Padding}" Name="PanelHeader" Background="Transparent">
|
||||
<ContentControl Width="40" Name="PresenterIcon">
|
||||
<ContentPresenter ContentSource="Icon" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
</ContentControl>
|
||||
<ContentPresenter Name="PresenterHeader" ContentSource="Header" Margin="6,0,0,0" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
|
||||
</DockPanel>
|
||||
</ContentControl>
|
||||
<ScrollViewer Visibility="{Binding Visibility,ElementName=PART_Panel}" Grid.Row="1" Height="{Binding PanelAreaLength,RelativeSource={RelativeSource AncestorType=controls:SideMenu}}">
|
||||
<StackPanel x:Name="PART_Panel" Visibility="Collapsed"/>
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="Icon" Value="{x:Null}">
|
||||
<Setter TargetName="PresenterIcon" Property="Visibility" Value="Collapsed"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsSelected" Value="True">
|
||||
<Setter TargetName="BorderBack" Property="BorderThickness" Value="4,0,0,0"/>
|
||||
<Setter TargetName="BorderBack" Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
|
||||
<Setter Property="TextElement.FontWeight" Value="Bold" TargetName="PresenterHeader"/>
|
||||
</Trigger>
|
||||
<Trigger SourceName="PanelHeader" Property="IsMouseOver" Value="true">
|
||||
<Setter TargetName="BorderBack" Property="Background" Value="{DynamicResource SecondaryRegionBrush}"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="SideMenuBaseStyle" TargetType="controls:SideMenu">
|
||||
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
|
||||
<Setter Property="ItemContainerStyle" Value="{StaticResource SideMenuItemHeaderBaseStyle}"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="controls:SideMenu">
|
||||
<Border Name="BorderRoot" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
||||
<ScrollViewer>
|
||||
<StackPanel x:Name="PART_Panel"/>
|
||||
</ScrollViewer>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -160,7 +160,7 @@
|
||||
|
||||
<Style x:Key="TabItemCapsuleBaseStyle" TargetType="TabItem">
|
||||
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
|
||||
<Setter Property="Background" Value="{DynamicResource DefaultBrush}"/>
|
||||
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
|
||||
<Style x:Key="TransferGroupBaseStyle" TargetType="controls:TransferGroup">
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
<Setter Property="Background" Value="{DynamicResource DarkDefaultBrush}"/>
|
||||
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}"/>
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<!--用于包裹一个区域-->
|
||||
<Style x:Key="BorderRegionStyle" TargetType="Border">
|
||||
<Style x:Key="BorderRegion" TargetType="Border">
|
||||
<Setter Property="Padding" Value="10"/>
|
||||
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls">
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls"
|
||||
xmlns:tools="clr-namespace:HandyControl.Tools">
|
||||
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="../Basic/Geometries.xaml"/>
|
||||
@@ -232,6 +233,7 @@
|
||||
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
|
||||
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
|
||||
<Setter Property="Language" Value="{Binding Lang,Source={x:Static tools:ConfigHelper.Instance}}"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="CalendarDayButtonStyle" Value="{StaticResource CalendarDayButtonStyle}"/>
|
||||
<Setter Property="CalendarButtonStyle" Value="{StaticResource CalendarButtonStyle}"/>
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls">
|
||||
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="Base/SideMenuBaseStyle.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<Style BasedOn="{StaticResource SideMenuBaseStyle}" TargetType="controls:SideMenu"/>
|
||||
|
||||
<Style x:Key="SideMenuAccordion" BasedOn="{StaticResource SideMenuBaseStyle}" TargetType="controls:SideMenu">
|
||||
<Setter Property="ExpandMode" Value="Accordion"/>
|
||||
<Setter Property="PanelAreaLength" Value="200"/>
|
||||
<Setter Property="ItemContainerStyle" Value="{StaticResource SideMenuItemHeaderAccordionBaseStyle}"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="controls:SideMenu">
|
||||
<Border Name="BorderRoot" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
||||
<StackPanel x:Name="PART_Panel"/>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -62,6 +62,7 @@
|
||||
<ResourceDictionary Source="Gravatar.xaml"/>
|
||||
<ResourceDictionary Source="Badge.xaml"/>
|
||||
<ResourceDictionary Source="Dialog.xaml"/>
|
||||
<ResourceDictionary Source="SideMenu.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -206,9 +206,10 @@
|
||||
<Setter Property="controls:BorderElement.CornerRadius" Value="0,0,4,4"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="TabControlCapsule" TargetType="TabControl">
|
||||
<Style x:Key="TabControlCapsule" TargetType="TabControl">
|
||||
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
|
||||
<Setter Property="controls:TitleElement.BorderBrush" Value="{DynamicResource PrimaryBrush}"/>
|
||||
<Setter Property="controls:TitleElement.Background" Value="{DynamicResource DefaultBrush}"/>
|
||||
<Setter Property="controls:TitleElement.Background" Value="{DynamicResource RegionBrush}"/>
|
||||
<Setter Property="controls:TitleElement.Foreground" Value="{DynamicResource PrimaryBrush}"/>
|
||||
<Setter Property="ItemContainerStyleSelector">
|
||||
<Setter.Value>
|
||||
@@ -218,7 +219,7 @@
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="TabControl">
|
||||
<Grid x:Name="templateRoot" Background="{DynamicResource RegionBrush}" ClipToBounds="true" SnapsToDevicePixels="true" KeyboardNavigation.TabNavigation="Local">
|
||||
<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"/>
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
using System;
|
||||
using System.Windows.Markup;
|
||||
using HandyControl.Data;
|
||||
|
||||
namespace HandyControl.Tools.Extension
|
||||
{
|
||||
public class ColLayout : MarkupExtension
|
||||
{
|
||||
public static readonly int ColMaxCellCount = 24;
|
||||
|
||||
public static readonly int XsMaxWidth = 768;
|
||||
|
||||
public static readonly int SmMaxWidth = 992;
|
||||
|
||||
public static readonly int MdMaxWidth = 1200;
|
||||
|
||||
public static readonly int LgMaxWidth = 1920;
|
||||
|
||||
public static readonly int XlMaxWidth = 2560;
|
||||
|
||||
public int Xs { get; set; } = 24;
|
||||
|
||||
public int Sm { get; set; } = 12;
|
||||
|
||||
public int Md { get; set; } = 8;
|
||||
|
||||
public int Lg { get; set; } = 6;
|
||||
|
||||
public int Xl { get; set; } = 4;
|
||||
|
||||
public int Xxl { get; set; } = 2;
|
||||
|
||||
public override object ProvideValue(IServiceProvider serviceProvider)
|
||||
{
|
||||
return new ColLayout
|
||||
{
|
||||
Xs = Xs,
|
||||
Sm = Sm,
|
||||
Md = Md,
|
||||
Lg = Lg,
|
||||
Xl = Xl,
|
||||
Xxl = Xxl
|
||||
};
|
||||
}
|
||||
|
||||
public static ColLayoutStatus GetLayoutStatus(double width)
|
||||
{
|
||||
if (width < MdMaxWidth)
|
||||
{
|
||||
if (width < SmMaxWidth)
|
||||
{
|
||||
if (width < XsMaxWidth)
|
||||
{
|
||||
return ColLayoutStatus.Xs;
|
||||
}
|
||||
return ColLayoutStatus.Sm;
|
||||
}
|
||||
return ColLayoutStatus.Md;
|
||||
}
|
||||
if (width < XlMaxWidth)
|
||||
{
|
||||
if (width < LgMaxWidth)
|
||||
{
|
||||
return ColLayoutStatus.Lg;
|
||||
}
|
||||
return ColLayoutStatus.Xl;
|
||||
}
|
||||
return ColLayoutStatus.Xxl;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Globalization;
|
||||
#if !netle40
|
||||
using System.Runtime.CompilerServices;
|
||||
#endif
|
||||
using System.Windows;
|
||||
using System.Windows.Markup;
|
||||
using HandyControl.Controls;
|
||||
using HandyControl.Data;
|
||||
|
||||
namespace HandyControl.Tools
|
||||
{
|
||||
public class ConfigHelper : INotifyPropertyChanged
|
||||
{
|
||||
private ConfigHelper()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public static ConfigHelper Instance = new Lazy<ConfigHelper>(() => new ConfigHelper()).Value;
|
||||
|
||||
private XmlLanguage _lang = XmlLanguage.GetLanguage("zh-cn");
|
||||
|
||||
public XmlLanguage Lang
|
||||
{
|
||||
get => _lang;
|
||||
set
|
||||
{
|
||||
if (!_lang.IetfLanguageTag.Equals(value.IetfLanguageTag))
|
||||
{
|
||||
_lang = value;
|
||||
OnPropertyChanged(nameof(Lang));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void SetSystemVersionInfo(SystemVersionInfo info)
|
||||
{
|
||||
BlurWindow.SystemVersionInfo = info;
|
||||
}
|
||||
|
||||
public void SetLang(string lang)
|
||||
{
|
||||
Application.Current.Dispatcher.Thread.CurrentUICulture = new CultureInfo(lang);
|
||||
Lang = XmlLanguage.GetLanguage(lang);
|
||||
}
|
||||
|
||||
public void SetConfig(HandyControlConfig config)
|
||||
{
|
||||
SetSystemVersionInfo(config.SystemVersionInfo);
|
||||
SetLang(config.Lang);
|
||||
}
|
||||
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
#if netle40
|
||||
protected virtual void OnPropertyChanged(string propertyName)
|
||||
{
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
#else
|
||||
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
|
||||
{
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||