add Watermark

This commit is contained in:
NaBian committed 2020-04-30 01:22:27 +08:00
1 parent 507a80a3ee
commit 2ced600571
42 files changed
+357 -269

No files matched your search

@@ -16,7 +16,7 @@
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Image Source="{Binding Source,RelativeSource={RelativeSource AncestorType=UserControl}}" Height="120" Width="120" Stretch="Uniform" Margin="10"/>
<TextBlock TextTrimming="CharacterEllipsis" TextWrapping="NoWrap" Margin="0,0,0,10" Grid.Row="1" Style="{StaticResource TextBlockDefault}" Text="{Binding DisplayName,RelativeSource={RelativeSource AncestorType=UserControl}}"></TextBlock>
<TextBlock TextTrimming="CharacterEllipsis" TextWrapping="NoWrap" Margin="0,0,0,10" Grid.Row="1" Style="{StaticResource TextBlockDefault}" Text="{Binding DisplayName,RelativeSource={RelativeSource AncestorType=UserControl}}"/>
</Grid>
</Border>
</Button>
@@ -2,13 +2,16 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:userControl="clr-namespace:HandyControlDemo.UserControl"
xmlns:hc="https://handyorg.github.io/handycontrol"
DataContext="{Binding BlogsView,Source={StaticResource Locator}}"
Background="{DynamicResource SecondaryRegionBrush}">
<ListBox Background="{DynamicResource BlogDrawingBrush}" ItemContainerStyle="{StaticResource ListBoxItemCustom}" BorderThickness="0" ItemsSource="{Binding DataList}" ItemsPanel="{StaticResource FluidMoveBehaviorWrapPanelItemsPanelTemplate}">
<ListBox.ItemTemplate>
<DataTemplate>
<userControl:Avatar DisplayName="{Binding DisplayName}" Link="{Binding Link}" Source="{Binding AvatarUri}"/>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<hc:Watermark Mark="Blog" FontSize="80" MarkMargin="30,0">
<ListBox Background="Transparent" ItemContainerStyle="{StaticResource ListBoxItemCustom}" BorderThickness="0" ItemsSource="{Binding DataList}" ItemsPanel="{StaticResource FluidMoveBehaviorWrapPanelItemsPanelTemplate}">
<ListBox.ItemTemplate>
<DataTemplate>
<userControl:Avatar DisplayName="{Binding DisplayName}" Link="{Binding Link}" Source="{Binding AvatarUri}"/>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</hc:Watermark>
</UserControl>
@@ -2,13 +2,16 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:userControl="clr-namespace:HandyControlDemo.UserControl"
xmlns:hc="https://handyorg.github.io/handycontrol"
DataContext="{Binding ContributorsView,Source={StaticResource Locator}}"
Background="{DynamicResource SecondaryRegionBrush}">
<ListBox Background="{DynamicResource GitHubDrawingBrush}" ItemContainerStyle="{StaticResource ListBoxItemCustom}" BorderThickness="0" ItemsSource="{Binding DataList}" ItemsPanel="{StaticResource FluidMoveBehaviorWrapPanelItemsPanelTemplate}">
<ListBox.ItemTemplate>
<DataTemplate>
<userControl:Avatar DisplayName="{Binding DisplayName}" Link="{Binding Link}" Source="{Binding AvatarUri}"/>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<hc:Watermark Mark="{StaticResource GitHubStrGeometry}" MarkMargin="30,0" MarkWidth="200" MarkHeight="100">
<ListBox Background="Transparent" ItemContainerStyle="{StaticResource ListBoxItemCustom}" BorderThickness="0" ItemsSource="{Binding DataList}" ItemsPanel="{StaticResource FluidMoveBehaviorWrapPanelItemsPanelTemplate}">
<ListBox.ItemTemplate>
<DataTemplate>
<userControl:Avatar DisplayName="{Binding DisplayName}" Link="{Binding Link}" Source="{Binding AvatarUri}"/>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</hc:Watermark>
</UserControl>
@@ -19,15 +19,15 @@ namespace HandyControlDemo.UserControl
private void ButtonLangs_OnClick(object sender, RoutedEventArgs e)
{
if (e.OriginalSource is Button button && button.Tag is string tag)
if (e.OriginalSource is Button button && button.Tag is string langName)
{
PopupConfig.IsOpen = false;
if (tag.Equals(GlobalData.Config.Lang)) return;
ConfigHelper.Instance.SetLang(tag);
LangProvider.Culture = new CultureInfo(tag);
if (langName.Equals(GlobalData.Config.Lang)) return;
ConfigHelper.Instance.SetLang(langName);
LangProvider.Culture = new CultureInfo(langName);
Messenger.Default.Send<object>(null, "LangUpdated");
GlobalData.Config.Lang = tag;
GlobalData.Config.Lang = langName;
GlobalData.Save();
}
}
@@ -2,13 +2,16 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:userControl="clr-namespace:HandyControlDemo.UserControl"
xmlns:hc="https://handyorg.github.io/handycontrol"
DataContext="{Binding ProjectsView,Source={StaticResource Locator}}"
Background="{DynamicResource SecondaryRegionBrush}">
<ListBox Background="{DynamicResource ProjectDrawingBrush}" ItemContainerStyle="{StaticResource ListBoxItemCustom}" BorderThickness="0" ItemsSource="{Binding DataList}" ItemsPanel="{StaticResource FluidMoveBehaviorWrapPanelItemsPanelTemplate}">
<ListBox.ItemTemplate>
<DataTemplate>
<userControl:Avatar DisplayName="{Binding DisplayName}" Link="{Binding Link}" Source="{Binding AvatarUri}"/>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<hc:Watermark Mark="Project" FontSize="80" MarkMargin="30,0">
<ListBox Background="Transparent" ItemContainerStyle="{StaticResource ListBoxItemCustom}" BorderThickness="0" ItemsSource="{Binding DataList}" ItemsPanel="{StaticResource FluidMoveBehaviorWrapPanelItemsPanelTemplate}">
<ListBox.ItemTemplate>
<DataTemplate>
<userControl:Avatar DisplayName="{Binding DisplayName}" Link="{Binding Link}" Source="{Binding AvatarUri}"/>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</hc:Watermark>
</UserControl>
@@ -3,7 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:hc="https://handyorg.github.io/handycontrol"
Background="{DynamicResource SecondaryRegionBrush}">
<Border Background="{DynamicResource QqDrawingBrush}">
<hc:Watermark Mark="{StaticResource QqGeometry}" MarkWidth="200" MarkHeight="200" MarkMargin="30">
<WrapPanel HorizontalAlignment="Center" VerticalAlignment="Center" hc:PanelElement.FluidMoveBehavior="{StaticResource BehaviorXY200}">
<Border Margin="16" Height="274" Effect="{StaticResource EffectShadow5}" Width="200" CornerRadius="10">
<Border.Background>
@@ -16,5 +16,5 @@
</Border.Background>
</Border>
</WrapPanel>
</Border>
</hc:Watermark>
</UserControl>
@@ -2,13 +2,16 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:userControl="clr-namespace:HandyControlDemo.UserControl"
xmlns:hc="https://handyorg.github.io/handycontrol"
DataContext="{Binding WebsitesView,Source={StaticResource Locator}}"
Background="{DynamicResource SecondaryRegionBrush}">
<ListBox Background="{DynamicResource WebsiteDrawingBrush}" ItemContainerStyle="{StaticResource ListBoxItemCustom}" BorderThickness="0" ItemsSource="{Binding DataList}" ItemsPanel="{StaticResource FluidMoveBehaviorWrapPanelItemsPanelTemplate}">
<ListBox.ItemTemplate>
<DataTemplate>
<userControl:Avatar DisplayName="{Binding DisplayName}" Link="{Binding Link}" Source="{Binding AvatarUri}"/>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<hc:Watermark Mark="Website" FontSize="80" MarkMargin="30,0">
<ListBox Background="Transparent" ItemContainerStyle="{StaticResource ListBoxItemCustom}" BorderThickness="0" ItemsSource="{Binding DataList}" ItemsPanel="{StaticResource FluidMoveBehaviorWrapPanelItemsPanelTemplate}">
<ListBox.ItemTemplate>
<DataTemplate>
<userControl:Avatar DisplayName="{Binding DisplayName}" Link="{Binding Link}" Source="{Binding AvatarUri}"/>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</hc:Watermark>
</UserControl>