Merge pull request #78 from HandyOrg/add-overview

Add overview
This commit is contained in:
NaBian authored and GitHub committed 2019-05-06 00:47:56 +08:00
commit 8f9fe6df49
19 files changed
+479 -30

No files matched your search

+6
View File
@@ -46,6 +46,12 @@ Step 2:Add code in App.xaml as follows:
``` ```
Step 3:enjoy coding Step 3:enjoy coding
## Overview
![Overview](https://raw.githubusercontent.com/NaBian/HandyControl/master/Resources/Overview.png)
![Overview-dark](https://raw.githubusercontent.com/NaBian/HandyControl/master/Resources/Overview-dark.png)
## Latest examples ## Latest examples
### SideMenu ### SideMenu
Binary file not shown.

After

Width:  |  Height:  |  Size: 346 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 361 KiB

@@ -170,5 +170,7 @@
public static readonly string MainWindow = nameof(MainWindow); public static readonly string MainWindow = nameof(MainWindow);
public static readonly string OverView = nameof(OverView);
} }
} }
@@ -96,7 +96,8 @@ var messageList = new List<string>
"SendChatMessage", "SendChatMessage",
"GrowlDemoPanel", "GrowlDemoPanel",
"DialogDemoWindow", "DialogDemoWindow",
"MainWindow" "MainWindow",
"OverView"
}; };
#> #>
namespace HandyControlDemo.Data namespace HandyControlDemo.Data
@@ -176,6 +176,9 @@
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Controls\WindowDemoCtl.xaml.cs"> <Compile Include="$(MSBuildThisFileDirectory)UserControl\Controls\WindowDemoCtl.xaml.cs">
<DependentUpon>WindowDemoCtl.xaml</DependentUpon> <DependentUpon>WindowDemoCtl.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Main\OverView.xaml.cs">
<DependentUpon>OverView.xaml</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Main\ContributorsView.xaml.cs"> <Compile Include="$(MSBuildThisFileDirectory)UserControl\Main\ContributorsView.xaml.cs">
<DependentUpon>ContributorsView.xaml</DependentUpon> <DependentUpon>ContributorsView.xaml</DependentUpon>
</Compile> </Compile>
@@ -553,6 +556,10 @@
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</Page> </Page>
<Page Include="$(MSBuildThisFileDirectory)UserControl\Main\OverView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="$(MSBuildThisFileDirectory)UserControl\Main\ContributorsView.xaml"> <Page Include="$(MSBuildThisFileDirectory)UserControl\Main\ContributorsView.xaml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
@@ -1,6 +1,9 @@
using System.ComponentModel; using System;
using System.ComponentModel;
using GalaSoft.MvvmLight.Messaging;
using HandyControl.Controls; using HandyControl.Controls;
using HandyControlDemo.Data; using HandyControlDemo.Data;
using HandyControlDemo.Tools;
namespace HandyControlDemo namespace HandyControlDemo
{ {
@@ -11,6 +14,15 @@ namespace HandyControlDemo
InitializeComponent(); InitializeComponent();
} }
protected override void OnInitialized(EventArgs e)
{
base.OnInitialized(e);
Messenger.Default.Send<object>(null, MessageToken.ClearLeftSelected);
Messenger.Default.Send(true, MessageToken.FullSwitch);
Messenger.Default.Send(AssemblyHelper.CreateInternalInstance($"UserControl.{MessageToken.OverView}"), MessageToken.LoadShowContent);
}
protected override void OnClosing(CancelEventArgs e) protected override void OnClosing(CancelEventArgs e)
{ {
if (GlobalData.NotifyIconIsShow) if (GlobalData.NotifyIconIsShow)
@@ -47,7 +47,7 @@ namespace HandyControlDemo.Properties.Langs {
} }
/// <summary> /// <summary>
/// 使用此强类型资源类,为所有资源查找 /// 重写当前线程的 CurrentUICulture 属性
/// 重写当前线程的 CurrentUICulture 属性。 /// 重写当前线程的 CurrentUICulture 属性。
/// </summary> /// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
@@ -879,6 +879,15 @@ namespace HandyControlDemo.Properties.Langs {
} }
} }
/// <summary>
/// 查找类似 概览 的本地化字符串。
/// </summary>
public static string Overview {
get {
return ResourceManager.GetString("Overview", resourceCulture);
}
}
/// <summary> /// <summary>
/// 查找类似 页码条 的本地化字符串。 /// 查找类似 页码条 的本地化字符串。
/// </summary> /// </summary>
@@ -579,4 +579,7 @@
<data name="SideMenu" xml:space="preserve"> <data name="SideMenu" xml:space="preserve">
<value>SideMenu</value> <value>SideMenu</value>
</data> </data>
<data name="Overview" xml:space="preserve">
<value>Overview</value>
</data>
</root> </root>
@@ -579,4 +579,7 @@
<data name="SideMenu" xml:space="preserve"> <data name="SideMenu" xml:space="preserve">
<value>侧边菜单</value> <value>侧边菜单</value>
</data> </data>
<data name="Overview" xml:space="preserve">
<value>概览</value>
</data>
</root> </root>
@@ -15,27 +15,27 @@
<Border BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}"> <Border BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}">
<controls:ScrollViewer Orientation="Horizontal" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Hidden" IsEnableInertia="True"> <controls:ScrollViewer Orientation="Horizontal" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Hidden" IsEnableInertia="True">
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="10,10,32,10"> <Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="10,10,32,10">
<Border Background="{DynamicResource PrimaryBrush}"> <Border Background="{DynamicResource PrimaryBrush}">
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/> <TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
</Border> </Border>
</Border> </Border>
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="10,10,32,10"> <Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="10,10,32,10">
<Border Background="{DynamicResource PrimaryBrush}"> <Border Background="{DynamicResource PrimaryBrush}">
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/> <TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
</Border> </Border>
</Border> </Border>
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="10,10,32,10"> <Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="10,10,32,10">
<Border Background="{DynamicResource PrimaryBrush}"> <Border Background="{DynamicResource PrimaryBrush}">
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/> <TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
</Border> </Border>
</Border> </Border>
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="10,10,32,10"> <Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="10,10,32,10">
<Border Background="{DynamicResource PrimaryBrush}"> <Border Background="{DynamicResource PrimaryBrush}">
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/> <TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
</Border> </Border>
</Border> </Border>
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="10,10,32,10"> <Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="10,10,32,10">
<Border Background="{DynamicResource PrimaryBrush}"> <Border Background="{DynamicResource PrimaryBrush}">
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/> <TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
</Border> </Border>
@@ -46,27 +46,27 @@
<Border Grid.Row="1" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}" Margin="0,16,0,0"> <Border Grid.Row="1" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}" Margin="0,16,0,0">
<controls:ScrollViewer IsEnableInertia="True"> <controls:ScrollViewer IsEnableInertia="True">
<WrapPanel Orientation="Horizontal"> <WrapPanel Orientation="Horizontal">
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="10,10,32,10"> <Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="10,10,32,10">
<Border Background="{DynamicResource PrimaryBrush}"> <Border Background="{DynamicResource PrimaryBrush}">
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/> <TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
</Border> </Border>
</Border> </Border>
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="10,10,32,10"> <Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="10,10,32,10">
<Border Background="{DynamicResource PrimaryBrush}"> <Border Background="{DynamicResource PrimaryBrush}">
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/> <TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
</Border> </Border>
</Border> </Border>
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="10,10,32,10"> <Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="10,10,32,10">
<Border Background="{DynamicResource PrimaryBrush}"> <Border Background="{DynamicResource PrimaryBrush}">
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/> <TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
</Border> </Border>
</Border> </Border>
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="10,10,32,10"> <Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="10,10,32,10">
<Border Background="{DynamicResource PrimaryBrush}"> <Border Background="{DynamicResource PrimaryBrush}">
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/> <TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
</Border> </Border>
</Border> </Border>
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="10,10,32,10"> <Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="10,10,32,10">
<Border Background="{DynamicResource PrimaryBrush}"> <Border Background="{DynamicResource PrimaryBrush}">
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/> <TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
</Border> </Border>
@@ -8,6 +8,8 @@
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl" xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs" xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"> xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<DockPanel>
<Button Command="{Binding OpenOverviewCmd}" DockPanel.Dock="Top" HorizontalAlignment="Stretch" Margin="4,4,4,0" Content="{x:Static langs:Lang.Overview}"/>
<TabControl SelectionChanged="TabControl_OnSelectionChanged" Style="{StaticResource TabControlInLine}" Background="Transparent" > <TabControl SelectionChanged="TabControl_OnSelectionChanged" Style="{StaticResource TabControlInLine}" Background="Transparent" >
<i:Interaction.Triggers> <i:Interaction.Triggers>
<i:EventTrigger EventName="SelectionChanged"> <i:EventTrigger EventName="SelectionChanged">
@@ -417,4 +419,5 @@
</Grid> </Grid>
</TabItem> </TabItem>
</TabControl> </TabControl>
</DockPanel>
</Border> </Border>
@@ -0,0 +1,367 @@
<UserControl x:Class="HandyControlDemo.UserControl.OverView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Background="{DynamicResource RegionBrush}"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
xmlns:userControl="clr-namespace:HandyControlDemo.UserControl"
xmlns:interactivity="clr-namespace:HandyControl.Interactivity;assembly=HandyControl"
d:DesignHeight="3000"
d:DesignWidth="2400">
<ScrollViewer>
<Canvas Name="CanvasMain" Margin="32" Height="3000" Effect="{StaticResource EffectShadow5}">
<Border Visibility="Visible" BorderThickness="1" Padding="16" Style="{StaticResource BorderRegion}" CornerRadius="4">
<StackPanel>
<Button Width="80" Content="Button" Margin="0,0,0,10"/>
<Button Width="80" Content="Button" Style="{StaticResource ButtonPrimary}" Margin="0,0,0,10"/>
<Button Width="80" Padding="16,8" controls:IconElement.Geometry="{StaticResource DeleteGeometry}" Margin="0,0,0,10"/>
<Button Width="80" Content="Clock" Margin="0,0,0,10" Style="{StaticResource ButtonPrimary}" controls:IconElement.Geometry="{StaticResource ClockGeometry}"/>
<Button Width="80" Margin="0,0,0,10" Height="28" Padding="10,0" Background="#24292e" Foreground="White" Content="Button" Style="{StaticResource ButtonCustom}" controls:BackgroundSwitchElement.MouseHoverBackground="Red" controls:BackgroundSwitchElement.MouseDownBackground="PaleVioletRed"/>
<Button Width="80" Padding="16,8" Style="{StaticResource ButtonIcon}" Foreground="{DynamicResource PrimaryTextBrush}" controls:IconElement.Geometry="{StaticResource UpDownGeometry}"/>
</StackPanel>
</Border>
<Border Visibility="Visible" BorderThickness="1" Padding="16" Style="{StaticResource BorderRegion}" CornerRadius="4" Canvas.Left="128">
<StackPanel>
<ToggleButton Width="128" Margin="0,0,0,10" IsChecked="True" Content="ToggleButton"/>
<ToggleButton Width="128" Margin="0,0,0,10" Content="ToggleButton" Style="{StaticResource ToggleButtonPrimary}"/>
<ToggleButton Width="128" Margin="0,0,0,10" Style="{StaticResource ToggleButtonIcon}" controls:IconSwitchElement.Geometry="{StaticResource DeleteGeometry}" controls:IconSwitchElement.GeometrySelected="{StaticResource DownGeometry}"/>
<ToggleButton Width="128" Margin="0,0,0,10" IsChecked="True" Content="ToggleButton" controls:IconElement.Geometry="{StaticResource ClockGeometry}" Style="{StaticResource ToggleButtonPrimary}"/>
<ToggleButton Margin="0,0,0,10" IsChecked="True" Style="{StaticResource ToggleButtonCustom}" controls:StatusSwitchElement.HiddenElement="True">
<controls:StatusSwitchElement.CheckedElement>
<Border Width="128" Height="30" CornerRadius="4" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}">
<Ellipse Width="20" Height="20" Fill="{DynamicResource PrimaryBrush}" StrokeThickness="1" Stroke="{DynamicResource BorderBrush}"/>
</Border>
</controls:StatusSwitchElement.CheckedElement>
<Border Width="128" Height="30" CornerRadius="4" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}">
<Ellipse Width="20" Height="20" Fill="{DynamicResource BorderBrush}" StrokeThickness="1" Stroke="{DynamicResource BorderBrush}"/>
</Border>
</ToggleButton>
<ToggleButton Margin="0,0,0,10" IsChecked="True" HorizontalAlignment="Center" Style="{StaticResource ToggleButtonSwitch}"/>
<ToggleButton Style="{StaticResource ToggleButtonIconTransparent}" controls:IconSwitchElement.Geometry="{StaticResource DeleteGeometry}" controls:IconSwitchElement.GeometrySelected="{StaticResource DownGeometry}"/>
</StackPanel>
</Border>
<Border Visibility="Visible" BorderThickness="1" Padding="16" Style="{StaticResource BorderRegion}" CornerRadius="4" Canvas.Left="611">
<userControl:SideMenuDemoCtl Height="424" Margin="-32" Background="Transparent"/>
</Border>
<Border Visibility="Visible" BorderThickness="1" Padding="16" Style="{StaticResource BorderRegion}" CornerRadius="4" Canvas.Left="304">
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<StackPanel>
<RadioButton Content="Radio"/>
<RadioButton Margin="0,16,0,0" Content="Radio" IsChecked="True" IsEnabled="False"/>
<RadioButton Margin="0,16,0,0" Content="Radio"/>
<RadioButton Margin="0,16,0,0" Content="Radio" IsEnabled="False"/>
</StackPanel>
<UniformGrid Margin="22,0,0,0" Rows="2" Columns="2">
<RadioButton Margin="10,0,0,0" Background="{DynamicResource SecondaryRegionBrush}" controls:IconElement.Geometry="{StaticResource CalendarGeometry}" Style="{StaticResource RadioButtonIcon}" Content="Radio"/>
<RadioButton Margin="10,0,0,0" Background="{DynamicResource SecondaryRegionBrush}" Style="{StaticResource RadioButtonIcon}" Content="Radio" IsChecked="True"/>
<RadioButton Margin="10,0,0,0" BorderThickness="1" controls:IconElement.Geometry="{StaticResource CalendarGeometry}" Style="{StaticResource RadioButtonIcon}" Content="Radio"/>
<RadioButton Margin="10,0,0,0" BorderThickness="1" Style="{StaticResource RadioButtonIcon}" Content="Radio"/>
</UniformGrid>
</StackPanel>
<controls:RadioGroup Margin="0,32,0,0">
<RadioButton Content="Radio" IsChecked="True"/>
<RadioButton Content="Radio"/>
<RadioButton IsEnabled="False" Content="Radio"/>
<RadioButton Content="Radio"/>
</controls:RadioGroup>
<controls:RadioGroup Margin="0,16,0,0" Style="{StaticResource RadioGroupSolid}">
<RadioButton Content="Radio"/>
<RadioButton Content="Radio"/>
<RadioButton IsEnabled="False" Content="Radio"/>
<RadioButton Content="Radio" IsChecked="True"/>
</controls:RadioGroup>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<controls:RadioGroup Margin="0,16,8,0" Orientation="Vertical">
<RadioButton Content="Radio" IsChecked="True"/>
<RadioButton Content="Radio"/>
<RadioButton IsEnabled="False" Content="Radio"/>
<RadioButton Content="Radio"/>
</controls:RadioGroup>
<controls:RadioGroup Margin="8,16,0,0" Orientation="Vertical" Style="{StaticResource RadioGroupSolid}">
<RadioButton Content="Radio"/>
<RadioButton Content="Radio"/>
<RadioButton IsEnabled="False" Content="Radio"/>
<RadioButton Content="Radio" IsChecked="True"/>
</controls:RadioGroup>
</StackPanel>
</StackPanel>
</Border>
<Border Visibility="Visible" BorderThickness="1" Padding="16" Style="{StaticResource BorderRegion}" CornerRadius="4" Canvas.Top="276" Height="226">
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<CheckBox Content="CheckBox" IsChecked="True"/>
<CheckBox Margin="0,16,0,0" Content="CheckBox" IsChecked="True" IsEnabled="False"/>
<CheckBox Margin="0,16,0,0" Content="CheckBox"/>
<CheckBox Margin="0,16,0,0" Content="CheckBox" IsEnabled="False"/>
<CheckBox Margin="0,16,0,0" Content="CheckBox" IsChecked="{x:Null}"/>
<CheckBox Margin="0,16,0,0" Content="CheckBox" IsChecked="{x:Null}" IsEnabled="False"/>
</StackPanel>
</Border>
<Border Visibility="Visible" BorderThickness="1" Padding="16" Style="{StaticResource BorderRegion}" CornerRadius="4" Canvas.Top="516">
<StackPanel>
<Slider Width="400" IsSnapToTickEnabled="True" Value="8"/>
<Slider Width="400" IsSnapToTickEnabled="True" Value="3" Margin="0,32,0,0" IsEnabled="False"/>
<Slider Width="400" IsSnapToTickEnabled="True" TickFrequency="5" Maximum="100" TickPlacement="TopLeft" Value="10" IsSelectionRangeEnabled="True" SelectionStart="10" SelectionEnd="80" Margin="0,32,0,0"/>
<Slider Width="400" controls:TipElement.Visibility="Visible" IsSnapToTickEnabled="True" Maximum="100" Value="60" TickFrequency="10" TickPlacement="BottomRight" Margin="0,32,0,0"/>
<Slider Width="400" controls:TipElement.Visibility="Visible" controls:TipElement.Placement="BottomRight" IsSnapToTickEnabled="True" Value="5" TickPlacement="Both" Margin="0,32,0,0"/>
</StackPanel>
</Border>
<Border Visibility="Visible" BorderThickness="1" Padding="16" Style="{StaticResource BorderRegion}" CornerRadius="4" Canvas.Top="806" Width="349">
<TabControl Height="200" Style="{StaticResource TabControlInLine}">
<TabItem Header="Title" HeaderStringFormat="{}{0}1">
<Border Background="{DynamicResource PrimaryBrush}">
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
<Run Text="Text"/>
<Run Text="1"/>
</TextBlock>
</Border>
</TabItem>
<TabItem Header="Title" HeaderStringFormat="{}{0}2">
<Border Background="{DynamicResource SuccessBrush}">
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
<Run Text="Text"/>
<Run Text="2"/>
</TextBlock>
</Border>
</TabItem>
<TabItem Header="Title" HeaderStringFormat="{}{0}3">
<Border Background="{DynamicResource InfoBrush}">
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
<Run Text="Text"/>
<Run Text="3"/>
</TextBlock>
</Border>
</TabItem>
<TabItem Header="Title" HeaderStringFormat="{}{0}4">
<Border Background="{DynamicResource WarningBrush}">
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
<Run Text="Text"/>
<Run Text="4"/>
</TextBlock>
</Border>
</TabItem>
<TabItem IsSelected="True" Header="Title" HeaderStringFormat="{}{0}5">
<Border Background="{DynamicResource DangerBrush}">
<TextBlock Style="{StaticResource TextBlockLargeBold}" Foreground="{DynamicResource TextIconBrush}">
<Run Text="Text"/>
<Run Text="5"/>
</TextBlock>
</Border>
</TabItem>
</TabControl>
</Border>
<Border Visibility="Visible" BorderThickness="1" Padding="16" Style="{StaticResource BorderRegion}" CornerRadius="4" Canvas.Left="859" Width="240">
<StackPanel>
<ProgressBar Value="20" Margin="0,0,0,10"/>
<ProgressBar Style="{StaticResource ProgressBarDangerStripe}" Margin="0,0,0,10" Value="120" Maximum="200" />
<ProgressBar Style="{StaticResource ProgressBarFlat}" Margin="0,8,0,10" Value="110" Maximum="200" />
</StackPanel>
</Border>
<Border Visibility="Visible" BorderThickness="1" Padding="16" Style="{StaticResource BorderRegion}" CornerRadius="4" Canvas.Left="859" Height="264" Canvas.Top="130">
<ScrollViewer>
<StackPanel VerticalAlignment="Top">
<Expander Header="Title" BorderThickness="1,1,1,0" BorderBrush="{DynamicResource BorderBrush}" Width="206" HorizontalAlignment="Left">
<Border Height="100" Background="{DynamicResource SecondaryRegionBrush}"/>
</Expander>
<Expander Header="Title" BorderThickness="1,1,1,0" BorderBrush="{DynamicResource BorderBrush}" Width="206" HorizontalAlignment="Left">
<Border Height="100" Background="{DynamicResource SecondaryRegionBrush}"/>
</Expander>
<Expander Header="Title" BorderThickness="1,1,1,0" BorderBrush="{DynamicResource BorderBrush}" Width="206" HorizontalAlignment="Left">
<Border Height="100" Background="{DynamicResource SecondaryRegionBrush}"/>
</Expander>
<Expander Header="Title" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}" Width="206" HorizontalAlignment="Left">
<Border Height="100" Background="{DynamicResource SecondaryRegionBrush}"/>
</Expander>
</StackPanel>
</ScrollViewer>
</Border>
<Border Visibility="Visible" BorderThickness="1" Padding="16" Style="{StaticResource BorderRegion}" CornerRadius="4" Canvas.Left="1113">
<Calendar SelectionMode="MultipleRange"/>
</Border>
<Border Visibility="Visible" BorderThickness="1" Padding="16" Style="{StaticResource BorderRegion}" CornerRadius="4" Canvas.Left="1421" Height="346">
<controls:Clock/>
</Border>
<Border Visibility="Visible" BorderThickness="1" Padding="16" Style="{StaticResource BorderRegion}" CornerRadius="4" Canvas.Left="611" Height="326" Canvas.Top="408" Width="488">
<DataGrid HeadersVisibility="All" RowHeaderWidth="60" AutoGenerateColumns="False" ItemsSource="{Binding DataList}">
<DataGrid.RowHeaderTemplate>
<DataTemplate>
<CheckBox IsChecked="{Binding IsSelected,RelativeSource={RelativeSource AncestorType=DataGridRow}}"/>
</DataTemplate>
</DataGrid.RowHeaderTemplate>
<DataGrid.Columns>
<DataGridTextColumn IsReadOnly="True" Width="80" CanUserResize="False" Binding="{Binding Index}" Header="Index"/>
<DataGridTemplateColumn Width="60" CanUserResize="False">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Image Source="{Binding ImgPath}" Width="32" Height="32" Stretch="Uniform"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTextColumn Width="1*" Binding="{Binding Name}" Header="Name"/>
<DataGridCheckBoxColumn Width="100" CanUserResize="False" Binding="{Binding IsSelected}" Header="Selected"/>
<DataGridComboBoxColumn ItemsSource="{Binding Source={StaticResource DemoTypes}}" Width="100" CanUserResize="False" SelectedValueBinding="{Binding Type}" Header="Type"/>
<DataGridTextColumn Width="1*" Binding="{Binding Remark}" Header="Remark"/>
</DataGrid.Columns>
</DataGrid>
</Border>
<Border Visibility="Visible" BorderThickness="1" Padding="16" Style="{StaticResource BorderRegion}" CornerRadius="4" Canvas.Left="363" Height="234" Canvas.Top="806">
<TreeView Width="200" ItemsSource="{Binding DataList}">
<TreeView.ItemTemplate>
<HierarchicalDataTemplate ItemsSource="{Binding DataList}">
<TextBlock Text="{Binding Name}"/>
</HierarchicalDataTemplate>
</TreeView.ItemTemplate>
</TreeView>
</Border>
<Border Visibility="Visible" BorderThickness="1" Padding="16" Style="{StaticResource BorderRegion}" CornerRadius="4" Canvas.Left="1158" Height="334" Canvas.Top="748" Width="219">
<ListBox ItemsSource="{Binding DataList}">
<ListBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Name}"/>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Border>
<Border Visibility="Visible" BorderThickness="1" Padding="16" Style="{StaticResource BorderRegion}" CornerRadius="4" Canvas.Left="1113" Canvas.Top="360" Width="264">
<GroupBox Height="200" Header="GroupBox" Padding="10" Margin="0,0,-2,0" >
<Border Background="{DynamicResource PrimaryBrush}" CornerRadius="4">
<TextBlock Text="GroupBox" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
</Border>
</GroupBox>
</Border>
<Border Visibility="Visible" BorderThickness="1" Padding="16" Style="{StaticResource BorderRegion}" CornerRadius="4" Canvas.Top="1054" Width="597">
<ToolBarTray VerticalAlignment="Center">
<ToolBar Padding="6">
<CheckBox IsChecked="True" Margin="10,0,0,0"/>
<Separator 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="Button" Margin="10,0,0,0"/>
<Button Content="Button" Margin="10,0,0,0" Style="{StaticResource ButtonPrimary}"/>
</ToolBar>
<ToolBar Band="1" Padding="6">
<ComboBox DataContext="{Binding ComboBoxDemo,Source={StaticResource Locator}}" ItemsSource="{Binding DataList}" SelectedIndex="0" Width="230"/>
<TextBox Text="TextTextTextText" Margin="10,0,0,0" Width="230"/>
</ToolBar>
<ToolBar Band="0" Padding="6">
<Menu Background="Transparent" VerticalAlignment="Center">
<MenuItem Header="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="About">
<MenuItem Header="Email">
<MenuItem.Icon>
<Path Data="{StaticResource EmailGeometry}" Fill="{DynamicResource PrimaryBrush}"/>
</MenuItem.Icon>
</MenuItem>
<MenuItem Header="Chatroom">
<MenuItem.Icon>
<Path Data="{StaticResource GitterGeometry}" Fill="#e52e64"/>
</MenuItem.Icon>
</MenuItem>
<MenuItem Header="Blog">
<MenuItem.Icon>
<Path Data="{StaticResource CnblogsGeometry}" Fill="{DynamicResource PrimaryTextBrush}"/>
</MenuItem.Icon>
</MenuItem>
</MenuItem>
<MenuItem Header="Contributors"/>
</Menu>
</ToolBar>
</ToolBarTray>
</Border>
<Border Visibility="Visible" BorderThickness="1" Padding="16" Style="{StaticResource BorderRegion}" CornerRadius="4" Canvas.Left="1391" Canvas.Top="360">
<UniformGrid Rows="3" Columns="3" Width="240" Height="240">
<controls:Gravatar Id="User1"/>
<controls:Gravatar Id="User2"/>
<controls:Gravatar Style="{StaticResource GravatarCircleImg}">
<Image Source="/HandyControlDemo;component/Resources/Img/Album/2.jpg"/>
</controls:Gravatar>
<controls:Gravatar Id="User4"/>
<controls:Gravatar Id="User5" Style="{StaticResource GravatarCircle}"/>
<controls:Gravatar Id="User6"/>
<controls:Gravatar Style="{StaticResource GravatarCircle}" Source="/HandyControlDemo;component/Resources/Img/Album/1.jpg"/>
<controls:Gravatar Id="User8"/>
<controls:Gravatar Id="User9"/>
</UniformGrid>
</Border>
<Border Visibility="Visible" BorderThickness="1" Padding="16" Style="{StaticResource BorderRegion}" CornerRadius="4" Canvas.Left="448" Canvas.Top="516" Height="276" Width="149">
<StackPanel VerticalAlignment="Center">
<controls:Badge HorizontalAlignment="Center" Text="New" BadgeMargin="0,-14,-20,0" Height="30">
<Button Content="Comment"/>
</controls:Badge>
<controls:Badge DataContext="{Binding BadgeDemo, Source={StaticResource Locator}}" HorizontalAlignment="Center" Value="{Binding Count}" BadgeMargin="0,-14,-10,0" Height="30" Margin="0,16,0,0" Style="{StaticResource BadgePrimary}">
<Button Content="Click2Count" Command="{Binding CountCmd}"/>
</controls:Badge>
<controls:Badge HorizontalAlignment="Center" Value="100" BadgeMargin="0,-14,-20,0" Height="30" Margin="0,16,0,0" Style="{StaticResource BadgeDanger}">
<Button Content="Comment"/>
</controls:Badge>
<controls:Badge HorizontalAlignment="Center" Status="Dot" Height="30" Margin="0,16,0,0" Style="{StaticResource BadgeDanger}">
<Button Content="Reply"/>
</controls:Badge>
<controls:Badge HorizontalAlignment="Center" Status="Processing" Height="30" Margin="0,16,0,0" Style="{StaticResource BadgeDanger}">
<Button Content="Reply" />
</controls:Badge>
</StackPanel>
</Border>
<Border Visibility="Visible" BorderThickness="1" Padding="16" Style="{StaticResource BorderRegion}" CornerRadius="4" Canvas.Left="128" Canvas.Top="310" Width="162" Height="84">
<WrapPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<controls:Shield Subject="chat" Status="on gitter" Margin="0,0,0,0" Color="#4eb899" Command="interactivity:ControlCommands.OpenLink" controls:LinkElement.Link="https://gitter.im/HandyControl/Lobby?utm_source=badge&amp;utm_medium=badge&amp;utm_campaign=pr-badge&amp;utm_content=badge"/>
<controls:Shield Subject="qq" Status="714704041" Margin="0,4,0,0" Color="#d8624c" Command="interactivity:ControlCommands.OpenLink" controls:LinkElement.Link="http://shang.qq.com/wpa/qunwpa?idkey=a571e5553c9d41e49c4f22f3a8b2865451497a795ff281fedf3285def247efc1"/>
</WrapPanel>
</Border>
<Border Visibility="Visible" BorderThickness="1" Padding="16" Style="{StaticResource BorderRegion}" CornerRadius="4" Canvas.Left="128" Canvas.Top="408">
<StackPanel Orientation="Horizontal">
<StackPanel Width="271" VerticalAlignment="Center" Margin="0,0,32,0">
<controls:LoadingLine/>
<controls:LoadingLine Margin="0,28,0,0" Foreground="BlueViolet" Style="{StaticResource LoadingLineLarge}"/>
</StackPanel>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<controls:LoadingCircle/>
<Border VerticalAlignment="Center" Margin="32,0,0,0" Background="{DynamicResource PrimaryBrush}" CornerRadius="10">
<controls:LoadingCircle Style="{StaticResource LoadingCircleLight}" Margin="10"/>
</Border>
</StackPanel>
</StackPanel>
</Border>
<Border Visibility="Visible" BorderThickness="1" Padding="16" Style="{StaticResource BorderRegion}" CornerRadius="4" Canvas.Left="611" Canvas.Top="748" Height="214">
<controls:Transfer ItemsSource="{Binding DataList}">
<controls:Transfer.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Name}"/>
</DataTemplate>
</controls:Transfer.ItemTemplate>
</controls:Transfer>
</Border>
<Border Visibility="Collapsed" BorderThickness="1" Padding="16" Style="{StaticResource BorderRegion}" CornerRadius="4" Canvas.Left="611" Canvas.Top="976">
<userControl:CoverFlowDemoCtl Width="563" Margin="-32" Background="Transparent"/>
</Border>
<Border Visibility="Visible" BorderThickness="1" Padding="16" Style="{StaticResource BorderRegion}" CornerRadius="4" Canvas.Left="1391" Canvas.Top="648" Width="274">
<userControl:ColorPickerDemoCtl Margin="-32" Background="Transparent"/>
</Border>
<Border Visibility="Collapsed" BorderThickness="1" Padding="16" Style="{StaticResource BorderRegion}" CornerRadius="4" Canvas.Left="1113" Canvas.Top="608" Width="264" Height="126">
<controls:TagPanel Orientation="Horizontal" MaxWidth="400" VerticalAlignment="Center">
<controls:Tag ShowCloseButton="False" Content="TextText"/>
<controls:Tag Content="Text"/>
<controls:Tag IsSelected="True" Selectable="True" ShowCloseButton="False" Content="Text"/>
<controls:Tag IsSelected="True" Selectable="True" Content="Text"/>
<controls:Tag ShowCloseButton="False" Content="TextText"/>
</controls:TagPanel>
</Border>
<!--<Border Visibility="Collapsed" Width="14" Height="14" Background="Black" Canvas.Left="290" Canvas.Top="1040"/>-->
</Canvas>
</ScrollViewer>
</UserControl>
@@ -0,0 +1,18 @@
using System.Windows;
using HandyControl.Tools.Extension;
namespace HandyControlDemo.UserControl
{
public partial class OverView
{
public OverView()
{
InitializeComponent();
foreach (UIElement child in CanvasMain.Children)
{
child.Show();
}
}
}
}
@@ -6,32 +6,32 @@
Background="{DynamicResource RegionBrush}"> Background="{DynamicResource RegionBrush}">
<controls:TransitioningContentControl> <controls:TransitioningContentControl>
<UniformGrid Margin="32,32,0,0" Columns="3" Rows="2"> <UniformGrid Margin="32,32,0,0" Columns="3" Rows="2">
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="0,0,32,32"> <Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="0,0,32,32">
<Border Background="{DynamicResource PrimaryBrush}"> <Border Background="{DynamicResource PrimaryBrush}">
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/> <TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
</Border> </Border>
</Border> </Border>
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="0,0,32,32" Effect="{StaticResource EffectShadow1}"> <Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="0,0,32,32" Effect="{StaticResource EffectShadow1}">
<Border Background="{DynamicResource InfoBrush}"> <Border Background="{DynamicResource InfoBrush}">
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/> <TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
</Border> </Border>
</Border> </Border>
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="0,0,32,32" Effect="{StaticResource EffectShadow2}"> <Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="0,0,32,32" Effect="{StaticResource EffectShadow2}">
<Border Background="{DynamicResource WarningBrush}"> <Border Background="{DynamicResource WarningBrush}">
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/> <TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
</Border> </Border>
</Border> </Border>
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="0,0,32,32" Effect="{StaticResource EffectShadow3}"> <Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="0,0,32,32" Effect="{StaticResource EffectShadow3}">
<Border Background="{DynamicResource DangerBrush}"> <Border Background="{DynamicResource DangerBrush}">
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/> <TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
</Border> </Border>
</Border> </Border>
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="0,0,32,32" Effect="{StaticResource EffectShadow4}"> <Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="0,0,32,32" Effect="{StaticResource EffectShadow4}">
<Border Background="{DynamicResource AccentBrush}"> <Border Background="{DynamicResource AccentBrush}">
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/> <TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
</Border> </Border>
</Border> </Border>
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="0,0,32,32" Effect="{StaticResource EffectShadow5}"> <Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="0,0,32,32" Effect="{StaticResource EffectShadow5}">
<Border Background="{DynamicResource BorderBrush}"> <Border Background="{DynamicResource BorderBrush}">
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center"/> <TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border> </Border>
@@ -15,27 +15,27 @@
<Border BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}"> <Border BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}">
<ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Hidden"> <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Hidden">
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="10,10,32,10"> <Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="10,10,32,10">
<Border Background="{DynamicResource PrimaryBrush}"> <Border Background="{DynamicResource PrimaryBrush}">
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/> <TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
</Border> </Border>
</Border> </Border>
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="10,10,32,10"> <Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="10,10,32,10">
<Border Background="{DynamicResource PrimaryBrush}"> <Border Background="{DynamicResource PrimaryBrush}">
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/> <TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
</Border> </Border>
</Border> </Border>
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="10,10,32,10"> <Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="10,10,32,10">
<Border Background="{DynamicResource PrimaryBrush}"> <Border Background="{DynamicResource PrimaryBrush}">
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/> <TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
</Border> </Border>
</Border> </Border>
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="10,10,32,10"> <Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="10,10,32,10">
<Border Background="{DynamicResource PrimaryBrush}"> <Border Background="{DynamicResource PrimaryBrush}">
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/> <TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
</Border> </Border>
</Border> </Border>
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="10,10,32,10"> <Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="10,10,32,10">
<Border Background="{DynamicResource PrimaryBrush}"> <Border Background="{DynamicResource PrimaryBrush}">
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/> <TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
</Border> </Border>
@@ -46,27 +46,27 @@
<Border Grid.Row="1" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}" Margin="0,16,0,0"> <Border Grid.Row="1" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}" Margin="0,16,0,0">
<ScrollViewer> <ScrollViewer>
<WrapPanel Orientation="Horizontal"> <WrapPanel Orientation="Horizontal">
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="10,10,32,10"> <Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="10,10,32,10">
<Border Background="{DynamicResource PrimaryBrush}"> <Border Background="{DynamicResource PrimaryBrush}">
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/> <TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
</Border> </Border>
</Border> </Border>
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="10,10,32,10"> <Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="10,10,32,10">
<Border Background="{DynamicResource PrimaryBrush}"> <Border Background="{DynamicResource PrimaryBrush}">
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/> <TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
</Border> </Border>
</Border> </Border>
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="10,10,32,10"> <Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="10,10,32,10">
<Border Background="{DynamicResource PrimaryBrush}"> <Border Background="{DynamicResource PrimaryBrush}">
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/> <TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
</Border> </Border>
</Border> </Border>
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="10,10,32,10"> <Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="10,10,32,10">
<Border Background="{DynamicResource PrimaryBrush}"> <Border Background="{DynamicResource PrimaryBrush}">
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/> <TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
</Border> </Border>
</Border> </Border>
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="10,10,32,10"> <Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="10,10,32,10">
<Border Background="{DynamicResource PrimaryBrush}"> <Border Background="{DynamicResource PrimaryBrush}">
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/> <TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
</Border> </Border>
@@ -91,6 +91,12 @@ namespace HandyControlDemo.ViewModel
new Lazy<RelayCommand<SelectionChangedEventArgs>>(() => new Lazy<RelayCommand<SelectionChangedEventArgs>>(() =>
new RelayCommand<SelectionChangedEventArgs>(SwitchDemo)).Value; new RelayCommand<SelectionChangedEventArgs>(SwitchDemo)).Value;
/// <summary>
/// 打开概览命令
/// </summary>
public RelayCommand OpenOverviewCmd => new Lazy<RelayCommand>(() =>
new RelayCommand(OpenOverview)).Value;
#endregion #endregion
#region 方法 #region 方法
@@ -121,6 +127,16 @@ namespace HandyControlDemo.ViewModel
} }
} }
/// <summary>
/// 打开概览
/// </summary>
private void OpenOverview()
{
Messenger.Default.Send<object>(null, MessageToken.ClearLeftSelected);
Messenger.Default.Send(true, MessageToken.FullSwitch);
Messenger.Default.Send(AssemblyHelper.CreateInternalInstance($"UserControl.{MessageToken.OverView}"), MessageToken.LoadShowContent);
}
#endregion #endregion
} }
} }
@@ -194,6 +194,8 @@ namespace HandyControl.Controls
var index = PageIndex - 1; var index = PageIndex - 1;
PageIndex = index < 0 ? (Loop ? _uriList.Count - 1 : 0) : index; PageIndex = index < 0 ? (Loop ? _uriList.Count - 1 : 0) : index;
} }
e.Handled = true;
} }
/// <summary> /// <summary>
@@ -7,7 +7,7 @@
</ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries>
<!--用于包裹一个区域--> <!--用于包裹一个区域-->
<Style x:Key="BorderRegionStyle" TargetType="Border"> <Style x:Key="BorderRegion" TargetType="Border">
<Setter Property="Padding" Value="10"/> <Setter Property="Padding" Value="10"/>
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/> <Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
<Setter Property="BorderThickness" Value="1"/> <Setter Property="BorderThickness" Value="1"/>