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
<Window x:Class="MultiLayout.MainWindow"
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:MultiLayout" xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
xmlns:flyctrl="clr-namespace:FLY.ControlLibrary;assembly=FLY.ControlLibrary"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800" Loaded="MainWindow_Loaded">
<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/Dictionary_MyStyle.xaml"/>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Converter/Dictionary_MyConv.xaml"/>
</ResourceDictionary.MergedDictionaries>
<local:UcMultiGageVmUt x:Key="viewModel" GageTag="机尾" IsErrMsgVisable ="True"/>
</ResourceDictionary>
</Window.Resources>
<Grid d:DataContext="{StaticResource viewModel}">
<Frame Name="frame" NavigationUIVisibility="Hidden"/>
<Button x:Name="btnErrMsg" Style="{StaticResource Styles.Button.Empty}" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,0,50,0"
Visibility="{Binding IsErrMsgVisable,Converter={StaticResource visbilityconv}}" Click="btnErrMsgClick" >
<b:Interaction.Behaviors>
<flyctrl:DrapMoveXBehavior Move="DrapMoveXBehavior_Move" />
</b:Interaction.Behaviors>
<Border Background="Red" CornerRadius="0, 0 10 10" Style="{StaticResource Styles.Shadow}">
<StackPanel Orientation="Horizontal">
<Grid Width="15"/>
<Path Margin="5" Fill="White" Stretch="Uniform" Width="20" Height="20" SnapsToDevicePixels="True" Data="{StaticResource Geometry_alert-circle-outline}" >
<Path.Style>
<Style TargetType="Path">
<Style.Triggers>
<DataTrigger Binding="{Binding IsErrMsgVisable}" Value="True">
<DataTrigger.EnterActions>
<BeginStoryboard>
<Storyboard RepeatBehavior="Forever" >
<DoubleAnimation BeginTime="0:0:0" Storyboard.TargetProperty="Opacity" From="1" To="0" Duration="00:00:01" />
<DoubleAnimation BeginTime="0:0:1" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="00:00:01" />
</Storyboard>
</BeginStoryboard>
</DataTrigger.EnterActions>
</DataTrigger>
</Style.Triggers>
</Style>
</Path.Style>
</Path>
<TextBlock Text="{Binding ErrMsg}" FontWeight="Bold" FontFamily="YouYuan" FontSize="20"
Padding="10" TextAlignment="Left" MaxWidth="600"
Foreground="White" />
<Grid Width="10"/>
</StackPanel>
</Border>
</Button>
</Grid>
</Window>