20230201_145_upperpc/InSituLaboratory.Assets/Styles/PageBaseTempalte.xaml
2024-07-09 14:01:02 +08:00

159 lines
7.3 KiB
XML

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ControlTemplate TargetType="UserControl" x:Key="PageTempalte">
<Grid Background="#14273a">
<Grid.RowDefinitions>
<RowDefinition Height="45"/>
<RowDefinition/>
</Grid.RowDefinitions>
<!--搜索输入框-->
<TextBox VerticalAlignment="Center" Width="300" HorizontalAlignment="Left" Margin="10,5"
Text="{Binding SearchKey,UpdateSourceTrigger=PropertyChanged}" Foreground="White"
Style="{StaticResource SearchTextBoxStyle}" Name="tb_search">
<TextBox.InputBindings>
<KeyBinding Key="Return" Command="{Binding RefreshCommand}"/>
</TextBox.InputBindings>
</TextBox>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right">
<!--刷新按钮-->
<Button Content="刷新" Style="{StaticResource NormalButtonStyle}"
Command="{Binding RefreshCommand}"
Width="60" Background="#88409EFE"/>
<!--添加按钮-->
<Button Content="新建" Style="{StaticResource IconWithContentButtonStyle}"
Command="{Binding ModifyCommand}" Margin="10,5"
Tag="&#xe603;" Width="80">
<Button.Background>
<LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
<GradientStop Color="#FE582D" Offset="0"/>
<GradientStop Color="#F1961A" Offset="1"/>
</LinearGradientBrush>
</Button.Background>
</Button>
</StackPanel>
<!--内容部分-->
<Border CornerRadius="5" Background="White" Grid.Row="1" Margin="10,5,10,10">
<Border.Effect>
<DropShadowEffect BlurRadius="5" Color="Gray" ShadowDepth="0" Opacity="0.3"/>
</Border.Effect>
</Border>
<ContentPresenter Grid.Row="1"/>
</Grid>
</ControlTemplate>
<ControlTemplate TargetType="UserControl" x:Key="DialogViewTemplate">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="40"/>
<RowDefinition/>
<RowDefinition Height="40"/>
</Grid.RowDefinitions>
<Border Background="#FAFCFF" Grid.Row="1"/>
<Border Height="1" Background="#EEE" VerticalAlignment="Bottom"/>
<Border Height="1" Grid.Row="2" Background="#EEE" VerticalAlignment="Top"/>
<TextBlock Text="{Binding Title}" FontSize="14"
VerticalAlignment="Center"
FontWeight="Bold"
Foreground="#888" Margin="10,0"/>
<Button Content="保存" Grid.Row="2" Height="30" Width="100"
HorizontalAlignment="Center"
Style="{StaticResource NormalButtonStyle}"
Command="{Binding SaveCommand}"/>
<ContentPresenter Grid.Row="1"/>
</Grid>
</ControlTemplate>
<ControlTemplate TargetType="UserControl" x:Key="PageSearchTempalte">
<Grid Background="#14273a">
<Grid.RowDefinitions>
<RowDefinition Height="45"/>
<RowDefinition/>
</Grid.RowDefinitions>
<!--搜索输入框-->
<TextBox VerticalAlignment="Center" Width="300" HorizontalAlignment="Left" Margin="10,5"
Text="{Binding SearchKey,UpdateSourceTrigger=PropertyChanged}" Foreground="White"
Style="{StaticResource SearchTextBoxStyle}" Name="tb_search">
<TextBox.InputBindings>
<KeyBinding Key="Return" Command="{Binding RefreshCommand}"/>
</TextBox.InputBindings>
</TextBox>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right">
<TextBlock VerticalAlignment="Center" Text="{Binding PrimaryKey}" FontSize="12" Foreground=" #A52A2A" Margin="20,0" />
<!--刷新按钮-->
<Button Content="刷新" Style="{StaticResource NormalButtonStyle}"
Command="{Binding RefreshCommand}"
Width="60" Margin="5,0" Background="#88409EFE"/>
</StackPanel>
<!--内容部分-->
<Border CornerRadius="5" Background="White" Grid.Row="1" Margin="10,5,10,10">
<Border.Effect>
<DropShadowEffect BlurRadius="5" Color="Gray" ShadowDepth="0" Opacity="0.3"/>
</Border.Effect>
</Border>
<ContentPresenter Grid.Row="1"/>
</Grid>
</ControlTemplate>
<ControlTemplate TargetType="UserControl" x:Key="PageSearchAndDownloadTempalte">
<Grid Background="#14273a">
<Grid.RowDefinitions>
<RowDefinition Height="45"/>
<RowDefinition/>
</Grid.RowDefinitions>
<!--搜索输入框-->
<TextBox VerticalAlignment="Center" Width="300" HorizontalAlignment="Left" Margin="10,5"
Text="{Binding SearchKey,UpdateSourceTrigger=PropertyChanged}" Foreground="White"
Style="{StaticResource SearchTextBoxStyle}" Name="tb_search">
<TextBox.InputBindings>
<KeyBinding Key="Return" Command="{Binding RefreshCommand}"/>
</TextBox.InputBindings>
</TextBox>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,15,0">
<TextBlock VerticalAlignment="Center" Text="{Binding DownloadDataMsg}" FontSize="12" Foreground="{Binding DownloadDataMsgForeground}" Visibility="{Binding DownloadDataMsgVisibility}" Margin="20,0" />
<!--刷新按钮-->
<Button Content="刷新" Style="{StaticResource NormalButtonStyle}"
Command="{Binding RefreshCommand}"
Width="60" Margin="5,0" Background="#88409EFE"/>
<!--下载数据按钮-->
<Button Content="数据下载" Style="{StaticResource NormalButtonStyle}"
Command="{Binding DownloadCommand}"
Width="60" Margin="5,0" >
<Button.Background>
<LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
<GradientStop Color="#FE582D" Offset="0"/>
<GradientStop Color="#F1961A" Offset="1"/>
</LinearGradientBrush>
</Button.Background>
</Button>
</StackPanel>
<!--内容部分-->
<Border CornerRadius="5" Background="White" Grid.Row="1" Margin="10,5,10,10">
<Border.Effect>
<DropShadowEffect BlurRadius="5" Color="Gray" ShadowDepth="0" Opacity="0.3"/>
</Border.Effect>
</Border>
<ContentPresenter Grid.Row="1"/>
</Grid>
</ControlTemplate>
</ResourceDictionary>