update to v1.2.0

This commit is contained in:
NaBian committed 2018-09-04 15:42:37 +08:00
1 parent c402f428fb
commit 4afd1097de
90 files changed
+2992 -1652

No files matched your search

@@ -0,0 +1,33 @@
<Border controls:ScrollViewer.IsEnableInertia="True"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:command="http://www.galasoft.ch/mvvmlight"
x:Class="HandyControlDemo.UserControl.LeftMainContent"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:data="clr-namespace:HandyControlDemo.Data"
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<TreeView controls:ScrollViewer.IsEnableInertia="True" BorderThickness="0">
<i:Interaction.Triggers>
<i:EventTrigger EventName="SelectedItemChanged">
<command:EventToCommand Command="{Binding SwitchDemoCmd}" PassEventArgsToCommand="True" />
</i:EventTrigger>
</i:Interaction.Triggers>
<TreeViewItem IsExpanded="True" Header="{StaticResource Styles}">
<TreeViewItem Tag="{x:Static data:MessageToken.LoadButtonDemoCtl}" Header="{StaticResource Button}"/>
<TreeViewItem Tag="{x:Static data:MessageToken.LoadToggleButtonDemoCtl}" Header="{StaticResource ToggleButton}"/>
<TreeViewItem Tag="{x:Static data:MessageToken.LoadExpanderDemoCtl}" Header="{StaticResource Expander}"/>
<TreeViewItem Tag="{x:Static data:MessageToken.LoadProgressBarDemoCtl}" Header="{StaticResource ProgressBar}"/>
</TreeViewItem>
<TreeViewItem IsExpanded="True" Header="{StaticResource Controls}">
<TreeViewItem Tag="{x:Static data:MessageToken.LoadGrowlDemoCtl}" Header="{StaticResource Growl}"/>
<TreeViewItem Tag="{x:Static data:MessageToken.LoadLoadingDemoCtl}" Header="{StaticResource Loading}"/>
<TreeViewItem Tag="{x:Static data:MessageToken.LoadImageBrowserDemoCtl}" Header="{StaticResource ImageBrowser}"/>
<TreeViewItem Tag="{x:Static data:MessageToken.LoadColorPickerDemoCtl}" Header="{StaticResource ColorPicker}"/>
<TreeViewItem Tag="{x:Static data:MessageToken.LoadCarouselDemoCtl}" Header="{StaticResource Carousel}"/>
<TreeViewItem Tag="{x:Static data:MessageToken.LoadCompareSliderDemoCtl}" Header="{StaticResource CompareSlider}"/>
<TreeViewItem Tag="{x:Static data:MessageToken.LoadTimeBarDemoCtl}" Header="{StaticResource TimeBar}"/>
<TreeViewItem Tag="{x:Static data:MessageToken.LoadPaginationDemoCtl}" Header="{StaticResource Pagination}"/>
<TreeViewItem Tag="{x:Static data:MessageToken.LoadAnimationPathDemoCtl}" Header="{StaticResource AnimationPath}"/>
</TreeViewItem>
</TreeView>
</Border>
@@ -0,0 +1,14 @@
// ReSharper disable once CheckNamespace
namespace HandyControlDemo.UserControl
{
/// <summary>
/// 左侧主内容
/// </summary>
public partial class LeftMainContent
{
public LeftMainContent()
{
InitializeComponent();
}
}
}
@@ -0,0 +1,20 @@
<Border xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="HandyControlDemo.UserControl.MainContent"
Background="#f0f0f0">
<Border Background="{StaticResource MainContentBackground}">
<Grid Name="GridMain" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="16,0,16,16">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Border Name="BorderEffect" Grid.RowSpan="2" Background="White" CornerRadius="0,0,10,10" Effect="{StaticResource EffectShadow4}"></Border>
<Border Height="32" Name="BorderTitle" Grid.Row="0" Background="{StaticResource PrimaryBrush}">
<TextBlock Style="{StaticResource TextBlockDefault}" Foreground="White" Text="{Binding ContentTitle}"></TextBlock>
</Border>
<Border Grid.Row="1" ClipToBounds="True">
<ContentPresenter Name="PresenterMain" Margin="0,0,0,10" Content="{Binding SubContent}"/>
</Border>
</Grid>
</Border>
</Border>
@@ -0,0 +1,43 @@
using System.Windows;
using HandyControl.Tools.Extension;
// ReSharper disable once CheckNamespace
namespace HandyControlDemo.UserControl
{
/// <summary>
/// 主内容
/// </summary>
public partial class MainContent
{
private bool _isFull;
public MainContent()
{
InitializeComponent();
}
public void FullSwitch(bool isFull)
{
if (_isFull == isFull) return;
_isFull = isFull;
if (_isFull)
{
BorderEffect.Collapse();
BorderTitle.Collapse();
GridMain.HorizontalAlignment = HorizontalAlignment.Stretch;
GridMain.VerticalAlignment = VerticalAlignment.Stretch;
GridMain.Margin = new Thickness();
PresenterMain.Margin = new Thickness();
}
else
{
BorderEffect.Show();
BorderTitle.Show();
GridMain.HorizontalAlignment = HorizontalAlignment.Center;
GridMain.VerticalAlignment = VerticalAlignment.Top;
GridMain.Margin = new Thickness(16, 0, 16, 16);
PresenterMain.Margin = new Thickness(0, 0, 0, 10);
}
}
}
}