This repository has been archived by the owner on Dec 19, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
/
CreateFeed.xaml
69 lines (64 loc) · 3.87 KB
/
CreateFeed.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<Page
x:Class="Coolapk_UWP.Pages.CreateFeed"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Coolapk_UWP.Pages"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:controls="using:Coolapk_UWP.Controls"
xmlns:controls1="using:Microsoft.Toolkit.Uwp.UI.Controls"
xmlns:viewmodels="using:Coolapk_UWP.ViewModels"
mc:Ignorable="d"
NavigationCacheMode="Required"
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
muxc:BackdropMaterial.ApplyToRootOrPageBackground="True">
<Page.DataContext>
<viewmodels:CreateFeedViewModel x:Name="ViewModel" />
</Page.DataContext>
<RelativePanel>
<ScrollViewer
RelativePanel.AlignLeftWithPanel="True"
RelativePanel.AlignRightWithPanel="True"
RelativePanel.AlignTopWithPanel="True"
RelativePanel.AlignBottomWithPanel="True"
HorizontalAlignment="Stretch">
<StackPanel HorizontalAlignment="Stretch" Orientation="Vertical">
<Border Tapped="CoverButton_Tapped" Background="{ThemeResource SystemControlAcrylicWindowBrush}">
<RelativePanel x:Name="CoverPanel">
<Viewbox Stretch="Uniform" >
<controls1:ImageEx Source="{x:Bind ViewModel.Cover, Mode=OneWay}" Width="720" Height="324" Stretch="UniformToFill" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Padding="{x:Bind ViewModel.AppBarHeight}" Visibility="{x:Bind ViewModel.ShowCoverHint, Mode=OneWay}"/>
</Viewbox>
<TextBlock Foreground="{ThemeResource SystemChromeGrayColor}" Style="{ThemeResource TitleTextBlockStyle}" RelativePanel.AlignHorizontalCenterWithPanel="True" RelativePanel.AlignVerticalCenterWithPanel="True">
点击添加或更改题图
</TextBlock>
<FlyoutBase.AttachedFlyout>
<Flyout Placement="Full">
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<Grid.RowDefinitions>
<RowDefinition Height="660"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<controls1:ImageCropper AspectRatio="2.2222222" x:Name="CoverCropper" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Row="0"/>
<StackPanel HorizontalAlignment="Right" VerticalAlignment="Center" Grid.Row="1" x:Name="SaveCoverCropperBtnPanel"/>
</Grid>
</Flyout>
</FlyoutBase.AttachedFlyout>
</RelativePanel>
</Border>
<TextBox Margin="0,12,0,12" x:Name="TitleBox" PlaceholderText="标题" HorizontalAlignment="Center" Width="600"/>
<Border HorizontalAlignment="Stretch" BorderBrush="{ThemeResource AppBarBorderThemeBrush}" BorderThickness="1"/>
<controls:PicTextEditor x:Name="MPicTextEditor"/>
</StackPanel>
</ScrollViewer>
<CommandBar
RelativePanel.AlignBottomWithPanel="True"
RelativePanel.AlignLeftWithPanel="True"
RelativePanel.AlignRightWithPanel="True"
DefaultLabelPosition="Bottom">
<AppBarButton
Label="插入图片" Icon="BrowsePhotos" Tapped="InsertImageButton_Tapped"/>
<AppBarButton
Label="测试" Icon="Send" Tapped="TestButton_Tapped"/>
</CommandBar>
</RelativePanel>
</Page>