init branch

This commit is contained in:
NaBian committed 2020-06-21 00:32:16 +08:00
1 parent 89df8f7c50
commit 096fa70ecb
27 files changed
+160 -26

No files matched your search

@@ -0,0 +1,38 @@
using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using HandyControl.Data;
namespace HandyControl.Controls
{
public class ImageSelector : Control
{
public static readonly DependencyProperty UriProperty = DependencyProperty.Register(
"Uri", typeof(Uri), typeof(ImageSelector), new PropertyMetadata(default(Uri)));
public Uri Uri
{
get => (Uri) GetValue(UriProperty);
set => SetValue(UriProperty, value);
}
internal static readonly DependencyProperty SourceProperty = DependencyProperty.Register(
"Source", typeof(ImageSource), typeof(ImageSelector), new PropertyMetadata(default(ImageSource)));
internal ImageSource Source
{
get => (ImageSource) GetValue(SourceProperty);
set => SetValue(SourceProperty, value);
}
public static readonly DependencyProperty IsPreviewEnabledProperty = DependencyProperty.Register(
"IsPreviewEnabled", typeof(bool), typeof(ImageSelector), new PropertyMetadata(ValueBoxes.FalseBox));
public bool IsPreviewEnabled
{
get => (bool) GetValue(IsPreviewEnabledProperty);
set => SetValue(IsPreviewEnabledProperty, value);
}
}
}
@@ -73,7 +73,7 @@ namespace HandyControl.Controls
}
public static readonly DependencyProperty HidingHeightProperty = DependencyProperty.Register(
"HidingHeight", typeof(double), typeof(GotoTop), new PropertyMetadata(default(double)));
"HidingHeight", typeof(double), typeof(GotoTop), new PropertyMetadata(ValueBoxes.Double0Box));
public double HidingHeight
{
@@ -76,7 +76,7 @@ namespace HandyControl.Controls
}
public static readonly DependencyProperty MaxTitleWidthProperty = DependencyProperty.Register(
"MaxTitleWidth", typeof(double), typeof(PropertyGrid), new PropertyMetadata(default(double)));
"MaxTitleWidth", typeof(double), typeof(PropertyGrid), new PropertyMetadata(ValueBoxes.Double0Box));
public double MaxTitleWidth
{
@@ -85,7 +85,7 @@ namespace HandyControl.Controls
}
public static readonly DependencyProperty MinTitleWidthProperty = DependencyProperty.Register(
"MinTitleWidth", typeof(double), typeof(PropertyGrid), new PropertyMetadata(default(double)));
"MinTitleWidth", typeof(double), typeof(PropertyGrid), new PropertyMetadata(ValueBoxes.Double0Box));
public double MinTitleWidth
{
@@ -2,6 +2,7 @@
using System.ComponentModel;
using System.Windows;
using System.Windows.Controls;
using HandyControl.Data;
namespace HandyControl.Controls
{
@@ -62,7 +63,7 @@ namespace HandyControl.Controls
}
public static readonly DependencyProperty IsReadOnlyProperty = DependencyProperty.Register(
"IsReadOnly", typeof(bool), typeof(PropertyItem), new PropertyMetadata(default(bool)));
"IsReadOnly", typeof(bool), typeof(PropertyItem), new PropertyMetadata(ValueBoxes.FalseBox));
public bool IsReadOnly
{
@@ -107,7 +108,7 @@ namespace HandyControl.Controls
}
public static readonly DependencyProperty IsSelectedProperty = DependencyProperty.Register(
"IsSelected", typeof(bool), typeof(PropertyItem), new PropertyMetadata(default(bool)));
"IsSelected", typeof(bool), typeof(PropertyItem), new PropertyMetadata(ValueBoxes.FalseBox));
public bool IsSelected
{
@@ -116,7 +117,7 @@ namespace HandyControl.Controls
}
public static readonly DependencyProperty IsExpandedEnabledProperty = DependencyProperty.Register(
"IsExpandedEnabled", typeof(bool), typeof(PropertyItem), new PropertyMetadata(default(bool)));
"IsExpandedEnabled", typeof(bool), typeof(PropertyItem), new PropertyMetadata(ValueBoxes.FalseBox));
public bool IsExpandedEnabled
{
@@ -31,6 +31,7 @@
<Compile Include="$(MSBuildThisFileDirectory)Controls\Dialog\DialogContainer.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Controls\Growl\GrowlWindow.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Controls\Image\ImageBlock.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Controls\Input\ImageSelector.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Controls\Input\PinBox.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Controls\Other\Divider.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Controls\Other\Drawer.cs" />
@@ -436,6 +437,14 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="$(MSBuildThisFileDirectory)Themes\Styles\ImageSelector.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="$(MSBuildThisFileDirectory)Themes\Styles\Base\ImageSelectorBaseStyle.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="$(MSBuildThisFileDirectory)Themes\Styles\PropertyGrid.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@@ -0,0 +1,7 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:hc="clr-namespace:HandyControl.Controls">
<Style x:Key="ImageSelectorBaseStyle" TargetType="hc:ImageSelector"/>
</ResourceDictionary>
@@ -0,0 +1,11 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:hc="clr-namespace:HandyControl.Controls"
xmlns:themes="clr-namespace:HandyControl.Themes">
<ResourceDictionary.MergedDictionaries>
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Styles/Base/ImageSelectorBaseStyle.xaml"/>
</ResourceDictionary.MergedDictionaries>
<Style BasedOn="{StaticResource ImageSelectorBaseStyle}" TargetType="hc:ImageSelector"/>
</ResourceDictionary>
@@ -88,6 +88,7 @@
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Styles/BlendEffectBox.xaml"/>
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Styles/Screenshot.xaml"/>
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Styles/Watermark.xaml"/>
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Styles/ImageSelector.xaml"/>
<themes:SharedResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Styles/PropertyGrid.xaml"/>
</ResourceDictionary.MergedDictionaries>