add ImageAttach

This commit is contained in:
NaBian committed 2020-06-06 23:23:40 +08:00
1 parent 8e34fc1d29
commit d9959fab38
21 files changed
+131 -50

No files matched your search

@@ -5,7 +5,7 @@
xmlns:hc="https://handyorg.github.io/handycontrol"
DataContext="{Binding BlogsView,Source={StaticResource Locator}}"
Background="{DynamicResource SecondaryRegionBrush}">
<hc:Watermark Mark="Blog" FontSize="80" MarkMargin="30,0">
<hc:Watermark Mark="Blog" FontSize="80" FontWeight="Bold" MarkMargin="30,0">
<ListBox Background="Transparent" ItemContainerStyle="{StaticResource ListBoxItemCustom}" BorderThickness="0" ItemsSource="{Binding DataList}" ItemsPanel="{StaticResource FluidMoveBehaviorWrapPanelItemsPanelTemplate}">
<ListBox.ItemTemplate>
<DataTemplate>
@@ -5,13 +5,20 @@
xmlns:hc="https://handyorg.github.io/handycontrol"
DataContext="{Binding ContributorsView,Source={StaticResource Locator}}"
Background="{DynamicResource SecondaryRegionBrush}">
<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 FontWeight="Bold" Mark="{StaticResource GitHubStrGeometry}" MarkMargin="30,0" MarkWidth="200" MarkHeight="100">
<hc:ToggleBlock IsChecked="{Binding DataGot}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
<hc:ToggleBlock.UnCheckedContent>
<hc:LoadingCircle IsRunning="{Binding DataGot,Converter={StaticResource Boolean2BooleanReConverter}}"/>
</hc:ToggleBlock.UnCheckedContent>
<hc:ToggleBlock.CheckedContent>
<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:ToggleBlock.CheckedContent>
</hc:ToggleBlock>
</hc:Watermark>
</UserControl>
@@ -6,7 +6,7 @@
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
Margin="16"
Margin="16,16,0,16"
CornerRadius="10"
Effect="{StaticResource EffectShadow4}">
<Border.Resources>
@@ -2,23 +2,28 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:hc="https://handyorg.github.io/handycontrol"
x:Class="HandyControlDemo.UserControl.MainContent">
<Grid Name="GridMain" MinHeight="300" MinWidth="200" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="16">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Border Name="BorderEffect" Grid.RowSpan="2" Background="{DynamicResource RegionBrush}" CornerRadius="10" Effect="{StaticResource EffectShadow4}"/>
<Border Height="32" Name="BorderTitle" Grid.Row="0" CornerRadius="10,10,0,0" Background="{DynamicResource TitleBrush}">
<hc:SimplePanel>
<TextBlock Style="{StaticResource TextBlockDefault}" Foreground="White" Text="{Binding ContentTitle}"/>
<ToggleButton Margin="0,0,6,0" IsChecked="{Binding IsOpen,ElementName=DrawerCode}" Padding="5" Foreground="{DynamicResource TextIconBrush}" Style="{StaticResource ToggleButtonIconTransparent}" HorizontalAlignment="Right" hc:IconElement.Geometry="{StaticResource CodeGeometry}"/>
<hc:Drawer Name="DrawerCode" Opened="DrawerCode_OnOpened">
<Border Style="{StaticResource BorderClip}" Margin="32,32,0,32" CornerRadius="10,0,0,10" Background="{DynamicResource RegionBrush}" Width="800" Name="BorderCode"/>
</hc:Drawer>
</hc:SimplePanel>
<hc:SimplePanel>
<Border Name="BorderRootEffect" Background="{DynamicResource RegionBrush}" CornerRadius="10" Effect="{StaticResource EffectShadow4}" Margin="16" Visibility="Collapsed"/>
<Border Name="BorderRoot" Style="{StaticResource BorderClip}" Margin="16">
<Grid Name="GridMain" MinHeight="300" MinWidth="200" HorizontalAlignment="Center" VerticalAlignment="Center">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Border Name="BorderEffect" Grid.RowSpan="2" Background="{DynamicResource RegionBrush}" CornerRadius="10" Effect="{StaticResource EffectShadow4}"/>
<Border Height="32" Name="BorderTitle" Grid.Row="0" CornerRadius="10,10,0,0" Background="{DynamicResource TitleBrush}">
<hc:SimplePanel>
<TextBlock Style="{StaticResource TextBlockDefault}" Foreground="White" Text="{Binding ContentTitle}"/>
<ToggleButton Margin="0,0,6,0" IsChecked="{Binding IsOpen,ElementName=DrawerCode}" Padding="5" Foreground="{DynamicResource TextIconBrush}" Style="{StaticResource ToggleButtonIconTransparent}" HorizontalAlignment="Right" hc:IconElement.Geometry="{StaticResource CodeGeometry}"/>
<hc:Drawer Name="DrawerCode" Opened="DrawerCode_OnOpened">
<Border Style="{StaticResource BorderClip}" Margin="32,32,0,32" CornerRadius="10,0,0,10" Background="{DynamicResource RegionBrush}" Width="800" Name="BorderCode"/>
</hc:Drawer>
</hc:SimplePanel>
</Border>
<Border Grid.Row="1" ClipToBounds="True">
<ContentPresenter Name="PresenterMain" Margin="0,0,0,10" Content="{Binding SubContent}"/>
</Border>
</Grid>
</Border>
<Border Grid.Row="1" ClipToBounds="True">
<ContentPresenter Name="PresenterMain" Margin="0,0,0,10" Content="{Binding SubContent}"/>
</Border>
</Grid>
</hc:SimplePanel>
</Border>
@@ -38,21 +38,25 @@ namespace HandyControlDemo.UserControl
_isFull = isFull;
if (_isFull)
{
BorderRootEffect.Show();
BorderEffect.Collapse();
BorderTitle.Collapse();
GridMain.HorizontalAlignment = HorizontalAlignment.Stretch;
GridMain.VerticalAlignment = VerticalAlignment.Stretch;
GridMain.Margin = new Thickness();
PresenterMain.Margin = new Thickness();
BorderRoot.CornerRadius = new CornerRadius(10);
BorderRoot.Style = ResourceHelper.GetResource<Style>("BorderClip");
}
else
{
BorderRootEffect.Collapse();
BorderEffect.Show();
BorderTitle.Show();
GridMain.HorizontalAlignment = HorizontalAlignment.Center;
GridMain.VerticalAlignment = VerticalAlignment.Center;
GridMain.Margin = new Thickness(16);
PresenterMain.Margin = new Thickness(0, 0, 0, 10);
BorderRoot.CornerRadius = new CornerRadius();
BorderRoot.Style = null;
}
}
@@ -3,6 +3,8 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008">
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:userControl="clr-namespace:HandyControlDemo.UserControl"
Background="{DynamicResource SecondaryRegionBrush}">
<userControl:UnderConstruction VerticalAlignment="Center" HorizontalAlignment="Center"/>
</UserControl>
@@ -5,7 +5,7 @@
xmlns:hc="https://handyorg.github.io/handycontrol"
DataContext="{Binding ProjectsView,Source={StaticResource Locator}}"
Background="{DynamicResource SecondaryRegionBrush}">
<hc:Watermark Mark="Project" FontSize="80" MarkMargin="30,0">
<hc:Watermark Mark="Project" FontSize="80" FontWeight="Bold" MarkMargin="30,0">
<ListBox Background="Transparent" ItemContainerStyle="{StaticResource ListBoxItemCustom}" BorderThickness="0" ItemsSource="{Binding DataList}" ItemsPanel="{StaticResource FluidMoveBehaviorWrapPanelItemsPanelTemplate}">
<ListBox.ItemTemplate>
<DataTemplate>
@@ -5,7 +5,7 @@
xmlns:hc="https://handyorg.github.io/handycontrol"
DataContext="{Binding WebsitesView,Source={StaticResource Locator}}"
Background="{DynamicResource SecondaryRegionBrush}">
<hc:Watermark Mark="Website" FontSize="80" MarkMargin="30,0">
<hc:Watermark Mark="Website" FontSize="80" FontWeight="Bold" MarkMargin="30,0">
<ListBox Background="Transparent" ItemContainerStyle="{StaticResource ListBoxItemCustom}" BorderThickness="0" ItemsSource="{Binding DataList}" ItemsPanel="{StaticResource FluidMoveBehaviorWrapPanelItemsPanelTemplate}">
<ListBox.ItemTemplate>
<DataTemplate>