add Tag
This commit is contained in:
1 parent
1be9fd9c92
commit
4d72778190
23 files changed
+403
-37
No files matched your search
@@ -52,6 +52,8 @@
|
||||
|
||||
public static readonly string SearchBarDemoCtl = nameof(SearchBarDemoCtl);
|
||||
|
||||
public static readonly string TagDemoCtl = nameof(TagDemoCtl);
|
||||
|
||||
public static readonly string ButtonDemoCtl = nameof(ButtonDemoCtl);
|
||||
|
||||
public static readonly string ToggleButtonDemoCtl = nameof(ToggleButtonDemoCtl);
|
||||
|
||||
@@ -28,7 +28,8 @@ var controlList = new List<string>
|
||||
"DatePickerDemoCtl",
|
||||
"DateTimePickerDemoCtl",
|
||||
"CalendarWithClockDemoCtl",
|
||||
"SearchBarDemoCtl"
|
||||
"SearchBarDemoCtl",
|
||||
"TagDemoCtl"
|
||||
};
|
||||
var styleList = new List<string>
|
||||
{
|
||||
|
||||
@@ -156,6 +156,9 @@
|
||||
<Compile Include="UserControl\Controls\StepBarDemoCtl.xaml.cs">
|
||||
<DependentUpon>StepBarDemoCtl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UserControl\Controls\TagDemoCtl.xaml.cs">
|
||||
<DependentUpon>TagDemoCtl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UserControl\Controls\TextBoxDemoCtl.xaml.cs">
|
||||
<DependentUpon>TextBoxDemoCtl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -416,6 +419,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="UserControl\Controls\TagDemoCtl.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="UserControl\Controls\TextBoxDemoCtl.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
@@ -592,6 +599,7 @@
|
||||
<Generator>TextTemplatingFileGenerator</Generator>
|
||||
<LastGenOutput>MessageToken.cs</LastGenOutput>
|
||||
</Content>
|
||||
<Resource Include="Resources\Img\LeftMainContent\Tag_16x.png" />
|
||||
<Resource Include="Resources\Img\LeftMainContent\Search_16x.png" />
|
||||
<Resource Include="Resources\Img\LeftMainContent\ToolBar_16x.png" />
|
||||
<Resource Include="Resources\Img\LeftMainContent\RichTextBox_16x.png" />
|
||||
|
||||
@@ -843,6 +843,15 @@ namespace HandyControlDemo.Properties.Langs {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 标签 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string Tag {
|
||||
get {
|
||||
return ResourceManager.GetString("Tag", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 正文 的本地化字符串。
|
||||
/// </summary>
|
||||
|
||||
@@ -426,4 +426,7 @@
|
||||
<data name="SearchBar" xml:space="preserve">
|
||||
<value>SearchBar</value>
|
||||
</data>
|
||||
<data name="Tag" xml:space="preserve">
|
||||
<value>Tag</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -406,4 +406,7 @@
|
||||
<data name="SearchBar" xml:space="preserve">
|
||||
<value>搜索栏</value>
|
||||
</data>
|
||||
<data name="Tag" xml:space="preserve">
|
||||
<value>标签</value>
|
||||
</data>
|
||||
</root>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 277 B |
@@ -0,0 +1,21 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.TagDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Background="{DynamicResource RegionBrush}"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl">
|
||||
<controls:TransitioningContentControl>
|
||||
<controls:TagPanel AddTagButtonClick="TagPanel_OnAddTagButtonClick" Margin="32" Orientation="Horizontal" MaxWidth="400" VerticalAlignment="Center" ShowAddButton="True">
|
||||
<controls:Tag ShowCloseButton="False" Content="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=2}"/>
|
||||
<controls:Tag Selectable="True" Content="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=3}"/>
|
||||
<controls:Tag ShowCloseButton="False" Content="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=4}"/>
|
||||
<controls:Tag Content="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=5}"/>
|
||||
<controls:Tag IsSelected="True" Selectable="True" ShowCloseButton="False" Content="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=4}"/>
|
||||
<controls:Tag Content="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=3}"/>
|
||||
<controls:Tag ShowCloseButton="False" Content="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=2}"/>
|
||||
<controls:Tag IsSelected="True" Selectable="True" Content="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=3}"/>
|
||||
<controls:Tag ShowCloseButton="False" Content="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=4}"/>
|
||||
<controls:Tag Content="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=5}"/>
|
||||
</controls:TagPanel>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using HandyControl.Controls;
|
||||
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class TagDemoCtl
|
||||
{
|
||||
public TagDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void TagPanel_OnAddTagButtonClick(object sender, EventArgs e)
|
||||
{
|
||||
if (sender is TagPanel panel)
|
||||
{
|
||||
panel.Children.Add(new Tag
|
||||
{
|
||||
Content = Properties.Langs.Lang.SubTitle
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -194,6 +194,11 @@
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Search_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Style="{StaticResource ListBoxItemNew}" 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.CirclePanelDemoCtl}" Content="{x:Static langs:Lang.CirclePanel}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/ColorWheel_16x.png"/>
|
||||
|
||||
Reference in new issue
Block a user