init branch
This commit is contained in:
1 parent
89df8f7c50
commit
096fa70ecb
27 files changed
+160
-26
No files matched your search
@@ -265,6 +265,9 @@
|
||||
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\HoverMenu_16x.png">
|
||||
<Link>Resources\Img\LeftMainContent\HoverMenu_16x.png</Link>
|
||||
</Resource>
|
||||
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\Image_16x.png">
|
||||
<Link>Resources\Img\LeftMainContent\Image_16x.png</Link>
|
||||
</Resource>
|
||||
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\ImageBrowser_16x.png">
|
||||
<Link>Resources\Img\LeftMainContent\ImageBrowser_16x.png</Link>
|
||||
</Resource>
|
||||
|
||||
@@ -265,6 +265,9 @@
|
||||
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\HoverMenu_16x.png">
|
||||
<Link>Resources\Img\LeftMainContent\HoverMenu_16x.png</Link>
|
||||
</Resource>
|
||||
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\Image_16x.png">
|
||||
<Link>Resources\Img\LeftMainContent\Image_16x.png</Link>
|
||||
</Resource>
|
||||
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\ImageBrowser_16x.png">
|
||||
<Link>Resources\Img\LeftMainContent\ImageBrowser_16x.png</Link>
|
||||
</Resource>
|
||||
|
||||
@@ -138,6 +138,9 @@
|
||||
<Resource Include="..\..\Shared\HandyControlDemo_Shared\UserControl\Controls\ImageBrowserDemoCtl.xaml">
|
||||
<Link>UserControl\Controls\ImageBrowserDemoCtl.xaml</Link>
|
||||
</Resource>
|
||||
<Resource Include="..\..\Shared\HandyControlDemo_Shared\UserControl\Controls\ImageSelectorDemoCtl.xaml">
|
||||
<Link>UserControl\Controls\ImageSelectorDemoCtl.xaml</Link>
|
||||
</Resource>
|
||||
<Resource Include="..\..\Shared\HandyControlDemo_Shared\UserControl\Controls\LoadingDemoCtl.xaml">
|
||||
<Link>UserControl\Controls\LoadingDemoCtl.xaml</Link>
|
||||
</Resource>
|
||||
@@ -523,6 +526,10 @@
|
||||
<Link>UserControl\Controls\ImageBrowserDemoCtl.xaml.cs</Link>
|
||||
<DependentUpon>ImageBrowserDemoCtl.xaml</DependentUpon>
|
||||
</Resource>
|
||||
<Resource Include="..\..\Shared\HandyControlDemo_Shared\UserControl\Controls\ImageSelectorDemoCtl.xaml.cs">
|
||||
<Link>UserControl\Controls\ImageSelectorDemoCtl.xaml.cs</Link>
|
||||
<DependentUpon>ImageSelectorDemoCtl.xaml</DependentUpon>
|
||||
</Resource>
|
||||
<Resource Include="..\..\Shared\HandyControlDemo_Shared\UserControl\Controls\LoadingDemoCtl.xaml.cs">
|
||||
<Link>UserControl\Controls\LoadingDemoCtl.xaml.cs</Link>
|
||||
<DependentUpon>LoadingDemoCtl.xaml</DependentUpon>
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
[ "GroupBox", "GroupBoxDemoCtl", "GroupBox_16x", "" ],
|
||||
[ "Menu", "MenuDemoCtl", "ContextMenu_16x", "" ],
|
||||
[ "RichTextBox", "RichTextBoxDemoCtl", "RichTextBox_16x", "" ],
|
||||
[ "FlowDocument", "FlowDocumentDemoCtl", "WPFFlowDocument_16x", "1" ],
|
||||
[ "FlowDocument", "FlowDocumentDemoCtl", "WPFFlowDocument_16x", "" ],
|
||||
[ "ToolBar", "ToolBarDemoCtl", "ToolBar_16x", "" ],
|
||||
[ "Border", "BorderDemoCtl", "BorderElement_16x", "" ],
|
||||
[ "Label", "LabelDemoCtl", "Label_16x", "" ],
|
||||
@@ -41,6 +41,7 @@
|
||||
"demoItemList": [
|
||||
[ "FloatingBlock", "FloatingBlockDemoCtl", "thumbs_up", "" ],
|
||||
[ "PropertyGrid", "PropertyGridDemoCtl", "PropertyGridEditorPart_16x", "1" ],
|
||||
[ "ImageSelector", "ImageSelectorDemoCtl", "Image_16x", "1" ],
|
||||
[ "ImageBlock", "ImageBlockDemoCtl", "ImageStack_16x", "" ],
|
||||
[ "Magnifier", "MagnifierDemoCtl", "Search_16x", "" ],
|
||||
[ "Gravatar", "GravatarDemoCtl", "User_16x", "" ],
|
||||
|
||||
@@ -55,6 +55,9 @@
|
||||
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Basic\TextDialogWithTimer.xaml.cs">
|
||||
<DependentUpon>TextDialogWithTimer.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Controls\ImageSelectorDemoCtl.xaml.cs">
|
||||
<DependentUpon>ImageSelectorDemoCtl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Controls\AnimationPathDemoCtl.xaml.cs">
|
||||
<DependentUpon>AnimationPathDemoCtl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -512,6 +515,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="$(MSBuildThisFileDirectory)UserControl\Controls\ImageSelectorDemoCtl.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="$(MSBuildThisFileDirectory)UserControl\Controls\AnimationPathDemoCtl.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
|
||||
@@ -851,7 +851,18 @@ namespace HandyControlDemo.Properties.Langs {
|
||||
return ResourceManager.GetString("ImageBrowser", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 图片选择器 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string ImageSelector
|
||||
{
|
||||
get
|
||||
{
|
||||
return ResourceManager.GetString("ImageSelector", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 索引 的本地化字符串。
|
||||
/// </summary>
|
||||
|
||||
@@ -753,4 +753,7 @@
|
||||
<data name="PropertyGrid" xml:space="preserve">
|
||||
<value>PropertyGrid</value>
|
||||
</data>
|
||||
<data name="ImageSelector" xml:space="preserve">
|
||||
<value>ImageSelector</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -753,4 +753,7 @@
|
||||
<data name="PropertyGrid" xml:space="preserve">
|
||||
<value>PropertyGrid</value>
|
||||
</data>
|
||||
<data name="ImageSelector" xml:space="preserve">
|
||||
<value>ImageSelector</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -753,4 +753,7 @@
|
||||
<data name="PropertyGrid" xml:space="preserve">
|
||||
<value>PropertyGrid</value>
|
||||
</data>
|
||||
<data name="ImageSelector" xml:space="preserve">
|
||||
<value>ImageSelector</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -753,4 +753,7 @@
|
||||
<data name="PropertyGrid" xml:space="preserve">
|
||||
<value>PropertyGrid</value>
|
||||
</data>
|
||||
<data name="ImageSelector" xml:space="preserve">
|
||||
<value>ImageSelector</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -753,4 +753,7 @@
|
||||
<data name="PropertyGrid" xml:space="preserve">
|
||||
<value>属性编辑器</value>
|
||||
</data>
|
||||
<data name="ImageSelector" xml:space="preserve">
|
||||
<value>图片选择器</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -753,4 +753,7 @@
|
||||
<data name="PropertyGrid" xml:space="preserve">
|
||||
<value>PropertyGrid</value>
|
||||
</data>
|
||||
<data name="ImageSelector" xml:space="preserve">
|
||||
<value>ImageSelector</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -753,4 +753,7 @@
|
||||
<data name="PropertyGrid" xml:space="preserve">
|
||||
<value>PropertyGrid</value>
|
||||
</data>
|
||||
<data name="ImageSelector" xml:space="preserve">
|
||||
<value>ImageSelector</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -125,7 +125,8 @@ namespace HandyControlDemo.Properties.Langs
|
||||
OnPropertyChanged(nameof(Ignore));
|
||||
OnPropertyChanged(nameof(ImageBlock));
|
||||
OnPropertyChanged(nameof(ImageBrowser));
|
||||
OnPropertyChanged(nameof(Index));
|
||||
OnPropertyChanged(nameof(ImageSelector));
|
||||
OnPropertyChanged(nameof(Index));
|
||||
OnPropertyChanged(nameof(Info));
|
||||
OnPropertyChanged(nameof(InteractiveDialog));
|
||||
OnPropertyChanged(nameof(IsNotPhone));
|
||||
@@ -691,6 +692,11 @@ namespace HandyControlDemo.Properties.Langs
|
||||
/// </summary>
|
||||
public string ImageBrowser => Lang.ImageBrowser;
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 图片选择器 的本地化字符串。
|
||||
/// </summary>
|
||||
public string ImageSelector => Lang.ImageSelector;
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 索引 的本地化字符串。
|
||||
/// </summary>
|
||||
@@ -1760,6 +1766,11 @@ namespace HandyControlDemo.Properties.Langs
|
||||
/// </summary>
|
||||
public static string ImageBrowser = nameof(ImageBrowser);
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 图片选择器 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string ImageSelector = nameof(ImageSelector);
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 索引 的本地化字符串。
|
||||
/// </summary>
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 298 B |
@@ -0,0 +1,9 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.ImageSelectorDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
Background="{DynamicResource RegionBrush}"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol">
|
||||
<hc:TransitioningContentControl>
|
||||
|
||||
</hc:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class ImageSelectorDemoCtl
|
||||
{
|
||||
public ImageSelectorDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -44,7 +44,7 @@
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<hc:SearchBar ShowClearButton="True" TextChanged="SearchBar_OnTextChanged" SearchStarted="SearchBar_OnSearchStarted" Style="{StaticResource SearchBarPlus}" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterKey}}" Margin="0,4,4,4" Tag="{Binding ElementName=ListBoxDemo}"/>
|
||||
<hc:SearchBar ShowClearButton="True" IsRealTime="True" SearchStarted="SearchBar_OnSearchStarted" Style="{StaticResource SearchBarPlus}" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PlsEnterKey}}" Margin="0,4,4,4" Tag="{Binding ElementName=ListBoxDemo}"/>
|
||||
<ToggleButton Tag="{Binding ElementName=ListBoxDemo}" Name="ButtonStyleAscending" Click="ButtonAscending_OnClick" Grid.Row="0" Grid.Column="1" Style="{StaticResource DemoInfoSortButtonStyle}"/>
|
||||
<ListBox Name="ListBoxDemo" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1" VirtualizingStackPanel.IsVirtualizing="True" SelectedIndex="{Binding SelectedIndex}" ItemsSource="{Binding DemoItemList}" BorderThickness="0" SelectionMode="Single" Style="{StaticResource ListBoxTransparent}">
|
||||
<ListBox.ItemTemplate>
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using HandyControl.Controls;
|
||||
using HandyControl.Data;
|
||||
using HandyControlDemo.Data;
|
||||
using HandyControlDemo.ViewModel;
|
||||
@@ -87,20 +86,5 @@ namespace HandyControlDemo.UserControl
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void SearchBar_OnTextChanged(object sender, TextChangedEventArgs e)
|
||||
{
|
||||
if (e.OriginalSource is SearchBar searchBar)
|
||||
{
|
||||
_searchKey = searchBar.Text;
|
||||
if (string.IsNullOrEmpty(_searchKey))
|
||||
{
|
||||
foreach (var item in ViewModelLocator.Instance.Main.DemoInfoCurrent.DemoItemList)
|
||||
{
|
||||
item.IsVisible = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
|
||||
|
||||
Reference in new issue
Block a user