This commit is contained in:
NaBian committed 2019-05-08 00:15:19 +08:00
1 parent 467bedb656
commit a0707147ae
20 files changed
+314 -24

No files matched your search

@@ -94,6 +94,8 @@
public static readonly string SideMenuDemoCtl = nameof(SideMenuDemoCtl);
public static readonly string GridDemoCtl = nameof(GridDemoCtl);
public static readonly string ButtonDemoCtl = nameof(ButtonDemoCtl);
public static readonly string RepeatButtonDemoCtl = nameof(RepeatButtonDemoCtl);
@@ -49,7 +49,8 @@ var controlList = new List<string>
"BadgeDemoCtl",
"GravatarDemoCtl",
"DialogDemoCtl",
"SideMenuDemoCtl"
"SideMenuDemoCtl",
"GridDemoCtl"
};
var styleList = new List<string>
{
@@ -38,6 +38,7 @@
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Basic\ChatBox.xaml.cs">
<DependentUpon>ChatBox.xaml</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Basic\IFull.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Basic\InteractiveDialog.xaml.cs">
<DependentUpon>InteractiveDialog.xaml</DependentUpon>
</Compile>
@@ -74,6 +75,9 @@
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Controls\CompareSliderDemoCtl.xaml.cs">
<DependentUpon>CompareSliderDemoCtl.xaml</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Controls\GridDemoCtl.xaml.cs">
<DependentUpon>GridDemoCtl.xaml</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Controls\CoverFlowDemoCtl.xaml.cs">
<DependentUpon>CoverFlowDemoCtl.xaml</DependentUpon>
</Compile>
@@ -420,6 +424,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="$(MSBuildThisFileDirectory)UserControl\Controls\GridDemoCtl.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="$(MSBuildThisFileDirectory)UserControl\Controls\CoverFlowDemoCtl.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@@ -528,6 +528,15 @@ namespace HandyControlDemo.Properties.Langs {
}
}
/// <summary>
/// 查找类似 栅格 的本地化字符串。
/// </summary>
public static string Grid {
get {
return ResourceManager.GetString("Grid", resourceCulture);
}
}
/// <summary>
/// 查找类似 分组框 的本地化字符串。
/// </summary>
@@ -582,4 +582,7 @@
<data name="Overview" xml:space="preserve">
<value>Overview</value>
</data>
<data name="Grid" xml:space="preserve">
<value>Grid</value>
</data>
</root>
@@ -582,4 +582,7 @@
<data name="Overview" xml:space="preserve">
<value>概览</value>
</data>
<data name="Grid" xml:space="preserve">
<value>栅格</value>
</data>
</root>
Binary file not shown.

After

Width:  |  Height:  |  Size: 129 B

@@ -0,0 +1,7 @@
namespace HandyControlDemo.UserControl
{
internal interface IFull
{
}
}
@@ -0,0 +1,61 @@
<UserControl x:Class="HandyControlDemo.UserControl.GridDemoCtl"
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:extension="clr-namespace:HandyControl.Tools.Extension;assembly=HandyControl"
Background="{DynamicResource RegionBrush}">
<ScrollViewer>
<StackPanel Margin="32">
<controls:Row>
<controls:Col>
<Border Background="{DynamicResource BorderBrush}" Height="36" CornerRadius="4" Margin="10"/>
</controls:Col>
<controls:Col>
<Border Background="{DynamicResource SecondaryBorderBrush}" Height="36" CornerRadius="4" Margin="10"/>
</controls:Col>
<controls:Col>
<Border Background="{DynamicResource BorderBrush}" Height="36" CornerRadius="4" Margin="10"/>
</controls:Col>
<controls:Col>
<Border Background="{DynamicResource SecondaryBorderBrush}" Height="36" CornerRadius="4" Margin="10"/>
</controls:Col>
<controls:Col>
<Border Background="{DynamicResource BorderBrush}" Height="36" CornerRadius="4" Margin="10"/>
</controls:Col>
<controls:Col>
<Border Background="{DynamicResource SecondaryBorderBrush}" Height="36" CornerRadius="4" Margin="10"/>
</controls:Col>
<controls:Col>
<Border Background="{DynamicResource BorderBrush}" Height="36" CornerRadius="4" Margin="10"/>
</controls:Col>
<controls:Col>
<Border Background="{DynamicResource SecondaryBorderBrush}" Height="36" CornerRadius="4" Margin="10"/>
</controls:Col>
<controls:Col>
<Border Background="{DynamicResource BorderBrush}" Height="36" CornerRadius="4" Margin="10"/>
</controls:Col>
<controls:Col>
<Border Background="{DynamicResource SecondaryBorderBrush}" Height="36" CornerRadius="4" Margin="10"/>
</controls:Col>
<controls:Col>
<Border Background="{DynamicResource BorderBrush}" Height="36" CornerRadius="4" Margin="10"/>
</controls:Col>
<controls:Col>
<Border Background="{DynamicResource SecondaryBorderBrush}" Height="36" CornerRadius="4" Margin="10"/>
</controls:Col>
<controls:Col>
<Border Background="{DynamicResource BorderBrush}" Height="36" CornerRadius="4" Margin="10"/>
</controls:Col>
<controls:Col>
<Border Background="{DynamicResource SecondaryBorderBrush}" Height="36" CornerRadius="4" Margin="10"/>
</controls:Col>
<controls:Col>
<Border Background="{DynamicResource BorderBrush}" Height="36" CornerRadius="4" Margin="10"/>
</controls:Col>
<controls:Col>
<Border Background="{DynamicResource SecondaryBorderBrush}" Height="36" CornerRadius="4" Margin="10"/>
</controls:Col>
</controls:Row>
</StackPanel>
</ScrollViewer>
</UserControl>
@@ -0,0 +1,10 @@
namespace HandyControlDemo.UserControl
{
public partial class GridDemoCtl : IFull
{
public GridDemoCtl()
{
InitializeComponent();
}
}
}
@@ -200,7 +200,7 @@
<Image Source="../../Resources/Img/LeftMainContent/User_16x.png"/>
</controls:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.BadgeDemoCtl}" Content="{x:Static langs:Lang.Badge}">
<ListBoxItem Tag="{x:Static data:MessageToken.BadgeDemoCtl}" Content="{x:Static langs:Lang.Badge}">
<controls:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/DotLarge_16x.png"/>
</controls:EdgeElement.LeftContent>
@@ -315,6 +315,11 @@
<Image Source="../../Resources/Img/LeftMainContent/ColorWheel_16x.png"/>
</controls:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.GridDemoCtl}" Content="{x:Static langs:Lang.Grid}">
<controls:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/GridPane_16x.png"/>
</controls:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.WaterfallPanelDemoCtl}" Content="{x:Static langs:Lang.WaterfallPanel}">
<controls:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/Panel_16x.png"/>
@@ -9,6 +9,7 @@ using GalaSoft.MvvmLight.Messaging;
using HandyControlDemo.Data;
using HandyControlDemo.Service;
using HandyControlDemo.Tools;
using HandyControlDemo.UserControl;
namespace HandyControlDemo.ViewModel
{
@@ -114,9 +115,10 @@ namespace HandyControlDemo.ViewModel
if (Equals(_listBoxItemCurrent, item)) return;
_listBoxItemCurrent = item;
ContentTitle = item.Content;
Messenger.Default.Send(false, MessageToken.FullSwitch);
var obj = AssemblyHelper.ResolveByKey(tag);
Messenger.Default.Send(obj ?? AssemblyHelper.CreateInternalInstance($"UserControl.{tag}"), MessageToken.LoadShowContent);
var ctl = obj ?? AssemblyHelper.CreateInternalInstance($"UserControl.{tag}");
Messenger.Default.Send(ctl is IFull, MessageToken.FullSwitch);
Messenger.Default.Send(ctl, MessageToken.LoadShowContent);
}
else
{