电话应用绑定页面布局修改
This commit is contained in:
parent
633963be44
commit
b00eacd2ca
@ -9,7 +9,66 @@
|
|||||||
xmlns:model="using:WinUINotes.Model"
|
xmlns:model="using:WinUINotes.Model"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
|
|
||||||
<Grid Padding="20">
|
<SplitView x:Name="splitView" PaneBackground="{ThemeResource SystemControlBackgroundChromeMediumLowBrush}"
|
||||||
|
IsPaneOpen="True" OpenPaneLength="256" CompactPaneLength="48" DisplayMode="Inline">
|
||||||
|
<SplitView.Pane>
|
||||||
|
<Grid Margin="10, 0, 10, 0">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<TextBlock Text="已保存项目" x:Name="PaneHeader" Margin="0,12,0,5" Style="{StaticResource BaseTextBlockStyle}"/>
|
||||||
|
<Button Grid.Row="1" Content="新增项目" Click="AddNewProjectButton_Click" HorizontalAlignment="Left" Margin="0,5,0,5"/>
|
||||||
|
|
||||||
|
<TextBox x:Name="FilterTextBox" Grid.Row="2" PlaceholderText="此输入框暂时不提供过滤功能" Margin="0,5,0,10"/>
|
||||||
|
|
||||||
|
<ListView x:Name="ProjectListView" Grid.Row="3" ItemsSource="{x:Bind PhoneAppItems}"
|
||||||
|
SelectionMode="Single" ShowsScrollingPlaceholders="True"
|
||||||
|
BorderBrush="{ThemeResource SystemControlForegroundBaseMediumBrush}"
|
||||||
|
Margin="0,0,0,10"
|
||||||
|
SelectionChanged="ProjectListView_SelectionChanged">
|
||||||
|
<ListView.ItemTemplate>
|
||||||
|
<DataTemplate x:DataType="model:PhoneAppItem">
|
||||||
|
<StackPanel Margin="0,5">
|
||||||
|
<TextBlock FontWeight="SemiBold" FontSize="14">
|
||||||
|
<Run Text="应用程序名称: "/>
|
||||||
|
<Run Text="{x:Bind AppName}"/>
|
||||||
|
</TextBlock>
|
||||||
|
<TextBlock FontSize="12">
|
||||||
|
<Run Text="关联网站: "/>
|
||||||
|
<Run Text="{x:Bind AppUrlsDisplayString}"/>
|
||||||
|
</TextBlock>
|
||||||
|
</StackPanel>
|
||||||
|
</DataTemplate>
|
||||||
|
</ListView.ItemTemplate>
|
||||||
|
</ListView>
|
||||||
|
</Grid>
|
||||||
|
</SplitView.Pane>
|
||||||
|
|
||||||
|
<StackPanel Margin="5, 0, 0, 0" Padding="20" BorderBrush="{ThemeResource SystemControlForegroundBaseMediumBrush}">
|
||||||
|
<TextBlock Text="应用程序名称:" FontSize="16" FontWeight="SemiBold" Margin="0,0,0,5"/>
|
||||||
|
<TextBox x:Name="AppNameInputTextBox" PlaceholderText="请输入应用程序名称" HorizontalAlignment="Stretch" Margin="0,0,0,10" IsReadOnly="True" />
|
||||||
|
|
||||||
|
<StackPanel Orientation="Horizontal" Margin="0,0,0,10">
|
||||||
|
<TextBlock Text="网站列表:" FontSize="16" FontWeight="SemiBold" VerticalAlignment="Center"/>
|
||||||
|
<Button Content="添加网站" Click="AddWebsiteButton_Click" Margin="10,0,0,0" IsEnabled="False"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<ScrollViewer VerticalScrollMode="Auto" VerticalScrollBarVisibility="Auto" Height="Auto" MaxHeight="200" Margin="0,0,0,20">
|
||||||
|
<StackPanel x:Name="WebsitesStackPanel" Spacing="10"/>
|
||||||
|
</ScrollViewer>
|
||||||
|
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<Button x:Name="SaveProjectButton" Content="保存项目" Click="SaveProjectButton_Click" HorizontalAlignment="Stretch" Margin="0, 0, 5, 0" />
|
||||||
|
<Button x:Name="EditProjectButton" Content="编辑项目" Click="EditProjectButton_Click" HorizontalAlignment="Stretch" />
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
</StackPanel>
|
||||||
|
</SplitView>
|
||||||
|
|
||||||
|
<!--<Grid Padding="20">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="*"/>
|
<ColumnDefinition Width="*"/>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
@ -28,7 +87,7 @@
|
|||||||
<Button Grid.Row="1" Content="新增项目" Click="AddNewProjectButton_Click" HorizontalAlignment="Left" Margin="0,0,0,5"/>
|
<Button Grid.Row="1" Content="新增项目" Click="AddNewProjectButton_Click" HorizontalAlignment="Left" Margin="0,0,0,5"/>
|
||||||
|
|
||||||
<TextBox x:Name="FilterTextBox" Grid.Row="2" PlaceholderText="此输入框暂时不提供过滤功能" Margin="0,5,0,10"/>
|
<TextBox x:Name="FilterTextBox" Grid.Row="2" PlaceholderText="此输入框暂时不提供过滤功能" Margin="0,5,0,10"/>
|
||||||
|
calScrol
|
||||||
<ListView x:Name="ProjectListView" Grid.Row="3" ItemsSource="{x:Bind PhoneAppItems}"
|
<ListView x:Name="ProjectListView" Grid.Row="3" ItemsSource="{x:Bind PhoneAppItems}"
|
||||||
SelectionMode="Single" ShowsScrollingPlaceholders="True"
|
SelectionMode="Single" ShowsScrollingPlaceholders="True"
|
||||||
BorderBrush="{ThemeResource SystemControlForegroundBaseMediumBrush}" BorderThickness="1"
|
BorderBrush="{ThemeResource SystemControlForegroundBaseMediumBrush}" BorderThickness="1"
|
||||||
@ -71,5 +130,5 @@
|
|||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>-->
|
||||||
</Page>
|
</Page>
|
||||||
|
|||||||
@ -13,6 +13,7 @@ using System.Linq;
|
|||||||
using System.Runtime.InteropServices.WindowsRuntime;
|
using System.Runtime.InteropServices.WindowsRuntime;
|
||||||
using Windows.Foundation;
|
using Windows.Foundation;
|
||||||
using Windows.Foundation.Collections;
|
using Windows.Foundation.Collections;
|
||||||
|
using Microsoft.UI.Composition;
|
||||||
using WinUINotes.Model;
|
using WinUINotes.Model;
|
||||||
|
|
||||||
// To learn more about WinUI, the WinUI project structure,
|
// To learn more about WinUI, the WinUI project structure,
|
||||||
@ -32,6 +33,10 @@ public sealed partial class PhoneAppBinderPage : Page
|
|||||||
// 声明一个 ObservableCollection 来存储项目数据,并绑定到 ListView
|
// 声明一个 ObservableCollection 来存储项目数据,并绑定到 ListView
|
||||||
public ObservableCollection<PhoneAppItem> PhoneAppItems { get; set; } = [];
|
public ObservableCollection<PhoneAppItem> PhoneAppItems { get; set; } = [];
|
||||||
|
|
||||||
|
Compositor _compositor = CompositionTarget.GetCompositorForCurrentThread();
|
||||||
|
SpringVector3NaturalMotionAnimation _springAnimation;
|
||||||
|
|
||||||
|
|
||||||
public PhoneAppBinderPage()
|
public PhoneAppBinderPage()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user