add ToolBar style
This commit is contained in:
1 parent
9b839a1532
commit
225d2fa9cd
19 files changed
+319
-9
No files matched your search
@@ -100,6 +100,8 @@
|
||||
|
||||
public static readonly string RichTextBoxDemoCtl = nameof(RichTextBoxDemoCtl);
|
||||
|
||||
public static readonly string ToolBarDemoCtl = nameof(ToolBarDemoCtl);
|
||||
|
||||
public static readonly string CommonWindow = nameof(CommonWindow);
|
||||
|
||||
public static readonly string CustomNonClientAreaWindow = nameof(CustomNonClientAreaWindow);
|
||||
|
||||
@@ -55,7 +55,8 @@ var styleList = new List<string>
|
||||
"SliderDemoCtl",
|
||||
"GroupBoxDemoCtl",
|
||||
"ListViewDemoCtl",
|
||||
"RichTextBoxDemoCtl"
|
||||
"RichTextBoxDemoCtl",
|
||||
"ToolBarDemoCtl"
|
||||
};
|
||||
var windowList = new List<string>
|
||||
{
|
||||
|
||||
@@ -252,6 +252,9 @@
|
||||
<Compile Include="UserControl\Styles\ToggleButtonDemoCtl.xaml.cs">
|
||||
<DependentUpon>ToggleButtonDemoCtl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UserControl\Styles\ToolBarDemoCtl.xaml.cs">
|
||||
<DependentUpon>ToolBarDemoCtl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UserControl\Styles\TreeViewDemoCtl.xaml.cs">
|
||||
<DependentUpon>TreeViewDemoCtl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -538,6 +541,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="UserControl\Styles\ToolBarDemoCtl.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="UserControl\Styles\TreeViewDemoCtl.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
@@ -578,6 +585,7 @@
|
||||
<Generator>TextTemplatingFileGenerator</Generator>
|
||||
<LastGenOutput>MessageToken.cs</LastGenOutput>
|
||||
</Content>
|
||||
<Resource Include="Resources\Img\LeftMainContent\ToolBar_16x.png" />
|
||||
<Resource Include="Resources\Img\LeftMainContent\RichTextBox_16x.png" />
|
||||
<Resource Include="Resources\Img\LeftMainContent\ListView_16x.png" />
|
||||
<Resource Include="Resources\Img\LeftMainContent\GroupBox_16x.png" />
|
||||
|
||||
@@ -906,6 +906,15 @@ namespace HandyControlDemo.Properties.Langs {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 工具条 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string ToolBar {
|
||||
get {
|
||||
return ResourceManager.GetString("ToolBar", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 树视图 的本地化字符串。
|
||||
/// </summary>
|
||||
|
||||
@@ -411,4 +411,7 @@
|
||||
<data name="ListView" xml:space="preserve">
|
||||
<value>ListView</value>
|
||||
</data>
|
||||
<data name="ToolBar" xml:space="preserve">
|
||||
<value>ToolBar</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -394,4 +394,7 @@
|
||||
<data name="RichTextBox" xml:space="preserve">
|
||||
<value>富文本框</value>
|
||||
</data>
|
||||
<data name="ToolBar" xml:space="preserve">
|
||||
<value>工具条</value>
|
||||
</data>
|
||||
</root>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 164 B |
@@ -110,7 +110,7 @@
|
||||
<Image Source="../../Resources/Img/LeftMainContent/ListBox_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.ListViewDemoCtl}" Content="{x:Static langs:Lang.ListView}">
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.ListViewDemoCtl}" Content="{x:Static langs:Lang.ListView}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/ListView_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
@@ -130,6 +130,11 @@
|
||||
<Image Source="../../Resources/Img/LeftMainContent/RichTextBox_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.ToolBarDemoCtl}" Content="{x:Static langs:Lang.ToolBar}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/ToolBar_16x.png"/>
|
||||
</controls:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.BorderDemoCtl}" Content="{x:Static langs:Lang.Border1}">
|
||||
<controls:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/BorderElement_16x.png"/>
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.ToolBarDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
DataContext="{Binding ComboBoxDemo,Source={StaticResource Locator}}"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<controls:TransitioningContentControl>
|
||||
<ToolBarTray Margin="32" VerticalAlignment="Center">
|
||||
<ToolBar Padding="6" Header="{x:Static langs:Lang.Title}">
|
||||
<CheckBox IsChecked="True" Margin="10,0,0,0"/>
|
||||
<Separator Margin="10,0,0,0"/>
|
||||
<RadioButton Margin="10,0,0,0"/>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<RadioButton IsChecked="True" Margin="10,0,0,0"/>
|
||||
<RadioButton Margin="10,0,0,0"/>
|
||||
</StackPanel>
|
||||
<Button Content="{x:Static langs:Lang.Button}" Margin="10,0,0,0"/>
|
||||
<Button Content="{x:Static langs:Lang.Button}" Margin="10,0,0,0" Style="{StaticResource ButtonPrimary}"/>
|
||||
</ToolBar>
|
||||
<ToolBar Band="1" Padding="6">
|
||||
<ComboBox ItemsSource="{Binding DataList}" SelectedIndex="0" Width="230"/>
|
||||
<TextBox Text="{Binding Source={x:Static langs:Lang.Text},Converter={StaticResource StringRepeatConverter},ConverterParameter=4,Mode=OneWay}" Margin="10,0,0,0" Width="230"/>
|
||||
</ToolBar>
|
||||
<ToolBar Band="0" Padding="6">
|
||||
<Menu Background="Transparent" VerticalAlignment="Center">
|
||||
<MenuItem Header="{x:Static langs:Lang.Repository}">
|
||||
<MenuItem Header="GitHub">
|
||||
<MenuItem.Icon>
|
||||
<Path Data="{StaticResource GithubGeometry}" Fill="{DynamicResource PrimaryTextBrush}"/>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Header="NuGet">
|
||||
<MenuItem.Icon>
|
||||
<Path Data="{StaticResource NugetGeometry}" Fill="#224880"/>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
</MenuItem>
|
||||
<MenuItem Header="{x:Static langs:Lang.About}">
|
||||
<MenuItem Header="{x:Static langs:Lang.Email}">
|
||||
<MenuItem.Icon>
|
||||
<Path Data="{StaticResource EmailGeometry}" Fill="{DynamicResource PrimaryBrush}"/>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Header="{x:Static langs:Lang.Chatroom}">
|
||||
<MenuItem.Icon>
|
||||
<Path Data="{StaticResource GitterGeometry}" Fill="#e52e64"/>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Header="{x:Static langs:Lang.Blog}">
|
||||
<MenuItem.Icon>
|
||||
<Path Data="{StaticResource CnblogsGeometry}" Fill="{DynamicResource PrimaryTextBrush}"/>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
</MenuItem>
|
||||
<MenuItem Header="{x:Static langs:Lang.Contributors}"/>
|
||||
</Menu>
|
||||
</ToolBar>
|
||||
</ToolBarTray>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class ToolBarDemoCtl
|
||||
{
|
||||
public ToolBarDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user