-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
3,058 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Copyright © 2022 By HeBianGu(QQ:908293466) https://github.com/HeBianGu/WPF-ControlBase | ||
|
||
using System.Windows; | ||
using System.Windows.Markup; | ||
|
||
[assembly: ThemeInfo( | ||
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located | ||
//(used if a resource is not found in the page, | ||
// or application resource dictionaries) | ||
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located | ||
//(used if a resource is not found in the page, | ||
// app, or any theme specific resource dictionaries) | ||
)] | ||
|
||
[assembly: XmlnsDefinition("QQ:908293466", "H.Controls.Panel")] | ||
[assembly: XmlnsPrefix("QQ:908293466", "h")] | ||
|
||
[assembly: XmlnsDefinition("https://github.com/HeBianGu", "H.Controls.Panel")] | ||
[assembly: XmlnsPrefix("https://github.com/HeBianGu", "h")] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// Copyright © 2022 By HeBianGu(QQ:908293466) https://github.com/HeBianGu/WPF-ControlBase | ||
|
||
namespace H.Controls.Panel | ||
{ | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Copyright © 2022 By HeBianGu(QQ:908293466) https://github.com/HeBianGu/WPF-ControlBase | ||
|
||
namespace System | ||
{ | ||
public static class Extention | ||
{ | ||
///// <summary> | ||
///// 注册 | ||
///// </summary> | ||
///// <param name="service"></param> | ||
//public static void AddPropertyGrid(this IServiceCollection service) | ||
//{ | ||
// service.AddSingleton<IService, Service>(); | ||
//} | ||
|
||
///// <summary> | ||
///// 配置 | ||
///// </summary> | ||
///// <param name="service"></param> | ||
//public static void UseContainPanel(this IApplicationBuilder service, Action<ContainPanelSetting> action) | ||
//{ | ||
// action?.Invoke(ContainPanelSetting.Instance); | ||
//} | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop"> | ||
<ItemGroup> | ||
<ProjectReference Include="..\..\Providers\H.Providers.Mvvm\H.Providers.Mvvm.csproj" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:h="https://github.com/HeBianGu" | ||
xmlns:local="clr-namespace:H.Controls.Panel" | ||
xmlns:s="clr-namespace:System;assembly=mscorlib"> | ||
|
||
<local:HexClipConverter x:Key="ClipConverter" /> | ||
|
||
<Style TargetType="{x:Type local:HexItem}"> | ||
<!--<Setter Property="Background" Value="{DynamicResource {x:Static h:BrushKeys.Accent}}" /> | ||
<Setter Property="BorderBrush" Value="{DynamicResource {x:Static h:BrushKeys.BorderBrush}}" />--> | ||
<Setter Property="BorderThickness" Value="2" /> | ||
<Setter Property="HorizontalContentAlignment" Value="Center" /> | ||
<Setter Property="VerticalContentAlignment" Value="Center" /> | ||
<Setter Property="Template"> | ||
<Setter.Value> | ||
<ControlTemplate TargetType="local:HexItem"> | ||
<Grid Name="hexBorder" | ||
Background="{TemplateBinding BorderBrush}"> | ||
<Grid.Clip> | ||
<MultiBinding Converter="{StaticResource ClipConverter}"> | ||
<Binding ElementName="hexBorder" | ||
Path="ActualWidth" /> | ||
<Binding ElementName="hexBorder" | ||
Path="ActualHeight" /> | ||
<Binding Path="Orientation" | ||
RelativeSource="{RelativeSource TemplatedParent}" /> | ||
</MultiBinding> | ||
</Grid.Clip> | ||
|
||
<Grid Name="hexContent" | ||
Margin="{TemplateBinding BorderThickness}" | ||
HorizontalAlignment="Stretch" | ||
VerticalAlignment="Stretch" | ||
Background="{TemplateBinding Background}"> | ||
<Grid.Clip> | ||
<MultiBinding Converter="{StaticResource ClipConverter}"> | ||
<Binding ElementName="hexContent" | ||
Path="ActualWidth" /> | ||
<Binding ElementName="hexContent" | ||
Path="ActualHeight" /> | ||
<Binding Path="Orientation" | ||
RelativeSource="{RelativeSource TemplatedParent}" /> | ||
</MultiBinding> | ||
</Grid.Clip> | ||
|
||
<ContentPresenter Margin="{TemplateBinding Padding}" | ||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" | ||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" | ||
ClipToBounds="True" | ||
Content="{TemplateBinding Content}" | ||
ContentTemplate="{TemplateBinding ContentTemplate}" /> | ||
</Grid> | ||
</Grid> | ||
<ControlTemplate.Triggers> | ||
<Trigger Property="IsSelected" Value="True"> | ||
<Setter Property="BorderBrush" Value="Gold" /> | ||
</Trigger> | ||
</ControlTemplate.Triggers> | ||
</ControlTemplate> | ||
</Setter.Value> | ||
</Setter> | ||
</Style> | ||
|
||
<Style TargetType="{x:Type local:HexList}"> | ||
<Setter Property="ItemsPanel"> | ||
<Setter.Value> | ||
<ItemsPanelTemplate> | ||
<local:HexGrid Background="{Binding Path=Background, RelativeSource={RelativeSource AncestorType=ListBox}}" | ||
ColumnCount="{Binding Path=ColumnCount, RelativeSource={RelativeSource AncestorType=ListBox}}" | ||
RowCount="{Binding Path=RowCount, RelativeSource={RelativeSource AncestorType=ListBox}}" /> | ||
</ItemsPanelTemplate> | ||
</Setter.Value> | ||
</Setter> | ||
|
||
<Setter Property="Template"> | ||
<Setter.Value> | ||
<ControlTemplate TargetType="{x:Type local:HexList}"> | ||
<Grid> | ||
<Border Padding="{TemplateBinding Padding}" | ||
Background="{TemplateBinding Background}" | ||
BorderBrush="{TemplateBinding BorderBrush}" | ||
BorderThickness="{TemplateBinding BorderThickness}" | ||
SnapsToDevicePixels="True"> | ||
<ScrollViewer Padding="{TemplateBinding Padding}" | ||
Focusable="False" | ||
HorizontalScrollBarVisibility="Auto" | ||
VerticalScrollBarVisibility="Auto"> | ||
<ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" /> | ||
</ScrollViewer> | ||
</Border> | ||
</Grid> | ||
</ControlTemplate> | ||
</Setter.Value> | ||
</Setter> | ||
</Style> | ||
</ResourceDictionary> |
Oops, something went wrong.