add GotoTop

This commit is contained in:
NaBian committed 2019-02-23 20:06:03 +08:00
1 parent b8692d080f
commit b8c264d135
16 files changed
+238 -7

No files matched your search

+2
View File
@@ -82,6 +82,8 @@
public static readonly string ChatBubbleDemoCtl = nameof(ChatBubbleDemoCtl);
public static readonly string GotoTopDemoCtl = nameof(GotoTopDemoCtl);
public static readonly string ButtonDemoCtl = nameof(ButtonDemoCtl);
public static readonly string ToggleButtonDemoCtl = nameof(ToggleButtonDemoCtl);
+2 -1
View File
@@ -43,7 +43,8 @@ var controlList = new List<string>
"CoverFlowDemoCtl",
"ProgressButtonDemoCtl",
"TransferDemoCtl",
"ChatBubbleDemoCtl"
"ChatBubbleDemoCtl",
"GotoTopDemoCtl"
};
var styleList = new List<string>
{
+8
View File
@@ -175,6 +175,9 @@
<Compile Include="UserControl\Controls\FlipClockDemoCtl.xaml.cs">
<DependentUpon>FlipClockDemoCtl.xaml</DependentUpon>
</Compile>
<Compile Include="UserControl\Controls\GotoTopDemoCtl.xaml.cs">
<DependentUpon>GotoTopDemoCtl.xaml</DependentUpon>
</Compile>
<Compile Include="UserControl\Controls\OutlineTextDemoCtl.xaml.cs">
<DependentUpon>OutlineTextDemoCtl.xaml</DependentUpon>
</Compile>
@@ -488,6 +491,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="UserControl\Controls\GotoTopDemoCtl.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="UserControl\Controls\OutlineTextDemoCtl.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@@ -746,6 +753,7 @@
<Generator>TextTemplatingFileGenerator</Generator>
<LastGenOutput>MessageToken.cs</LastGenOutput>
</Content>
<Resource Include="Resources\Img\LeftMainContent\GoToTop_16x.png" />
<Resource Include="Resources\Img\LeftMainContent\Label_16x.png" />
<Resource Include="Resources\Img\Chat\chat_back1.jpg" />
<Resource Include="Resources\Img\Chat\chat_back2.jpg" />
+9
View File
@@ -438,6 +438,15 @@ namespace HandyControlDemo.Properties.Langs {
}
}
/// <summary>
/// 查找类似 回到顶部 的本地化字符串。
/// </summary>
public static string GotoTop {
get {
return ResourceManager.GetString("GotoTop", resourceCulture);
}
}
/// <summary>
/// 查找类似 分组框 的本地化字符串。
/// </summary>
@@ -498,4 +498,7 @@
<data name="Label" xml:space="preserve">
<value>Label</value>
</data>
<data name="GotoTop" xml:space="preserve">
<value>GotoTop</value>
</data>
</root>
@@ -498,4 +498,7 @@
<data name="Label" xml:space="preserve">
<value>标签</value>
</data>
<data name="GotoTop" xml:space="preserve">
<value>回到顶部</value>
</data>
</root>
Binary file not shown.

After

Width:  |  Height:  |  Size: 194 B

@@ -0,0 +1,19 @@
<UserControl x:Class="HandyControlDemo.UserControl.GotoTopDemoCtl"
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"
Background="{DynamicResource RegionBrush}">
<Grid Width="500" Height="400">
<controls:ScrollViewer Name="ScrollViewerDemo" IsEnableInertia="True" Margin="0,10,0,0">
<Border Height="2000" Margin="8,0">
<Border.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="White" Offset="0"/>
<GradientStop Color="Black" Offset="1"/>
</LinearGradientBrush>
</Border.Background>
</Border>
</controls:ScrollViewer>
<controls:GotoTop Animated="True" AutoHiding="True" AnimationTime="500" Target="{Binding ElementName=ScrollViewerDemo}" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,20,20"/>
</Grid>
</UserControl>
@@ -0,0 +1,10 @@
namespace HandyControlDemo.UserControl
{
public partial class GotoTopDemoCtl
{
public GotoTopDemoCtl()
{
InitializeComponent();
}
}
}
@@ -188,6 +188,11 @@
</controls:StatusSwitchElement.CheckedElement>
</ToggleButton>
<ListBox Name="ListBoxControl" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1" BorderThickness="0" SelectionMode="Single" Style="{StaticResource ListBoxTransparent}">
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.GotoTopDemoCtl}" Content="{x:Static langs:Lang.GotoTop}">
<controls:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/GoToTop_16x.png"/>
</controls:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.ProgressButtonDemoCtl}" Content="{x:Static langs:Lang.ProgressButton}">
<controls:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/ProgressButton_16x.png"/>
@@ -293,7 +298,7 @@
<Image Source="../../Resources/Img/LeftMainContent/Panel_16x.png"/>
</controls:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.CoverViewDemoCtl}" Content="{x:Static langs:Lang.CoverView}">
<ListBoxItem Tag="{x:Static data:MessageToken.CoverViewDemoCtl}" Content="{x:Static langs:Lang.CoverView}">
<controls:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/DetailDataView_16x.png"/>
</controls:EdgeElement.LeftContent>