UI/FormControlManagePrivacyStatus.xaml
author Thomas
Tue, 03 Apr 2018 10:17:13 +0200
branchOUT-369
changeset 2100 91f72cbed562
parent 1548 f45d44448548
permissions -rw-r--r--
Close branch OUT-369
     1 <UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
     2              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
     3              xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
     4              xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
     5              xmlns:core="clr-namespace:System;assembly=mscorlib"
     6              xmlns:local="clr-namespace:pEp.UI"
     7              x:Class="pEp.UI.FormControlManagePrivacyStatus"
     8              x:ClassModifier="internal"
     9              mc:Ignorable="d"
    10              Height="300"
    11              Width="450">
    12     <UserControl.Resources>
    13         <ResourceDictionary>
    14             <ResourceDictionary.MergedDictionaries>
    15                 <ResourceDictionary Source="pack://application:,,,/pEp;component/Resources/Dictionary.xaml" />
    16             </ResourceDictionary.MergedDictionaries>
    17         </ResourceDictionary>
    18     </UserControl.Resources>
    19     <Grid Margin="5">
    20         <Grid.ColumnDefinitions>
    21             <ColumnDefinition Width="*" />
    22             <ColumnDefinition Width="*" />
    23         </Grid.ColumnDefinitions>
    24         <Grid.RowDefinitions>
    25             <RowDefinition Height="Auto" />
    26             <RowDefinition Height="Auto"
    27                            MinHeight="55" />
    28             <RowDefinition Height="*" />
    29             <RowDefinition Height="Auto" />
    30         </Grid.RowDefinitions>
    31 
    32         <!-- Rating section -->
    33         <Grid Grid.Column="0"
    34               Grid.ColumnSpan="2"
    35               Grid.Row="0">
    36             <Grid.Margin>
    37                 <Thickness Bottom="{StaticResource Spacing}"
    38                            Left="0"
    39                            Right="0"
    40                            Top="0" />
    41             </Grid.Margin>
    42             <local:PrivacyView HorizontalAlignment="Stretch"
    43                                VerticalAlignment="Center"
    44                                Mode="Indicator"
    45                                Rating="{Binding Rating}" />
    46         </Grid>
    47 
    48         <!-- Explanation/Suggestion section -->
    49         <StackPanel Grid.Column="0"
    50                     Grid.Row="1"
    51                     Margin="0,0,5,0">
    52             <TextBlock Text="{Binding Path=ExplanationTitle, FallbackValue=Explanation}"
    53                        FontWeight="Bold" />
    54             <Separator />
    55             <TextBlock Text="{Binding Path=Explanation, FallbackValue=&lt;explanation&gt;}"
    56                        TextWrapping="Wrap" />
    57         </StackPanel>
    58         <StackPanel Grid.Column="1"
    59                     Grid.Row="1"
    60                     Margin="5,0,0,0">
    61             <TextBlock Text="{Binding Path=SuggestionTitle, FallbackValue=Suggestion}"
    62                        FontWeight="Bold" />
    63             <Separator />
    64             <TextBlock Text="{Binding Path=Suggestion, FallbackValue=&lt;suggestion&gt;}"
    65                        TextWrapping="Wrap" />
    66         </StackPanel>
    67 
    68         <!-- Identities List -->
    69         <Grid Grid.Column="0"
    70               Grid.ColumnSpan="2"
    71               Grid.Row="2">
    72             <Grid.Margin>
    73                 <Thickness Bottom="0"
    74                            Left="0"
    75                            Right="0"
    76                            Top="{StaticResource Spacing}" />
    77             </Grid.Margin>
    78             <Grid.RowDefinitions>
    79                 <RowDefinition Height="Auto" />
    80                 <RowDefinition Height="*" />
    81             </Grid.RowDefinitions>
    82             <TextBlock Grid.Row="0"
    83                        Text="{Binding IdentitiesTitle, FallbackValue=&lt;identities&gt;}"
    84                        FontWeight="Bold"
    85                        Margin="0,0,0,2" />
    86             <local:SelectionBox x:Name="SelectionBoxIdentities"
    87                                 Grid.Row="1"
    88                                 HorizontalAlignment="Stretch"
    89                                 VerticalAlignment="Stretch"
    90                                 Items="{Binding Identities}"
    91                                 SelectedIndex="{Binding SelectedIdentityIndex, Mode=TwoWay}" />
    92         </Grid>
    93 
    94         <!-- Button/Footer section -->
    95         <Grid Grid.Column="0"
    96               Grid.ColumnSpan="2"
    97               Grid.Row="3">
    98             <Grid.Margin>
    99                 <Thickness Bottom="0"
   100                            Left="0"
   101                            Right="0"
   102                            Top="{StaticResource Spacing}" />
   103             </Grid.Margin>
   104             <Grid.ColumnDefinitions>
   105                 <ColumnDefinition Width="*" />
   106                 <ColumnDefinition Width="Auto" />
   107             </Grid.ColumnDefinitions>
   108             <TextBlock x:Name="TextBlockTrustwords"
   109                        Grid.Column="0"
   110                        Text="{Binding Path=Trustwords, FallbackValue=&lt;trustwords&gt;}"
   111                        TextWrapping="Wrap"
   112                        HorizontalAlignment="Stretch"
   113                        VerticalAlignment="Stretch">
   114                 <TextBlock.Margin>
   115                     <Thickness Bottom="0"
   116                                Left="0"
   117                                Right="{StaticResource Spacing}"
   118                                Top="0" />
   119                 </TextBlock.Margin>
   120             </TextBlock>
   121             <Button Name="ButtonClose"
   122                     Grid.Column="1"
   123                     Content="{Binding Path=CloseText, FallbackValue=Close}"
   124                     MinHeight="28"
   125                     MinWidth="110"
   126                     VerticalAlignment="Center"
   127                     HorizontalAlignment="Right"
   128                     Padding="{StaticResource ButtonPaddingStandard}"
   129                     Click="ButtonClose_Click" IsCancel="True" IsDefault="True" />
   130         </Grid>
   131     </Grid>
   132 </UserControl>