2023-06-05 08:42:20 +00:00
|
|
|
<pu:WindowX x:Class="VPet_Simulator.Windows.winBetterBuy"
|
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
|
xmlns:pu="https://opensource.panuon.com/wpf-ui"
|
|
|
|
xmlns:local="clr-namespace:VPet_Simulator.Windows"
|
|
|
|
mc:Ignorable="d"
|
|
|
|
Title="winBetterBuy"
|
|
|
|
Height="450"
|
|
|
|
Width="800"
|
|
|
|
FontSize="14"
|
|
|
|
WindowStartupLocation="CenterScreen"
|
|
|
|
Background="#E0F6FF"
|
|
|
|
pu:WindowXCaption.Height="45"
|
|
|
|
pu:WindowXCaption.Background="{DynamicResource DARKPrimary}"
|
|
|
|
pu:WindowXCaption.Foreground="#FFFFFF"
|
|
|
|
pu:WindowXCaption.Buttons="Close"
|
|
|
|
pu:WindowXCaption.ShadowColor="{DynamicResource ShadowColor}">
|
|
|
|
<pu:WindowXCaption.CloseButtonStyle>
|
|
|
|
<Style TargetType="Button"
|
|
|
|
BasedOn="{StaticResource {x:Static pu:WindowXCaption.CloseButtonStyleKey}}">
|
|
|
|
<Setter Property="Width"
|
|
|
|
Value="28" />
|
|
|
|
<Setter Property="Height"
|
|
|
|
Value="28" />
|
|
|
|
<Setter Property="Margin"
|
|
|
|
Value="0,0,7,0" />
|
|
|
|
<Setter Property="VerticalAlignment"
|
|
|
|
Value="Center" />
|
|
|
|
<Setter Property="Background"
|
|
|
|
Value="Transparent" />
|
|
|
|
<Setter Property="pu:ButtonHelper.CornerRadius"
|
|
|
|
Value="14" />
|
|
|
|
<Setter Property="pu:ButtonHelper.HoverBackground"
|
|
|
|
Value="White" />
|
|
|
|
<Setter Property="pu:ButtonHelper.ClickBackground"
|
|
|
|
Value="{x:Null}" />
|
|
|
|
<Setter Property="pu:ButtonHelper.HoverForeground"
|
|
|
|
Value="{DynamicResource DARKPrimary}" />
|
|
|
|
</Style>
|
|
|
|
</pu:WindowXCaption.CloseButtonStyle>
|
|
|
|
<pu:WindowXCaption.HeaderTemplate>
|
|
|
|
<DataTemplate>
|
|
|
|
<Grid Margin="10,0">
|
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
|
<Button Style="{DynamicResource TextButtonStyle}"
|
|
|
|
Foreground="{DynamicResource DARKPrimaryText}"
|
|
|
|
Content="更好买"
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
FontSize="20"
|
|
|
|
Click="BtnTitle_Click"/>
|
|
|
|
<Grid Grid.Column="1"
|
|
|
|
Margin="15,0,0,0"
|
|
|
|
Width="200">
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition />
|
|
|
|
<ColumnDefinition Width="Auto" />
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<TextBox x:Name="TbTitleSearch"
|
|
|
|
Grid.ColumnSpan="2"
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
Padding="7,0"
|
|
|
|
pu:TextBoxHelper.Watermark="搜索商品"
|
|
|
|
FontSize="14"
|
|
|
|
Background="#33FFFFFF"
|
|
|
|
Height="30"
|
|
|
|
BorderThickness="0"
|
|
|
|
pu:TextBoxHelper.CornerRadius="5"
|
|
|
|
Loaded="TbTitleSearch_Loaded"
|
|
|
|
Foreground="{DynamicResource DARKPrimaryText}" />
|
|
|
|
<Button Grid.Column="1"
|
|
|
|
Margin="0,0,3,0"
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
Height="28"
|
|
|
|
Width="28"
|
|
|
|
IsDefault="{Binding IsKeyboardFocusWithin, ElementName=TbTitleSearch}"
|
|
|
|
BorderThickness="0"
|
|
|
|
pu:ButtonHelper.CornerRadius="0,5,5,0"
|
|
|
|
Background="Transparent"
|
|
|
|
FontFamily="pack://application:,,,/Res/#remixicon"
|
|
|
|
Content=""
|
|
|
|
Padding="0"
|
|
|
|
Foreground="{DynamicResource DARKPrimaryText}"
|
|
|
|
FontSize="16"
|
|
|
|
Cursor="Hand"
|
|
|
|
Click="BtnSearch_Click" />
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
</StackPanel>
|
|
|
|
</Grid>
|
|
|
|
</DataTemplate>
|
|
|
|
</pu:WindowXCaption.HeaderTemplate>
|
|
|
|
<Window.Resources>
|
|
|
|
<local:BoolToIntConverter x:Key="BoolToIntConverter" />
|
|
|
|
<local:DiscountPriceConverter x:Key="DiscountPriceConverter" />
|
|
|
|
|
|
|
|
<DataTemplate x:Key="CommodityDataTemplate">
|
|
|
|
<Grid>
|
|
|
|
<pu:CarouselPanel Grid.Column="1"
|
|
|
|
Animation="Fade,Flow"
|
|
|
|
AnimationDuration="0:0:0.3"
|
|
|
|
CurrentIndex="{Binding IsChecked, Converter={StaticResource BoolToIntConverter}, ElementName=TbtnDetail}">
|
|
|
|
<Border Background="{DynamicResource SecondaryTrans4}"
|
|
|
|
CornerRadius="5">
|
|
|
|
<Grid>
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="Auto" />
|
|
|
|
<ColumnDefinition />
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Border Margin="25,0,0,0"
|
|
|
|
Width="{Binding ActualHeight, ElementName=BdrImage}" />
|
2023-06-05 09:04:25 +00:00
|
|
|
<TextBlock Grid.ColumnSpan="2"
|
|
|
|
Margin="10,7,0,0"
|
2023-06-05 08:42:20 +00:00
|
|
|
FontWeight="Bold"
|
|
|
|
TextTrimming="CharacterEllipsis"
|
2023-06-05 09:04:25 +00:00
|
|
|
FontSize="18"
|
|
|
|
Text="{Binding Name}" />
|
2023-06-05 08:42:20 +00:00
|
|
|
<Grid Grid.Column="1"
|
|
|
|
Margin="0,40,0,10">
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
<RowDefinition />
|
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
<StackPanel Grid.Row="1"
|
|
|
|
Orientation="Horizontal">
|
|
|
|
<TextBlock x:Name="TxtPrice"
|
|
|
|
VerticalAlignment="Bottom"
|
|
|
|
TextDecorations="Strikethrough"
|
|
|
|
Text="{Binding Price, StringFormat='¥ 0.0'}"
|
|
|
|
FontWeight="Bold"
|
|
|
|
FontSize="10"
|
|
|
|
Foreground="{DynamicResource PrimaryText}" />
|
|
|
|
<TextBlock x:Name="TxtDiscountPrice"
|
|
|
|
Margin="5,0,0,0"
|
|
|
|
FontWeight="Bold"
|
|
|
|
FontSize="18"
|
|
|
|
Foreground="{DynamicResource DARKPrimary}">
|
|
|
|
<TextBlock.Text>
|
|
|
|
<MultiBinding Converter="{StaticResource DiscountPriceConverter}">
|
|
|
|
<Binding Path="Price" />
|
|
|
|
<Binding Path="Discount" />
|
|
|
|
</MultiBinding>
|
|
|
|
</TextBlock.Text>
|
|
|
|
</TextBlock>
|
|
|
|
</StackPanel>
|
|
|
|
<Border Grid.Row="3"
|
|
|
|
Margin="0,5,0,0"
|
|
|
|
HorizontalAlignment="Left"
|
|
|
|
Background="{DynamicResource SecondaryTrans}"
|
|
|
|
CornerRadius="2">
|
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
|
<RepeatButton VerticalAlignment="Center"
|
|
|
|
Content="-"
|
|
|
|
Padding="0,0,0,5"
|
|
|
|
Style="{DynamicResource IconInvertedForegroundRepeatButtonStyle}"
|
|
|
|
Click="RbtnDecrease_Click" />
|
|
|
|
<TextBox Grid.Column="1"
|
|
|
|
Cursor="IBeam"
|
|
|
|
Background="#CDFFFFFF"
|
|
|
|
BorderThickness="0"
|
|
|
|
HorizontalContentAlignment="Center"
|
|
|
|
Text="{Binding Quantity}"
|
|
|
|
MinWidth="30" />
|
|
|
|
<RepeatButton Grid.Column="2"
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
Content="+"
|
|
|
|
Padding="0,0,0,5"
|
|
|
|
Style="{DynamicResource IconInvertedForegroundRepeatButtonStyle}"
|
|
|
|
Click="RbtnIncrease_Click" />
|
|
|
|
</StackPanel>
|
|
|
|
</Border>
|
|
|
|
<Button Grid.Row="4"
|
|
|
|
Margin="0,7,0,0"
|
|
|
|
Padding="7,5"
|
|
|
|
Cursor="Hand"
|
|
|
|
HorizontalAlignment="Left"
|
|
|
|
pu:ButtonHelper.Icon=""
|
|
|
|
Style="{DynamicResource ThemedButtonStyle}"
|
|
|
|
Content="购买"
|
|
|
|
Click="BtnBuy_Click" />
|
|
|
|
</Grid>
|
|
|
|
</Grid>
|
|
|
|
</Border>
|
|
|
|
<Border Background="{DynamicResource DARKPrimary}"
|
|
|
|
CornerRadius="5">
|
|
|
|
<Grid>
|
|
|
|
<Grid Grid.Column="1"
|
2023-06-05 08:48:06 +00:00
|
|
|
Margin="10,10,10,0">
|
2023-06-05 08:42:20 +00:00
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
<RowDefinition />
|
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
<TextBlock VerticalAlignment="Center"
|
|
|
|
TextTrimming="CharacterEllipsis"
|
|
|
|
FontSize="16"
|
|
|
|
Foreground="{DynamicResource DARKPrimaryText}"
|
2023-06-05 09:04:32 +00:00
|
|
|
Text="{Binding Name}" />
|
2023-06-05 08:48:06 +00:00
|
|
|
<ScrollViewer Grid.Row="1"
|
|
|
|
Grid.RowSpan="4"
|
|
|
|
Margin="0,7,0,0"
|
|
|
|
pu:ScrollBarHelper.ThumbBackground="#44FFFFFF"
|
|
|
|
pu:ScrollBarHelper.HoverThumbBackground="#88FFFFFF">
|
|
|
|
<TextBlock TextWrapping="Wrap"
|
|
|
|
Background="Transparent"
|
|
|
|
FontSize="12"
|
|
|
|
Padding="0"
|
|
|
|
Foreground="{DynamicResource DARKPrimaryText}"
|
|
|
|
Text="阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴" />
|
|
|
|
</ScrollViewer>
|
2023-06-05 08:42:20 +00:00
|
|
|
</Grid>
|
|
|
|
</Grid>
|
|
|
|
</Border>
|
|
|
|
</pu:CarouselPanel>
|
|
|
|
<Grid>
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="Auto" />
|
|
|
|
<ColumnDefinition />
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Border x:Name="BdrImage"
|
2023-06-05 09:04:25 +00:00
|
|
|
Margin="10,35,0,10"
|
2023-06-05 08:48:06 +00:00
|
|
|
CornerRadius="5"
|
|
|
|
Visibility="{Binding IsChecked,Converter={StaticResource {x:Static pu:ConverterKeys.TrueToCollapseConverter}}, ElementName=TbtnDetail}">
|
2023-06-05 08:42:20 +00:00
|
|
|
<Image Source="{Binding ImageShot}"
|
|
|
|
Stretch="UniformToFill"/>
|
|
|
|
</Border>
|
|
|
|
<ToggleButton x:Name="TbtnDetail"
|
|
|
|
Grid.ColumnSpan="2"
|
|
|
|
Margin="0,5,8,0"
|
|
|
|
HorizontalAlignment="Right"
|
|
|
|
VerticalAlignment="Top"
|
|
|
|
Width="30"
|
|
|
|
Height="30"
|
|
|
|
Padding="0"
|
|
|
|
FontSize="22"
|
|
|
|
Foreground="{DynamicResource PrimaryText}"
|
|
|
|
Background="Transparent"
|
|
|
|
ToolTip="物品详情"
|
|
|
|
pu:ToggleButtonHelper.CornerRadius="5"
|
|
|
|
pu:ToggleButtonHelper.CheckedForeground="{DynamicResource DARKPrimaryText}"
|
|
|
|
pu:IconHelper.Margin="0"
|
|
|
|
FontFamily="/VPet-Simulator.Windows;component/Res/#remixicon"
|
|
|
|
Content="" />
|
|
|
|
</Grid>
|
|
|
|
</Grid>
|
|
|
|
<DataTemplate.Triggers>
|
|
|
|
<DataTrigger Binding="{Binding Discount}"
|
|
|
|
Value="100">
|
|
|
|
<Setter TargetName="TxtPrice"
|
|
|
|
Property="Foreground"
|
|
|
|
Value="{DynamicResource DARKPrimary}" />
|
|
|
|
<Setter TargetName="TxtPrice"
|
|
|
|
Property="FontSize"
|
|
|
|
Value="18" />
|
|
|
|
<Setter TargetName="TxtPrice"
|
|
|
|
Property="TextDecorations"
|
|
|
|
Value="None" />
|
|
|
|
<Setter TargetName="TxtDiscountPrice"
|
|
|
|
Property="Visibility"
|
|
|
|
Value="Collapsed" />
|
|
|
|
</DataTrigger>
|
|
|
|
</DataTemplate.Triggers>
|
|
|
|
</DataTemplate>
|
|
|
|
</Window.Resources>
|
2023-06-01 14:50:40 +00:00
|
|
|
<Grid>
|
2023-06-05 08:42:20 +00:00
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="200" />
|
|
|
|
<ColumnDefinition />
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Border Background="{DynamicResource DARKPrimaryText}" />
|
|
|
|
<Grid Margin="12, 10">
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
<RowDefinition />
|
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
<TextBlock Text="商品分类"
|
|
|
|
FontSize="18"
|
|
|
|
Foreground="{DynamicResource DARKPrimary}" />
|
|
|
|
<ListBox x:Name="LsbCategory"
|
|
|
|
Grid.Row="1"
|
|
|
|
Margin="-12,10,-12,0"
|
|
|
|
Background="Transparent"
|
|
|
|
BorderThickness="0"
|
|
|
|
SelectedIndex="0"
|
|
|
|
pu:ListBoxHelper.ItemsPadding="15,8"
|
|
|
|
pu:ListBoxHelper.ItemsSelectedBackground="{DynamicResource DARKPrimary}"
|
|
|
|
pu:ListBoxHelper.ItemsSelectedForeground="{DynamicResource DARKPrimaryText}">
|
|
|
|
<ListBoxItem Content="食物" />
|
|
|
|
<ListBoxItem Content="饮料" />
|
|
|
|
<ListBoxItem Content="药品" />
|
|
|
|
<ListBoxItem Content="收藏" />
|
|
|
|
</ListBox>
|
|
|
|
<TextBlock Grid.Row="2"
|
|
|
|
Text="排序方式"
|
|
|
|
FontSize="18"
|
|
|
|
Foreground="{DynamicResource DARKPrimary}" />
|
|
|
|
<Border Grid.Row="3"
|
|
|
|
Margin="0,10,0,0"
|
|
|
|
MinHeight="100"
|
|
|
|
CornerRadius="5">
|
|
|
|
<Grid VerticalAlignment="Top">
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition />
|
|
|
|
<ColumnDefinition Width="Auto" />
|
|
|
|
<ColumnDefinition Width="Auto" />
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<ListBox x:Name="LsbSortRule" Background="Transparent"
|
|
|
|
BorderThickness="0"
|
|
|
|
pu:ListBoxHelper.ItemsPadding="10,5"
|
|
|
|
pu:ListBoxHelper.ItemsCornerRadius="4"
|
|
|
|
pu:ListBoxHelper.ItemsSelectedBackground="{DynamicResource DARKPrimary}"
|
|
|
|
pu:ListBoxHelper.ItemsSelectedForeground="{DynamicResource DARKPrimaryText}"
|
|
|
|
SelectedIndex="0">
|
|
|
|
<ListBoxItem Content="按价格" />
|
|
|
|
<ListBoxItem Content="按体力" />
|
|
|
|
<ListBoxItem Content="按心情" />
|
|
|
|
</ListBox>
|
|
|
|
<Rectangle Grid.Column="1"
|
|
|
|
Margin="10,0,10,0"
|
|
|
|
Width="1"
|
|
|
|
Fill="{DynamicResource DARKPrimaryTrans4}" />
|
|
|
|
<ListBox x:Name="LsbSortAsc"
|
|
|
|
Grid.Column="2"
|
|
|
|
Background="Transparent"
|
|
|
|
BorderThickness="0"
|
|
|
|
pu:ListBoxHelper.ItemsPadding="10,5"
|
|
|
|
pu:ListBoxHelper.ItemsCornerRadius="4"
|
|
|
|
pu:ListBoxHelper.ItemsSelectedBackground="{DynamicResource DARKPrimary}"
|
|
|
|
pu:ListBoxHelper.ItemsSelectedForeground="{DynamicResource DARKPrimaryText}"
|
|
|
|
SelectedIndex="0">
|
|
|
|
<ListBoxItem Content="升序" />
|
|
|
|
<ListBoxItem Content="降序" />
|
|
|
|
</ListBox>
|
|
|
|
</Grid>
|
|
|
|
</Border>
|
|
|
|
</Grid>
|
|
|
|
<Grid Margin="10"
|
|
|
|
Grid.Column="1">
|
|
|
|
<ScrollViewer>
|
|
|
|
<ItemsControl x:Name="IcCommodity"
|
|
|
|
VerticalAlignment="Top">
|
|
|
|
<ItemsControl.ItemsPanel>
|
|
|
|
<ItemsPanelTemplate>
|
|
|
|
<local:AutoUniformGrid ItemsMinWidth="250" />
|
|
|
|
</ItemsPanelTemplate>
|
|
|
|
</ItemsControl.ItemsPanel>
|
|
|
|
<ItemsControl.ItemTemplate>
|
|
|
|
<DataTemplate>
|
|
|
|
<ContentControl Height="140"
|
|
|
|
Margin="0,0,10,10"
|
|
|
|
Content="{Binding}"
|
|
|
|
ContentTemplate="{StaticResource CommodityDataTemplate}" />
|
|
|
|
</DataTemplate>
|
|
|
|
</ItemsControl.ItemTemplate>
|
|
|
|
</ItemsControl>
|
|
|
|
</ScrollViewer>
|
|
|
|
</Grid>
|
2023-06-01 14:50:40 +00:00
|
|
|
</Grid>
|
2023-06-05 08:42:20 +00:00
|
|
|
</pu:WindowX>
|