summaryrefslogtreecommitdiff
path: root/platform/winrt/gsview/About.xaml
blob: 13b3b142da6dcf13d00759516d0dcf3bb0018146 (plain)
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
92
93
94
95
96
<Window
    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" mc:Ignorable="d" x:Class="gsview.About"
    Title="{Binding ProductTitle, Mode=OneTime, RelativeSource={RelativeSource Self}}" 
    x:Uid="idAboutBox"
    Style="{DynamicResource AboutDialogStyle}" WindowStartupLocation="CenterOwner" Height="353" Width="501">
    <Window.Resources>
        <XmlDataProvider x:Key="aboutProvider" XPath="ApplicationInfo" IsAsynchronous="False" IsInitialLoadEnabled="True">
            <x:XData>
                <ApplicationInfo xmlns="">
                    <Link Uri="http://www.gsview.com">More Info</Link>
                </ApplicationInfo>
            </x:XData>
        </XmlDataProvider>
        <Image x:Key="aboutLogo" Source="resources/banner.png" />
        <Style x:Key="AboutDialogStyle" TargetType="{x:Type Window}">
            <Setter Property="Height" Value="Auto" />
            <Setter Property="Width" Value="500" />
            <Setter Property="ShowInTaskbar" Value="False" />
            <Setter Property="ResizeMode" Value="NoResize" />
            <Setter Property="WindowStyle" Value="SingleBorderWindow" />
            <Setter Property="SizeToContent" Value="Height" />
        </Style>
        <Style x:Key="DisplayAreaStyle" TargetType="{x:Type StackPanel}">
            <Setter Property="Margin" Value="10,10,10,5" />
        </Style>
        <Style x:Key="BackgroundStyle" TargetType="{x:Type StackPanel}">
            <Setter Property="Background">
                <Setter.Value>
                    <LinearGradientBrush EndPoint="0,1">
                        <GradientStop Offset="0" Color="#FF317896" />
                        <GradientStop Offset="0.27" Color="White" />
                        <GradientStop Offset="0.85" Color="#FF317896" />
                        <GradientStop Offset="1" Color="#FF317896" />
                    </LinearGradientBrush>
                </Setter.Value>
            </Setter>
        </Style>
        <Style TargetType="{x:Type Label}">
            <Setter Property="Padding" Value="0" />
        </Style>
        <Style x:Key="ParagraphSeparator" TargetType="{x:Type Label}">
            <Setter Property="Padding" Value="0,10,0,0" />
        </Style>
        <Style x:Key="LinkLabelStyle">
            <Setter Property="Control.Padding" Value="0" />
            <Setter Property="FrameworkElement.VerticalAlignment" Value="Center" />
        </Style>
        <Style x:Key="ReadOnlyDescStyle" TargetType="{x:Type TextBox}">
            <Setter Property="MinLines" Value="6" />
            <Setter Property="MaxLines" Value="6" />
            <Setter Property="IsReadOnly" Value="True" />
            <Setter Property="TextWrapping" Value="WrapWithOverflow" />
            <Setter Property="VerticalScrollBarVisibility" Value="Visible" />
        </Style>
        <Style x:Key="OkButtonStyle" TargetType="{x:Type Button}">
            <Setter Property="MinWidth" Value="75" />
            <Setter Property="Margin" Value="0,5" />
            <Setter Property="DockPanel.Dock" Value="Right" />
            <Setter Property="IsDefault" Value="True" />
            <Setter Property="IsCancel" Value="True" />
        </Style>
    </Window.Resources>
    <StackPanel x:Uid="clientArea" Style="{StaticResource BackgroundStyle}">
        <StaticResource ResourceKey="aboutLogo" />
        <StackPanel x:Uid="displayArea" Style="{StaticResource DisplayAreaStyle}" 
			DataContext="{Binding Mode=OneTime, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}">
            <Label x:Name="productName" x:Uid="productName" 
				Content="{Binding Product, Mode=OneTime}" />
            <StackPanel x:Uid="versionArea" Orientation="Horizontal">
                <Label x:Name="versionLabel" x:Uid="VersionLabel" Content="Version - " />
                <Label x:Name="version" x:Uid="version" Content="{Binding Version, Mode=OneTime}" />
            </StackPanel>
            <Label x:Name="copyright" x:Uid="copyright" Content="{Binding Copyright, Mode=OneTime}"  />
            <Label x:Name="company" x:Uid="company" Content="{Binding Company, Mode=OneTime}" />
            <Label x:Name="reserved" x:Uid="reserved" Content="All Rights Reserved." />
            <Label x:Name="info" x:Uid="info" Style="{StaticResource ParagraphSeparator}" 
				Content="Product details:" />
            <TextBox x:Name="description" x:Uid="description" Text=""
				Style="{StaticResource ReadOnlyDescStyle}" Height="140" />
            <DockPanel x:Uid="buttonArea">
                <Button x:Name="okButton" x:Uid="okButton" Style="{StaticResource OkButtonStyle}" 
					Content="OK" />
                <Label x:Name="productLink" x:Uid="productLink" Style="{StaticResource LinkLabelStyle}" >
                    <Hyperlink x:Name="hyperlink" x:Uid="hyperlink" NavigateUri="{Binding LinkUri, Mode=OneTime}"  Style="{StaticResource LinkLabelStyle}"
						RequestNavigate="hyperlink_RequestNavigate">
                        <InlineUIContainer>
                            <TextBlock Text="{Binding LinkText, Mode=OneTime}" />
                        </InlineUIContainer>
                    </Hyperlink>
                </Label>
            </DockPanel>
        </StackPanel>
    </StackPanel>
</Window>