alielie
2025-03-11 2e54b439c64e0adbb7e010243c1f33aa5fc5f503
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<pu:WindowX x:Class="WPFProject.PanuonWindow"
            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:WPFProject"
            xmlns:pw="https://opensource.panuon.com/wpf"
            xmlns:pu="https://opensource.panuon.com/wpf-ui"
            xmlns:ctl="clr-namespace:WPFProject.Controls"
            mc:Ignorable="d"
            WindowStartupLocation="CenterOwner"
            WindowState="Maximized"
            x:Name="window"
            BorderBrush="Transparent"
            Loaded="window_Loaded"
            xmlns:sys="clr-namespace:System;assembly=mscorlib"
            xmlns:dp="clr-namespace:HMI.UI.DpUtil;assembly=HMI.UI"
            xmlns:hc="clr-namespace:HMI.Core;assembly=HMI.Core"
            pu:WindowXCaption.Background="Transparent"
            pu:WindowXCaption.Height="80"
            pu:WindowXCaption.Foreground="#FFF" >
    <Window.Resources>
        <hc:LangConverter x:Key="lc"/>
    </Window.Resources>
    <Window.Background>
        <ImageBrush Stretch="Uniform" AlignmentX="Left" AlignmentY="Top"  
                    ImageSource="/Resources/Background.png"/>
    </Window.Background>
 
    <pu:WindowXCaption.HeaderTemplate>
        <DataTemplate>
            <StackPanel DataContext="{Binding ElementName=window}" Orientation="Horizontal"
                        VerticalAlignment="Center"
                        dp:StackPanelHelper.ChildSpace="30" Margin="5,0,0,0" Height="100">
                <Image Source="{Binding WindowLogo}" Height="60" VerticalAlignment="Center" Stretch="Fill"
       RenderOptions.BitmapScalingMode="HighQuality" />
                <TextBlock FontSize="30" VerticalAlignment="Center" Text="{Binding WindowTitle}">
                    <TextBlock.Effect>
                        <DropShadowEffect ShadowDepth="8"
      Direction="330"
      Color="Black"
      Opacity="0.5"
     BlurRadius="4"/>
                    </TextBlock.Effect>
                </TextBlock>
            </StackPanel>
        </DataTemplate>
    </pu:WindowXCaption.HeaderTemplate>
 
    <pu:WindowXCaption.ExtendControl>
        <StackPanel Orientation="Horizontal">
            <Button x:Name="BtnSwitchTheme"
                FontSize="18"
                FontFamily="/HMI.UI;component/Resources/Font/#iconfont"
                Content="&#xe60e;"
                RenderTransformOrigin="0.5,0.5"
                Click="Button_Click_2">
                <Button.Style>
                    <Style TargetType="Button" BasedOn="{StaticResource {x:Static pu:WindowXCaption.MinimizeButtonStyleKey}}">
                        <Style.Triggers>
                            <DataTrigger Binding="{Binding ShowMenu}" Value="True">
                                <Setter Property="Button.RenderTransform">
                                    <Setter.Value>
                                        <RotateTransform x:Name="MyAnimatedTransform" Angle="180" />
                                    </Setter.Value>
                                </Setter>
                            </DataTrigger>
                        </Style.Triggers>
                    </Style>
                </Button.Style>
                
            </Button>
        </StackPanel>
    </pu:WindowXCaption.ExtendControl>
 
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition Height="30"/>
        </Grid.RowDefinitions>
 
        <ctl:MainTabControl Grid.Row="0" x:Name="menuTab">
 
        </ctl:MainTabControl>
 
        <!--<ctl:MenuTabControl Grid.Row="1" x:Name="menuTab" OnTabChange="menuTab_OnTabChange"> </ctl:MenuTabControl>-->
 
 
        <StatusBar Grid.Row="1" Background="{StaticResource HoriBar}"></StatusBar>
    </Grid>
</pu:WindowX>