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

@@ -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;
}
}
}
}
}
}