mirror of
https://github.com/LorisYounger/VPet.ModMaker.git
synced 2024-08-30 18:22:21 +00:00
更新
This commit is contained in:
parent
0122ba8f5e
commit
2d72f2d46f
@ -2,6 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Imaging;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@ -196,4 +197,9 @@ public static class Extensions
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static string GetFullInfo(this CultureInfo cultureInfo)
|
||||
{
|
||||
return $"{cultureInfo.DisplayName} [{cultureInfo.Name}]";
|
||||
}
|
||||
}
|
||||
|
@ -13,6 +13,28 @@
|
||||
<Setter Property="Margin" Value="10" />
|
||||
<Setter Property="pu:ButtonHelper.CornerRadius" Value="24" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="Button_HiddenOnTagNull"
|
||||
BasedOn="{StaticResource ThemedButtonStyle}"
|
||||
TargetType="Button">
|
||||
<Setter Property="Visibility" Value="Hidden" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding Tag, RelativeSource={RelativeSource Mode=Self}}" Value="{x:Null}">
|
||||
<Setter Property="Visibility" Value="Visible" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="Button_CollapsedOnTagNull"
|
||||
BasedOn="{StaticResource ThemedButtonStyle}"
|
||||
TargetType="Button">
|
||||
<Setter Property="Visibility" Value="Collapsed" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding Tag, RelativeSource={RelativeSource Mode=Self}}" Value="{x:Null}">
|
||||
<Setter Property="Visibility" Value="Visible" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="TextBlock_Wrap"
|
||||
BasedOn="{StaticResource {x:Type TextBlock}}"
|
||||
|
@ -172,15 +172,20 @@
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Command="{Binding StopCommand}" Content="{ll:Str 停止}" />
|
||||
<Button
|
||||
Command="{Binding StopCommand}"
|
||||
Content="{ll:Str 停止}"
|
||||
Style="{DynamicResource ThemedButtonStyle}" />
|
||||
<Button
|
||||
Grid.Column="1"
|
||||
Command="{Binding PlayCommand}"
|
||||
Content="{ll:Str 播放}" />
|
||||
Content="{ll:Str 播放}"
|
||||
Style="{DynamicResource ThemedButtonStyle}" />
|
||||
<ToggleButton
|
||||
Grid.Column="2"
|
||||
Content="{ll:Str 循环}"
|
||||
IsChecked="{Binding Loop.Value}" />
|
||||
IsChecked="{Binding Loop.Value}"
|
||||
Style="{DynamicResource StndardToggleButtonStyle}" />
|
||||
</Grid>
|
||||
<Grid Grid.Row="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
|
@ -15,334 +15,372 @@
|
||||
WindowStartupLocation="CenterScreen"
|
||||
mc:Ignorable="d">
|
||||
<Window.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="/VPet-Simulator.Windows.Interface;component/ResourceStyle.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<Style x:Key="ListBoxItem_Style" BasedOn="{StaticResource {x:Type ListBoxItem}}" TargetType="ListBoxItem">
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Stretch" />
|
||||
</Style>
|
||||
<DataTemplate x:Key="Expander_AnimeItem" DataType="Expander">
|
||||
<Expander HorizontalAlignment="Stretch" VerticalAlignment="Top" d:DataContext="">
|
||||
<Expander.Header>
|
||||
<Grid
|
||||
Tag="{Binding DataContext, RelativeSource={RelativeSource AncestorType=Window, Mode=FindAncestor}}">
|
||||
<Grid.ContextMenu>
|
||||
<ContextMenu d:DataContext="">
|
||||
<MenuItem d:Header="添加图片"
|
||||
Command="{Binding PlacementTarget.Tag.RemoveAnimeCommand, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}"
|
||||
CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}"
|
||||
Header="{ll:Str 删除此动画}"
|
||||
IsEnabled="{Binding PlacementTarget.Tag.PlayCommand.CurrentCanExecute.Value, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}" />
|
||||
</ContextMenu>
|
||||
</Grid.ContextMenu>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Margin="10,0,10,0">
|
||||
<TextBlock.Text>
|
||||
<MultiBinding Converter="{StaticResource StringFormatConverter}"
|
||||
ConverterParameter="{}({0}, {1}, {2})">
|
||||
<Binding Path="FrontImages.Count" />
|
||||
<Binding Path="BackImages.Count" />
|
||||
<Binding Path="FoodLocations.Count" />
|
||||
</MultiBinding>
|
||||
</TextBlock.Text>
|
||||
</TextBlock>
|
||||
<!--<TextBox
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="/VPet-Simulator.Windows.Interface;component/ResourceStyle.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<Style
|
||||
x:Key="ListBoxItem_Style"
|
||||
BasedOn="{StaticResource {x:Type ListBoxItem}}"
|
||||
TargetType="ListBoxItem">
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Stretch" />
|
||||
</Style>
|
||||
<DataTemplate x:Key="Expander_AnimeItem" DataType="Expander">
|
||||
<Expander
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Top"
|
||||
d:DataContext="">
|
||||
<Expander.Header>
|
||||
<Grid Tag="{Binding DataContext, RelativeSource={RelativeSource AncestorType=Window, Mode=FindAncestor}}">
|
||||
<Grid.ContextMenu>
|
||||
<ContextMenu d:DataContext="">
|
||||
<MenuItem
|
||||
d:Header="添加图片"
|
||||
Command="{Binding PlacementTarget.Tag.RemoveAnimeCommand, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}"
|
||||
CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}"
|
||||
Header="{ll:Str 删除此动画}"
|
||||
IsEnabled="{Binding PlacementTarget.Tag.PlayCommand.CurrentCanExecute.Value, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}" />
|
||||
</ContextMenu>
|
||||
</Grid.ContextMenu>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Margin="10,0,10,0">
|
||||
<TextBlock.Text>
|
||||
<MultiBinding Converter="{StaticResource StringFormatConverter}" ConverterParameter="{}({0}, {1}, {2})">
|
||||
<Binding Path="FrontImages.Count" />
|
||||
<Binding Path="BackImages.Count" />
|
||||
<Binding Path="FoodLocations.Count" />
|
||||
</MultiBinding>
|
||||
</TextBlock.Text>
|
||||
</TextBlock>
|
||||
<!--<TextBox
|
||||
Grid.Column="1"
|
||||
pu:TextBoxHelper.Watermark="{ll:Str 动画Id(非必要)}"
|
||||
Text="{Binding Id.Value, UpdateSourceTrigger=PropertyChanged}" />-->
|
||||
<!-- pu:TextBoxHelper.Watermark="{ll:Str 动画Id(非必要)}" -->
|
||||
</Grid>
|
||||
</Expander.Header>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<GroupBox>
|
||||
<GroupBox.Header>
|
||||
<StackPanel Orientation="Horizontal"
|
||||
Tag="{Binding DataContext, RelativeSource={RelativeSource AncestorType=Window, Mode=FindAncestor}}">
|
||||
<StackPanel.ContextMenu>
|
||||
<ContextMenu d:DataContext="">
|
||||
<MenuItem d:Header="添加图片"
|
||||
Command="{Binding PlacementTarget.Tag.AddFrontImageCommand, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}"
|
||||
CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}"
|
||||
Header="{ll:Str 添加图片}"
|
||||
IsEnabled="{Binding PlacementTarget.Tag.PlayCommand.CurrentCanExecute.Value, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}" />
|
||||
<MenuItem d:Header="添加图片"
|
||||
Command="{Binding PlacementTarget.Tag.ClearFrontImageCommand, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}"
|
||||
CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}"
|
||||
Header="{ll:Str 清空图片}"
|
||||
IsEnabled="{Binding PlacementTarget.Tag.PlayCommand.CurrentCanExecute.Value, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}" />
|
||||
</ContextMenu>
|
||||
</StackPanel.ContextMenu>
|
||||
<Label d:Content="顶层图片" Content="{ll:Str 顶层图片}" />
|
||||
<TextBlock Margin="10,0,0,0">
|
||||
<TextBlock.Text>
|
||||
<MultiBinding Converter="{StaticResource StringFormatConverter}"
|
||||
ConverterParameter="{}({0})">
|
||||
<Binding Path="FrontImages.Count" />
|
||||
</MultiBinding>
|
||||
</TextBlock.Text>
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
</GroupBox.Header>
|
||||
<ListBox x:Name="ListBox_FrontImages" d:ItemsSource="{d:SampleData ItemCount=5}"
|
||||
AllowDrop="True" Drop="ListBox_Drop"
|
||||
ItemsSource="{Binding FrontImages, IsAsync=True}"
|
||||
PreviewMouseMove="ListBox_PreviewMouseMove"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Auto"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Hidden"
|
||||
SelectedItem="{Binding DataContext.CurrentFrontImageModel.Value, RelativeSource={RelativeSource AncestorType=Window, Mode=FindAncestor}}"
|
||||
SelectionChanged="ListBox_SelectionChanged">
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Horizontal" />
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid
|
||||
DataContext="{Binding DataContext, RelativeSource={RelativeSource AncestorType=Expander, Mode=FindAncestor}}"
|
||||
Tag="{Binding DataContext, RelativeSource={RelativeSource AncestorType=Window, Mode=FindAncestor}}">
|
||||
<Grid.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem d:Header="修改图片"
|
||||
Command="{Binding PlacementTarget.Tag.ChangeFrontImageCommand, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}"
|
||||
CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}"
|
||||
Header="{ll:Str 修改图片}"
|
||||
IsEnabled="{Binding PlacementTarget.Tag.PlayCommand.CurrentCanExecute.Value, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}" />
|
||||
<MenuItem d:Header="删除图片"
|
||||
Command="{Binding PlacementTarget.Tag.RemoveFrontImageCommand, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}"
|
||||
CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}"
|
||||
Header="{ll:Str 删除图片}"
|
||||
IsEnabled="{Binding PlacementTarget.Tag.PlayCommand.CurrentCanExecute.Value, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}" />
|
||||
</ContextMenu>
|
||||
</Grid.ContextMenu>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Image Width="150" Height="150" d:DataContext=""
|
||||
DataContext="{Binding DataContext, RelativeSource={RelativeSource AncestorType=ListBoxItem, Mode=FindAncestor}}"
|
||||
Source="{Binding Image.Value, IsAsync=True}">
|
||||
<Image.ToolTip>
|
||||
<Image Width="250" Height="250"
|
||||
Source="{Binding Image.Value, IsAsync=True}" />
|
||||
</Image.ToolTip>
|
||||
</Image>
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Label d:Content="持续时间(ms)" Content="{ll:Str 持续时间(ms)}" />
|
||||
<pu:NumberInput Grid.Column="1"
|
||||
Value="{Binding DataContext.Duration.Value, RelativeSource={RelativeSource AncestorType=ListBoxItem, Mode=FindAncestor}}" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</GroupBox>
|
||||
<GroupBox Grid.Row="1">
|
||||
<GroupBox.Header>
|
||||
<StackPanel Orientation="Horizontal"
|
||||
Tag="{Binding DataContext, RelativeSource={RelativeSource AncestorType=Window, Mode=FindAncestor}}">
|
||||
<StackPanel.ContextMenu>
|
||||
<ContextMenu d:DataContext="">
|
||||
<MenuItem d:Header="添加图片"
|
||||
Command="{Binding PlacementTarget.Tag.AddBackImageCommand, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}"
|
||||
CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}"
|
||||
Header="{ll:Str 添加图片}"
|
||||
IsEnabled="{Binding PlacementTarget.Tag.PlayCommand.CurrentCanExecute.Value, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}" />
|
||||
<MenuItem d:Header="添加图片"
|
||||
Command="{Binding PlacementTarget.Tag.ClearBackImageCommand, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}"
|
||||
CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}"
|
||||
Header="{ll:Str 清空图片}"
|
||||
IsEnabled="{Binding PlacementTarget.Tag.PlayCommand.CurrentCanExecute.Value, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}" />
|
||||
</ContextMenu>
|
||||
</StackPanel.ContextMenu>
|
||||
<Label d:Content="底层图片" Content="{ll:Str 底层图片}" />
|
||||
<TextBlock Margin="10,0,0,0">
|
||||
<TextBlock.Text>
|
||||
<MultiBinding Converter="{StaticResource StringFormatConverter}"
|
||||
ConverterParameter="{}({0})">
|
||||
<Binding Path="BackImages.Count" />
|
||||
</MultiBinding>
|
||||
</TextBlock.Text>
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
</GroupBox.Header>
|
||||
<ListBox x:Name="ListBox_BackImages" d:ItemsSource="{d:SampleData ItemCount=5}"
|
||||
AllowDrop="True" Drop="ListBox_Drop"
|
||||
ItemsSource="{Binding BackImages, IsAsync=True}"
|
||||
PreviewMouseMove="ListBox_PreviewMouseMove"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Auto"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Hidden"
|
||||
SelectedItem="{Binding DataContext.CurrentBackImageModel.Value, RelativeSource={RelativeSource AncestorType=Window, Mode=FindAncestor}}"
|
||||
SelectionChanged="ListBox_SelectionChanged">
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Horizontal" />
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid
|
||||
DataContext="{Binding DataContext, RelativeSource={RelativeSource AncestorType=Expander, Mode=FindAncestor}}"
|
||||
Tag="{Binding DataContext, RelativeSource={RelativeSource AncestorType=Window, Mode=FindAncestor}}">
|
||||
<Grid.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem d:Header="修改图片"
|
||||
Command="{Binding PlacementTarget.Tag.ChangeBackImageCommand, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}"
|
||||
CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}"
|
||||
Header="{ll:Str 修改图片}"
|
||||
IsEnabled="{Binding PlacementTarget.Tag.PlayCommand.CurrentCanExecute.Value, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}" />
|
||||
<MenuItem d:Header="删除图片"
|
||||
Command="{Binding PlacementTarget.Tag.RemoveBackImageCommand, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}"
|
||||
CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}"
|
||||
Header="{ll:Str 删除图片}"
|
||||
IsEnabled="{Binding PlacementTarget.Tag.PlayCommand.CurrentCanExecute.Value, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}" />
|
||||
</ContextMenu>
|
||||
</Grid.ContextMenu>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Image Width="150" Height="150" d:DataContext=""
|
||||
DataContext="{Binding DataContext, RelativeSource={RelativeSource AncestorType=ListBoxItem, Mode=FindAncestor}}"
|
||||
Source="{Binding Image.Value, IsAsync=True}">
|
||||
<Image.ToolTip>
|
||||
<Image Width="250" Height="250"
|
||||
Source="{Binding Image.Value, IsAsync=True}" />
|
||||
</Image.ToolTip>
|
||||
</Image>
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Label d:Content="持续时间(ms)" Content="{ll:Str 持续时间(ms)}" />
|
||||
<pu:NumberInput Grid.Column="1"
|
||||
Value="{Binding DataContext.Duration.Value, RelativeSource={RelativeSource AncestorType=ListBoxItem, Mode=FindAncestor}}" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</GroupBox>
|
||||
<GroupBox Grid.Row="2">
|
||||
<GroupBox.Header>
|
||||
<StackPanel Orientation="Horizontal"
|
||||
Tag="{Binding DataContext, RelativeSource={RelativeSource AncestorType=Window, Mode=FindAncestor}}">
|
||||
<StackPanel.ContextMenu>
|
||||
<ContextMenu d:DataContext="">
|
||||
<MenuItem d:Header="添加食物定位"
|
||||
Command="{Binding PlacementTarget.Tag.AddFoodLocationCommand, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}"
|
||||
CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}"
|
||||
Header="{ll:Str 添加食物定位}"
|
||||
IsEnabled="{Binding PlacementTarget.Tag.PlayCommand.CurrentCanExecute.Value, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}" />
|
||||
<MenuItem d:Header="清空食物定位"
|
||||
Command="{Binding PlacementTarget.Tag.ClearFoodLocationCommand, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}"
|
||||
CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}"
|
||||
Header="{ll:Str 清空食物定位}"
|
||||
IsEnabled="{Binding PlacementTarget.Tag.PlayCommand.CurrentCanExecute.Value, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}" />
|
||||
</ContextMenu>
|
||||
</StackPanel.ContextMenu>
|
||||
<Label d:Content="食物位置" Content="{ll:Str 食物位置}" />
|
||||
<TextBlock Margin="10,0,0,0">
|
||||
<TextBlock.Text>
|
||||
<MultiBinding Converter="{StaticResource StringFormatConverter}"
|
||||
ConverterParameter="{}({0})">
|
||||
<Binding Path="FoodLocations.Count" />
|
||||
</MultiBinding>
|
||||
</TextBlock.Text>
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
</GroupBox.Header>
|
||||
<ListBox d:ItemsSource="{d:SampleData ItemCount=5}"
|
||||
ItemsSource="{Binding FoodLocations, IsAsync=True}"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Auto"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Hidden"
|
||||
SelectedItem="{Binding DataContext.CurrentFoodLocationModel.Value, RelativeSource={RelativeSource AncestorType=Window, Mode=FindAncestor}}"
|
||||
SelectionChanged="ListBox_SelectionChanged">
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Horizontal" />
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<Grid.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem d:Header="删除食物定位"
|
||||
Command="{Binding PlacementTarget.Tag.RemoveFoodLocationCommand, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}"
|
||||
CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}"
|
||||
Header="{ll:Str 删除食物定位}"
|
||||
IsEnabled="{Binding PlacementTarget.Tag.PlayCommand.CurrentCanExecute.Value, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}" />
|
||||
</ContextMenu>
|
||||
</Grid.ContextMenu>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Label d:Content="持续时间 (ms)" Content="{ll:Str 持续时间 (ms)}" />
|
||||
<pu:NumberInput Grid.Column="1" Value="{Binding Duration.Value}" />
|
||||
<Label Grid.Row="1" d:Content="旋转角度" Content="{ll:Str 旋转角度}" />
|
||||
<pu:NumberInput Grid.Row="1" Grid.Column="1" Value="{Binding Rotate.Value}" />
|
||||
<Label Grid.Row="2" d:Content="透明度" Content="{ll:Str 透明度}" />
|
||||
<pu:NumberInput Grid.Row="2" Grid.Column="1" Value="{Binding Opacity.Value}" />
|
||||
<Label Grid.Row="3" d:Content="长度" Content="{ll:Str 长度}" />
|
||||
<pu:NumberInput Grid.Row="3" Grid.Column="1"
|
||||
Value="{Binding Rect.Width.Value}" />
|
||||
<Grid Grid.Row="4" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Label Content="X:" />
|
||||
<pu:NumberInput Grid.Column="1" Value="{Binding Rect.X.Value}" />
|
||||
</Grid>
|
||||
<Grid Grid.Column="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Label Content="Y:" />
|
||||
<pu:NumberInput Grid.Column="1" Value="{Binding Rect.Y.Value}" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</GroupBox>
|
||||
<!-- pu:TextBoxHelper.Watermark="{ll:Str 动画Id(非必要)}" -->
|
||||
</Grid>
|
||||
</Expander.Header>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<GroupBox>
|
||||
<GroupBox.Header>
|
||||
<StackPanel Orientation="Horizontal" Tag="{Binding DataContext, RelativeSource={RelativeSource AncestorType=Window, Mode=FindAncestor}}">
|
||||
<StackPanel.ContextMenu>
|
||||
<ContextMenu d:DataContext="">
|
||||
<MenuItem
|
||||
d:Header="添加图片"
|
||||
Command="{Binding PlacementTarget.Tag.AddFrontImageCommand, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}"
|
||||
CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}"
|
||||
Header="{ll:Str 添加图片}"
|
||||
IsEnabled="{Binding PlacementTarget.Tag.PlayCommand.CurrentCanExecute.Value, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}" />
|
||||
<MenuItem
|
||||
d:Header="添加图片"
|
||||
Command="{Binding PlacementTarget.Tag.ClearFrontImageCommand, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}"
|
||||
CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}"
|
||||
Header="{ll:Str 清空图片}"
|
||||
IsEnabled="{Binding PlacementTarget.Tag.PlayCommand.CurrentCanExecute.Value, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}" />
|
||||
</ContextMenu>
|
||||
</StackPanel.ContextMenu>
|
||||
<Label d:Content="顶层图片" Content="{ll:Str 顶层图片}" />
|
||||
<TextBlock Margin="10,0,0,0">
|
||||
<TextBlock.Text>
|
||||
<MultiBinding Converter="{StaticResource StringFormatConverter}" ConverterParameter="{}({0})">
|
||||
<Binding Path="FrontImages.Count" />
|
||||
</MultiBinding>
|
||||
</TextBlock.Text>
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
</GroupBox.Header>
|
||||
<ListBox
|
||||
x:Name="ListBox_FrontImages"
|
||||
d:ItemsSource="{d:SampleData ItemCount=5}"
|
||||
AllowDrop="True"
|
||||
Drop="ListBox_Drop"
|
||||
ItemsSource="{Binding FrontImages, IsAsync=True}"
|
||||
PreviewMouseMove="ListBox_PreviewMouseMove"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Auto"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Hidden"
|
||||
SelectedItem="{Binding DataContext.CurrentFrontImageModel.Value, RelativeSource={RelativeSource AncestorType=Window, Mode=FindAncestor}}"
|
||||
SelectionChanged="ListBox_SelectionChanged">
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Horizontal" />
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid DataContext="{Binding DataContext, RelativeSource={RelativeSource AncestorType=Expander, Mode=FindAncestor}}" Tag="{Binding DataContext, RelativeSource={RelativeSource AncestorType=Window, Mode=FindAncestor}}">
|
||||
<Grid.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem
|
||||
d:Header="修改图片"
|
||||
Command="{Binding PlacementTarget.Tag.ChangeFrontImageCommand, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}"
|
||||
CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}"
|
||||
Header="{ll:Str 修改图片}"
|
||||
IsEnabled="{Binding PlacementTarget.Tag.PlayCommand.CurrentCanExecute.Value, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}" />
|
||||
<MenuItem
|
||||
d:Header="删除图片"
|
||||
Command="{Binding PlacementTarget.Tag.RemoveFrontImageCommand, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}"
|
||||
CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}"
|
||||
Header="{ll:Str 删除图片}"
|
||||
IsEnabled="{Binding PlacementTarget.Tag.PlayCommand.CurrentCanExecute.Value, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}" />
|
||||
</ContextMenu>
|
||||
</Grid.ContextMenu>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Image
|
||||
Width="150"
|
||||
Height="150"
|
||||
d:DataContext=""
|
||||
DataContext="{Binding DataContext, RelativeSource={RelativeSource AncestorType=ListBoxItem, Mode=FindAncestor}}"
|
||||
Source="{Binding Image.Value, IsAsync=True}">
|
||||
<Image.ToolTip>
|
||||
<Image
|
||||
Width="250"
|
||||
Height="250"
|
||||
Source="{Binding Image.Value, IsAsync=True}" />
|
||||
</Image.ToolTip>
|
||||
</Image>
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Label d:Content="持续时间(ms)" Content="{ll:Str 持续时间(ms)}" />
|
||||
<pu:NumberInput Grid.Column="1" Value="{Binding DataContext.Duration.Value, RelativeSource={RelativeSource AncestorType=ListBoxItem, Mode=FindAncestor}}" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Expander>
|
||||
</DataTemplate>
|
||||
</ResourceDictionary>
|
||||
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</GroupBox>
|
||||
<GroupBox Grid.Row="1">
|
||||
<GroupBox.Header>
|
||||
<StackPanel Orientation="Horizontal" Tag="{Binding DataContext, RelativeSource={RelativeSource AncestorType=Window, Mode=FindAncestor}}">
|
||||
<StackPanel.ContextMenu>
|
||||
<ContextMenu d:DataContext="">
|
||||
<MenuItem
|
||||
d:Header="添加图片"
|
||||
Command="{Binding PlacementTarget.Tag.AddBackImageCommand, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}"
|
||||
CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}"
|
||||
Header="{ll:Str 添加图片}"
|
||||
IsEnabled="{Binding PlacementTarget.Tag.PlayCommand.CurrentCanExecute.Value, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}" />
|
||||
<MenuItem
|
||||
d:Header="添加图片"
|
||||
Command="{Binding PlacementTarget.Tag.ClearBackImageCommand, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}"
|
||||
CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}"
|
||||
Header="{ll:Str 清空图片}"
|
||||
IsEnabled="{Binding PlacementTarget.Tag.PlayCommand.CurrentCanExecute.Value, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}" />
|
||||
</ContextMenu>
|
||||
</StackPanel.ContextMenu>
|
||||
<Label d:Content="底层图片" Content="{ll:Str 底层图片}" />
|
||||
<TextBlock Margin="10,0,0,0">
|
||||
<TextBlock.Text>
|
||||
<MultiBinding Converter="{StaticResource StringFormatConverter}" ConverterParameter="{}({0})">
|
||||
<Binding Path="BackImages.Count" />
|
||||
</MultiBinding>
|
||||
</TextBlock.Text>
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
</GroupBox.Header>
|
||||
<ListBox
|
||||
x:Name="ListBox_BackImages"
|
||||
d:ItemsSource="{d:SampleData ItemCount=5}"
|
||||
AllowDrop="True"
|
||||
Drop="ListBox_Drop"
|
||||
ItemsSource="{Binding BackImages, IsAsync=True}"
|
||||
PreviewMouseMove="ListBox_PreviewMouseMove"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Auto"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Hidden"
|
||||
SelectedItem="{Binding DataContext.CurrentBackImageModel.Value, RelativeSource={RelativeSource AncestorType=Window, Mode=FindAncestor}}"
|
||||
SelectionChanged="ListBox_SelectionChanged">
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Horizontal" />
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid DataContext="{Binding DataContext, RelativeSource={RelativeSource AncestorType=Expander, Mode=FindAncestor}}" Tag="{Binding DataContext, RelativeSource={RelativeSource AncestorType=Window, Mode=FindAncestor}}">
|
||||
<Grid.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem
|
||||
d:Header="修改图片"
|
||||
Command="{Binding PlacementTarget.Tag.ChangeBackImageCommand, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}"
|
||||
CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}"
|
||||
Header="{ll:Str 修改图片}"
|
||||
IsEnabled="{Binding PlacementTarget.Tag.PlayCommand.CurrentCanExecute.Value, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}" />
|
||||
<MenuItem
|
||||
d:Header="删除图片"
|
||||
Command="{Binding PlacementTarget.Tag.RemoveBackImageCommand, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}"
|
||||
CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}"
|
||||
Header="{ll:Str 删除图片}"
|
||||
IsEnabled="{Binding PlacementTarget.Tag.PlayCommand.CurrentCanExecute.Value, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}" />
|
||||
</ContextMenu>
|
||||
</Grid.ContextMenu>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Image
|
||||
Width="150"
|
||||
Height="150"
|
||||
d:DataContext=""
|
||||
DataContext="{Binding DataContext, RelativeSource={RelativeSource AncestorType=ListBoxItem, Mode=FindAncestor}}"
|
||||
Source="{Binding Image.Value, IsAsync=True}">
|
||||
<Image.ToolTip>
|
||||
<Image
|
||||
Width="250"
|
||||
Height="250"
|
||||
Source="{Binding Image.Value, IsAsync=True}" />
|
||||
</Image.ToolTip>
|
||||
</Image>
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Label d:Content="持续时间(ms)" Content="{ll:Str 持续时间(ms)}" />
|
||||
<pu:NumberInput Grid.Column="1" Value="{Binding DataContext.Duration.Value, RelativeSource={RelativeSource AncestorType=ListBoxItem, Mode=FindAncestor}}" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</GroupBox>
|
||||
<GroupBox Grid.Row="2">
|
||||
<GroupBox.Header>
|
||||
<StackPanel Orientation="Horizontal" Tag="{Binding DataContext, RelativeSource={RelativeSource AncestorType=Window, Mode=FindAncestor}}">
|
||||
<StackPanel.ContextMenu>
|
||||
<ContextMenu d:DataContext="">
|
||||
<MenuItem
|
||||
d:Header="添加食物定位"
|
||||
Command="{Binding PlacementTarget.Tag.AddFoodLocationCommand, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}"
|
||||
CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}"
|
||||
Header="{ll:Str 添加食物定位}"
|
||||
IsEnabled="{Binding PlacementTarget.Tag.PlayCommand.CurrentCanExecute.Value, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}" />
|
||||
<MenuItem
|
||||
d:Header="清空食物定位"
|
||||
Command="{Binding PlacementTarget.Tag.ClearFoodLocationCommand, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}"
|
||||
CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}"
|
||||
Header="{ll:Str 清空食物定位}"
|
||||
IsEnabled="{Binding PlacementTarget.Tag.PlayCommand.CurrentCanExecute.Value, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}" />
|
||||
</ContextMenu>
|
||||
</StackPanel.ContextMenu>
|
||||
<Label d:Content="食物位置" Content="{ll:Str 食物位置}" />
|
||||
<TextBlock Margin="10,0,0,0">
|
||||
<TextBlock.Text>
|
||||
<MultiBinding Converter="{StaticResource StringFormatConverter}" ConverterParameter="{}({0})">
|
||||
<Binding Path="FoodLocations.Count" />
|
||||
</MultiBinding>
|
||||
</TextBlock.Text>
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
</GroupBox.Header>
|
||||
<ListBox
|
||||
d:ItemsSource="{d:SampleData ItemCount=5}"
|
||||
ItemsSource="{Binding FoodLocations, IsAsync=True}"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Auto"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Hidden"
|
||||
SelectedItem="{Binding DataContext.CurrentFoodLocationModel.Value, RelativeSource={RelativeSource AncestorType=Window, Mode=FindAncestor}}"
|
||||
SelectionChanged="ListBox_SelectionChanged">
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Horizontal" />
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<Grid.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem
|
||||
d:Header="删除食物定位"
|
||||
Command="{Binding PlacementTarget.Tag.RemoveFoodLocationCommand, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}"
|
||||
CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}"
|
||||
Header="{ll:Str 删除食物定位}"
|
||||
IsEnabled="{Binding PlacementTarget.Tag.PlayCommand.CurrentCanExecute.Value, RelativeSource={RelativeSource AncestorType=ContextMenu, Mode=FindAncestor}}" />
|
||||
</ContextMenu>
|
||||
</Grid.ContextMenu>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Label d:Content="持续时间 (ms)" Content="{ll:Str 持续时间 (ms)}" />
|
||||
<pu:NumberInput Grid.Column="1" Value="{Binding Duration.Value}" />
|
||||
<Label
|
||||
Grid.Row="1"
|
||||
d:Content="旋转角度"
|
||||
Content="{ll:Str 旋转角度}" />
|
||||
<pu:NumberInput
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Value="{Binding Rotate.Value}" />
|
||||
<Label
|
||||
Grid.Row="2"
|
||||
d:Content="透明度"
|
||||
Content="{ll:Str 透明度}" />
|
||||
<pu:NumberInput
|
||||
Grid.Row="2"
|
||||
Grid.Column="1"
|
||||
Value="{Binding Opacity.Value}" />
|
||||
<Label
|
||||
Grid.Row="3"
|
||||
d:Content="长度"
|
||||
Content="{ll:Str 长度}" />
|
||||
<pu:NumberInput
|
||||
Grid.Row="3"
|
||||
Grid.Column="1"
|
||||
Value="{Binding Rect.Width.Value}" />
|
||||
<Grid Grid.Row="4" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Label Content="X:" />
|
||||
<pu:NumberInput Grid.Column="1" Value="{Binding Rect.X.Value}" />
|
||||
</Grid>
|
||||
<Grid Grid.Column="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Label Content="Y:" />
|
||||
<pu:NumberInput Grid.Column="1" Value="{Binding Rect.Y.Value}" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</GroupBox>
|
||||
</Grid>
|
||||
</Expander>
|
||||
</DataTemplate>
|
||||
</ResourceDictionary>
|
||||
|
||||
</Window.Resources>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
@ -474,15 +512,20 @@
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Command="{Binding StopCommand}" Content="{ll:Str 停止}" />
|
||||
<Button
|
||||
Command="{Binding StopCommand}"
|
||||
Content="{ll:Str 停止}"
|
||||
Style="{DynamicResource ThemedButtonStyle}" />
|
||||
<Button
|
||||
Grid.Column="1"
|
||||
Command="{Binding PlayCommand}"
|
||||
Content="{ll:Str 播放}" />
|
||||
Content="{ll:Str 播放}"
|
||||
Style="{DynamicResource ThemedButtonStyle}" />
|
||||
<ToggleButton
|
||||
Grid.Column="2"
|
||||
Content="{ll:Str 循环}"
|
||||
IsChecked="{Binding Loop.Value}" />
|
||||
IsChecked="{Binding Loop.Value}"
|
||||
Style="{DynamicResource StndardToggleButtonStyle}" />
|
||||
</Grid>
|
||||
<Grid Grid.Row="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
|
@ -11,10 +11,10 @@
|
||||
Width="500"
|
||||
Height="300"
|
||||
mc:Ignorable="d">
|
||||
<Window.Resources>
|
||||
<ResourceDictionary Source="/VPet-Simulator.Windows.Interface;component/ResourceStyle.xaml" />
|
||||
</Window.Resources>
|
||||
<d:Window.DataContext>
|
||||
<Window.Resources>
|
||||
<ResourceDictionary Source="/VPet-Simulator.Windows.Interface;component/ResourceStyle.xaml" />
|
||||
</Window.Resources>
|
||||
<d:Window.DataContext>
|
||||
<local:SelectGraphTypeWindow />
|
||||
</d:Window.DataContext>
|
||||
<Grid>
|
||||
@ -39,7 +39,8 @@
|
||||
<ComboBox
|
||||
Grid.Column="1"
|
||||
ItemsSource="{Binding GraphTypes.Value}"
|
||||
SelectedItem="{Binding GraphType.Value}" />
|
||||
SelectedItem="{Binding GraphType.Value}"
|
||||
Style="{DynamicResource StandardComboBoxStyle}" />
|
||||
<Label
|
||||
Grid.Row="1"
|
||||
Content="{ll:Str 动画名称}"
|
||||
@ -47,6 +48,7 @@
|
||||
<TextBox
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Style="{DynamicResource StandardTextBoxStyle}"
|
||||
Text="{Binding AnimeName.Value, UpdateSourceTrigger=PropertyChanged}"
|
||||
Visibility="{Binding HasNameAnime.Value, Converter={StaticResource FalseToHiddenConverter}}" />
|
||||
</Grid>
|
||||
@ -59,13 +61,15 @@
|
||||
x:Name="Button_Cancel"
|
||||
Margin="10"
|
||||
Click="Button_Cancel_Click"
|
||||
Content="{ll:Str 取消}" />
|
||||
Content="{ll:Str 取消}"
|
||||
Style="{DynamicResource ThemedButtonStyle}" />
|
||||
<Button
|
||||
x:Name="Button_Yes"
|
||||
Grid.Column="1"
|
||||
Margin="10"
|
||||
Click="Button_Yes_Click"
|
||||
Content="{ll:Str 确定}" />
|
||||
Content="{ll:Str 确定}"
|
||||
Style="{DynamicResource ThemedButtonStyle}" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Window>
|
||||
|
@ -14,10 +14,10 @@
|
||||
d:DataContext="{d:DesignInstance Type=vm:ClickTextEditWindowVM}"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
mc:Ignorable="d">
|
||||
<Window.Resources>
|
||||
<ResourceDictionary Source="/VPet-Simulator.Windows.Interface;component/ResourceStyle.xaml" />
|
||||
</Window.Resources>
|
||||
<Grid>
|
||||
<Window.Resources>
|
||||
<ResourceDictionary Source="/VPet-Simulator.Windows.Interface;component/ResourceStyle.xaml" />
|
||||
</Window.Resources>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition MinWidth="300" />
|
||||
<ColumnDefinition Width="Auto" MinWidth="300" />
|
||||
|
@ -14,10 +14,10 @@
|
||||
d:DataContext="{d:DesignInstance Type=vm:FoodEditWindowVM}"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
mc:Ignorable="d">
|
||||
<Window.Resources>
|
||||
<ResourceDictionary Source="/VPet-Simulator.Windows.Interface;component/ResourceStyle.xaml" />
|
||||
</Window.Resources>
|
||||
<Grid>
|
||||
<Window.Resources>
|
||||
<ResourceDictionary Source="/VPet-Simulator.Windows.Interface;component/ResourceStyle.xaml" />
|
||||
</Window.Resources>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="250" />
|
||||
<ColumnDefinition />
|
||||
@ -45,18 +45,9 @@
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Command="{Binding AddImageCommand}"
|
||||
Content="{ll:Str 添加图片}">
|
||||
<Button.Style>
|
||||
<Style BasedOn="{StaticResource {x:Type Button}}" TargetType="Button">
|
||||
<Setter Property="Visibility" Value="Hidden" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding Food.Value.Image.Value}" Value="{x:Null}">
|
||||
<Setter Property="Visibility" Value="Visible" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Button.Style>
|
||||
</Button>
|
||||
Content="{ll:Str 添加图片}"
|
||||
Style="{DynamicResource Button_HiddenOnTagNull}"
|
||||
Tag="{Binding Food.Value.Image.Value}" />
|
||||
</Grid>
|
||||
<ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Auto">
|
||||
<Grid>
|
||||
@ -177,12 +168,13 @@
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="{Binding Food.Value.ReferencePrice.Value}" />
|
||||
<TextBlock Style="{DynamicResource TextBlock_LeftCenter}" Text="{Binding Food.Value.ReferencePrice.Value}" />
|
||||
<Button
|
||||
Grid.Column="1"
|
||||
Command="{Binding SetReferencePriceCommand}"
|
||||
CommandParameter="{Binding Food.Value.ReferencePrice.Value}"
|
||||
Content="{ll:Str 设置}" />
|
||||
Content="{ll:Str 设置}"
|
||||
Style="{DynamicResource ThemedButtonStyle}" />
|
||||
<pu:Switch
|
||||
Grid.Column="2"
|
||||
BoxHeight="16"
|
||||
@ -201,13 +193,15 @@
|
||||
x:Name="Button_Cancel"
|
||||
Margin="10"
|
||||
Click="Button_Cancel_Click"
|
||||
Content="{ll:Str 取消}" />
|
||||
Content="{ll:Str 取消}"
|
||||
Style="{DynamicResource ThemedButtonStyle}" />
|
||||
<Button
|
||||
x:Name="Button_Yes"
|
||||
Grid.Column="1"
|
||||
Margin="10"
|
||||
Click="Button_Yes_Click"
|
||||
Content="{ll:Str 确定}" />
|
||||
Content="{ll:Str 确定}"
|
||||
Style="{DynamicResource ThemedButtonStyle}" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
<ListBox Grid.Column="2" Template="{StaticResource ListBox_ShowLangs}" />
|
||||
|
@ -1,12 +1,32 @@
|
||||
<Window x:Class="VPet.ModMaker.Views.ModEdit.I18nEdit.I18nEditWindow"
|
||||
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:local="clr-namespace:VPet.ModMaker.Views.ModEdit.I18nEdit"
|
||||
mc:Ignorable="d"
|
||||
Title="I18nEditWindow" Height="450" Width="800">
|
||||
<Grid>
|
||||
|
||||
</Grid>
|
||||
</Window>
|
||||
<pu:WindowX
|
||||
x:Class="VPet.ModMaker.Views.ModEdit.I18nEdit.I18nEditWindow"
|
||||
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:ll="clr-namespace:LinePutScript.Localization.WPF;assembly=LinePutScript.Localization.WPF"
|
||||
xmlns:local="clr-namespace:VPet.ModMaker.Views.ModEdit.I18nEdit"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:pu="https://opensource.panuon.com/wpf-ui"
|
||||
xmlns:vm="clr-namespace:VPet.ModMaker.ViewModels.ModEdit.I18nEdit"
|
||||
Title="I18nEditWindow"
|
||||
Width="800"
|
||||
Height="450"
|
||||
d:DataContext="{d:DesignInstance Type=vm:I18nEditWindowVM}"
|
||||
mc:Ignorable="d">
|
||||
<Grid>
|
||||
<DataGrid
|
||||
x:Name="DataGrid_Datas"
|
||||
d:ItemsSource="{d:SampleData ItemCount=5}"
|
||||
CanUserAddRows="False"
|
||||
CanUserReorderColumns="False"
|
||||
ScrollViewer.IsDeferredScrollingEnabled="True"
|
||||
VirtualizingStackPanel.VirtualizationMode="Recycling">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn
|
||||
Binding="{Binding Id}"
|
||||
Header="Id"
|
||||
IsReadOnly="True" />
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
</Grid>
|
||||
</pu:WindowX>
|
||||
|
@ -1,5 +1,7 @@
|
||||
using System;
|
||||
using Panuon.WPF.UI;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
@ -11,15 +13,82 @@ using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Shapes;
|
||||
using VPet.ModMaker.Models;
|
||||
using VPet.ModMaker.ViewModels.ModEdit.I18nEdit;
|
||||
|
||||
namespace VPet.ModMaker.Views.ModEdit.I18nEdit;
|
||||
|
||||
/// <summary>
|
||||
/// I18nEditWindow.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class I18nEditWindow : Window
|
||||
public partial class I18nEditWindow : WindowX
|
||||
{
|
||||
public bool IsCancel { get; private set; } = true;
|
||||
public I18nEditWindowVM ViewModel => (I18nEditWindowVM)DataContext;
|
||||
|
||||
public I18nEditWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
DataContext = new I18nEditWindowVM();
|
||||
Closed += (s, e) =>
|
||||
{
|
||||
//if (IsCancel)
|
||||
//ViewModel.Close();
|
||||
try
|
||||
{
|
||||
DataContext = null;
|
||||
}
|
||||
catch { }
|
||||
};
|
||||
}
|
||||
|
||||
private readonly Dictionary<string, DataGridTextColumn> _dataGridI18nColumns = new();
|
||||
|
||||
// TODO: 国际化标头
|
||||
private const string ValueBindingFormat = "Datas[{0}].Value";
|
||||
|
||||
/// <summary>
|
||||
/// 添加文化列
|
||||
/// </summary>
|
||||
/// <param name="culture"></param>
|
||||
public void AddCulture(CultureInfo culture)
|
||||
{
|
||||
// 文化数据列
|
||||
var column = new DataGridTextColumn()
|
||||
{
|
||||
Header = culture.GetFullInfo(),
|
||||
Binding = new Binding(string.Format(ValueBindingFormat, culture.Name))
|
||||
{
|
||||
Mode = BindingMode.TwoWay
|
||||
}
|
||||
};
|
||||
DataGrid_Datas.Columns.Add(column);
|
||||
_dataGridI18nColumns.Add(culture.Name, column);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除文化列
|
||||
/// </summary>
|
||||
/// <param name="culture"></param>
|
||||
public void RemoveCulture(CultureInfo culture)
|
||||
{
|
||||
DataGrid_Datas.Columns.Remove(_dataGridI18nColumns[culture.Name]);
|
||||
_dataGridI18nColumns.Remove(culture.Name);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 替换文化列
|
||||
/// </summary>
|
||||
/// <param name="oldCulture"></param>
|
||||
/// <param name="newCulture"></param>
|
||||
public void ReplaceCulture(CultureInfo oldCulture, CultureInfo newCulture)
|
||||
{
|
||||
//if (_dataGridI18nColumns.ContainsKey(newCultureName))
|
||||
// throw new();
|
||||
var column = _dataGridI18nColumns[oldCulture.Name];
|
||||
column.Header = newCulture.GetFullInfo();
|
||||
column.Binding = new Binding(string.Format(ValueBindingFormat, newCulture.Name));
|
||||
_dataGridI18nColumns.Remove(oldCulture.Name);
|
||||
_dataGridI18nColumns.Add(newCulture.Name, column);
|
||||
}
|
||||
}
|
||||
|
@ -14,10 +14,10 @@
|
||||
d:DataContext="{d:DesignInstance Type=vm:LowTextEditWindowVM}"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
mc:Ignorable="d">
|
||||
<Window.Resources>
|
||||
<ResourceDictionary Source="/VPet-Simulator.Windows.Interface;component/ResourceStyle.xaml" />
|
||||
</Window.Resources>
|
||||
<Grid>
|
||||
<Window.Resources>
|
||||
<ResourceDictionary Source="/VPet-Simulator.Windows.Interface;component/ResourceStyle.xaml" />
|
||||
</Window.Resources>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition MinWidth="300" />
|
||||
<ColumnDefinition Width="Auto" MinWidth="200" />
|
||||
@ -66,19 +66,22 @@
|
||||
<ComboBox
|
||||
Grid.Column="1"
|
||||
ItemsSource="{Binding LowText.Value.ModeTypes}"
|
||||
SelectedItem="{Binding LowText.Value.Mode.Value}" />
|
||||
SelectedItem="{Binding LowText.Value.Mode.Value}"
|
||||
Style="{DynamicResource StandardComboBoxStyle}" />
|
||||
<Label Grid.Row="1" Content="{ll:Str 饥渴状态}" />
|
||||
<ComboBox
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
ItemsSource="{Binding LowText.Value.StrengthTypes}"
|
||||
SelectedItem="{Binding LowText.Value.Strength.Value}" />
|
||||
SelectedItem="{Binding LowText.Value.Strength.Value}"
|
||||
Style="{DynamicResource StandardComboBoxStyle}" />
|
||||
<Label Grid.Row="2" Content="{ll:Str 好感度需求}" />
|
||||
<ComboBox
|
||||
Grid.Row="2"
|
||||
Grid.Column="1"
|
||||
ItemsSource="{Binding LowText.Value.LikeTypes}"
|
||||
SelectedItem="{Binding LowText.Value.Like.Value}" />
|
||||
SelectedItem="{Binding LowText.Value.Like.Value}"
|
||||
Style="{DynamicResource StandardComboBoxStyle}" />
|
||||
</Grid>
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
@ -89,13 +92,15 @@
|
||||
x:Name="Button_Cancel"
|
||||
Margin="10"
|
||||
Click="Button_Cancel_Click"
|
||||
Content="{ll:Str 取消}" />
|
||||
Content="{ll:Str 取消}"
|
||||
Style="{DynamicResource ThemedButtonStyle}" />
|
||||
<Button
|
||||
x:Name="Button_Yes"
|
||||
Grid.Column="1"
|
||||
Margin="10"
|
||||
Click="Button_Yes_Click"
|
||||
Content="{ll:Str 确定}" />
|
||||
Content="{ll:Str 确定}"
|
||||
Style="{DynamicResource ThemedButtonStyle}" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
<ListBox Grid.Column="2" Template="{StaticResource ListBox_ShowLangs}" />
|
||||
|
@ -14,10 +14,10 @@
|
||||
d:DataContext="{d:DesignInstance Type=vm:MoveEditWindowVM}"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
mc:Ignorable="d">
|
||||
<Window.Resources>
|
||||
<ResourceDictionary Source="/VPet-Simulator.Windows.Interface;component/ResourceStyle.xaml" />
|
||||
</Window.Resources>
|
||||
<Grid>
|
||||
<Window.Resources>
|
||||
<ResourceDictionary Source="/VPet-Simulator.Windows.Interface;component/ResourceStyle.xaml" />
|
||||
</Window.Resources>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition />
|
||||
@ -45,7 +45,7 @@
|
||||
Command="{Binding AddImageCommand}"
|
||||
Content="{ll:Str 添加测试图片}">
|
||||
<Button.Style>
|
||||
<Style BasedOn="{StaticResource {x:Type Button}}" TargetType="Button">
|
||||
<Style BasedOn="{StaticResource ThemedButtonStyle}" TargetType="Button">
|
||||
<Setter Property="Visibility" Value="Hidden" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding Image.Value}" Value="{x:Null}">
|
||||
@ -282,13 +282,15 @@
|
||||
x:Name="Button_Cancel"
|
||||
Margin="10"
|
||||
Click="Button_Cancel_Click"
|
||||
Content="{ll:Str 取消}" />
|
||||
Content="{ll:Str 取消}"
|
||||
Style="{DynamicResource ThemedButtonStyle}" />
|
||||
<Button
|
||||
x:Name="Button_Yes"
|
||||
Grid.Column="1"
|
||||
Margin="10"
|
||||
Click="Button_Yes_Click"
|
||||
Content="{ll:Str 确定}" />
|
||||
Content="{ll:Str 确定}"
|
||||
Style="{DynamicResource ThemedButtonStyle}" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
@ -14,29 +14,32 @@
|
||||
d:DataContext="{d:DesignInstance Type=vm:PetEditWindowVM}"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
mc:Ignorable="d">
|
||||
<Window.Resources>
|
||||
<Window.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="/VPet-Simulator.Windows.Interface;component/ResourceStyle.xaml" />
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="/VPet-Simulator.Windows.Interface;component/ResourceStyle.xaml" />
|
||||
<ResourceDictionary>
|
||||
<Style x:Key="Label_ThouchRect" BasedOn="{StaticResource {x:Type Label}}" TargetType="Label">
|
||||
<Setter Property="Visibility" Value="Collapsed" />
|
||||
<Setter Property="HorizontalAlignment" Value="Left" />
|
||||
<Setter Property="VerticalAlignment" Value="Top" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="Background" Value="#19FF0000" />
|
||||
<Setter Property="BorderBrush" Value="Red" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding Tag, RelativeSource={RelativeSource Mode=Self}}" Value="True">
|
||||
<Setter Property="Visibility" Value="Visible" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<Style
|
||||
x:Key="Label_ThouchRect"
|
||||
BasedOn="{StaticResource {x:Type Label}}"
|
||||
TargetType="Label">
|
||||
<Setter Property="Visibility" Value="Collapsed" />
|
||||
<Setter Property="HorizontalAlignment" Value="Left" />
|
||||
<Setter Property="VerticalAlignment" Value="Top" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="Background" Value="#19FF0000" />
|
||||
<Setter Property="BorderBrush" Value="Red" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding Tag, RelativeSource={RelativeSource Mode=Self}}" Value="True">
|
||||
<Setter Property="Visibility" Value="Visible" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
|
||||
</Window.Resources>
|
||||
<Grid>
|
||||
@ -334,18 +337,9 @@
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Command="{Binding AddImageCommand}"
|
||||
Content="{ll:Str 添加测试图片}">
|
||||
<Button.Style>
|
||||
<Style BasedOn="{StaticResource {x:Type Button}}" TargetType="Button">
|
||||
<Setter Property="Visibility" Value="Hidden" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding Image.Value}" Value="{x:Null}">
|
||||
<Setter Property="Visibility" Value="Visible" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Button.Style>
|
||||
</Button>
|
||||
Content="{ll:Str 添加测试图片}"
|
||||
Style="{DynamicResource Button_HiddenOnTagNull}"
|
||||
Tag="{Binding Image.Value}" />
|
||||
</Grid>
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
@ -819,13 +813,15 @@
|
||||
x:Name="Button_Cancel"
|
||||
Margin="10"
|
||||
Click="Button_Cancel_Click"
|
||||
Content="{ll:Str 取消}" />
|
||||
Content="{ll:Str 取消}"
|
||||
Style="{DynamicResource ThemedButtonStyle}" />
|
||||
<Button
|
||||
x:Name="Button_Yes"
|
||||
Grid.Column="1"
|
||||
Margin="10"
|
||||
Click="Button_Yes_Click"
|
||||
Content="{ll:Str 确定}" />
|
||||
Content="{ll:Str 确定}"
|
||||
Style="{DynamicResource ThemedButtonStyle}" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
<ListBox Grid.Column="2" Template="{StaticResource ListBox_ShowLangs}" />
|
||||
|
@ -14,10 +14,10 @@
|
||||
d:DataContext="{d:DesignInstance Type=vm:SelectTextEditWindowVM}"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
mc:Ignorable="d">
|
||||
<Window.Resources>
|
||||
<ResourceDictionary Source="/VPet-Simulator.Windows.Interface;component/ResourceStyle.xaml" />
|
||||
</Window.Resources>
|
||||
<Grid>
|
||||
<Window.Resources>
|
||||
<ResourceDictionary Source="/VPet-Simulator.Windows.Interface;component/ResourceStyle.xaml" />
|
||||
</Window.Resources>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition MinWidth="300" />
|
||||
<ColumnDefinition Width="Auto" MinWidth="300" />
|
||||
@ -162,13 +162,15 @@
|
||||
x:Name="Button_Cancel"
|
||||
Margin="10"
|
||||
Click="Button_Cancel_Click"
|
||||
Content="{ll:Str 取消}" />
|
||||
Content="{ll:Str 取消}"
|
||||
Style="{DynamicResource ThemedButtonStyle}" />
|
||||
<Button
|
||||
x:Name="Button_Yes"
|
||||
Grid.Column="1"
|
||||
Margin="10"
|
||||
Click="Button_Yes_Click"
|
||||
Content="{ll:Str 确定}" />
|
||||
Content="{ll:Str 确定}"
|
||||
Style="{DynamicResource ThemedButtonStyle}" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
<ListBox Grid.Column="2" Template="{StaticResource ListBox_ShowLangs}" />
|
||||
|
Loading…
Reference in New Issue
Block a user