-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainPage.xaml
125 lines (122 loc) · 6.43 KB
/
MainPage.xaml
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<Page
x:Class="Social_Notes.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Social_Notes"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Page.Resources>
<ItemsPanelTemplate x:Key="ItemPanel">
<StackPanel Orientation="Horizontal"/>
</ItemsPanelTemplate>
<MenuFlyout x:Key="FlyoutNotes">
<MenuFlyoutItem Text="Abrir en Navegador"/>
<MenuFlyoutItem Text="Seguir Leyendo"/>
<MenuFlyoutSeparator BorderBrush="Cyan"/>
<MenuFlyoutItem Text="Ir a Pagina Principal"/>
</MenuFlyout>
<DataTemplate x:Key="DataNotes">
<Grid Width="350" Height="300" Background="Crimson" FlyoutBase.AttachedFlyout="{StaticResource FlyoutNotes}" Tapped="Grid_Tapped" RightTapped="Grid_RightTapped">
<Grid.RowDefinitions>
<RowDefinition Height="3*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<TextBlock Text="{Binding Title,Mode=OneTime}" Style="{ThemeResource SubheaderTextBlockStyle}" Padding="5,0"/>
<Border Grid.Row="1" Background="#4C000000">
<TextBlock Text="{Binding Description,Mode=OneTime}" Style="{ThemeResource BodyTextBlockStyle}" Padding="5,0"/>
</Border>
</Grid>
</DataTemplate>
<Style x:Key="StyleGridView" TargetType="GridView">
<Setter Property="Grid.Row" Value="1"/>
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Hidden"/>
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/>
<Setter Property="ScrollViewer.HorizontalScrollMode" Value="Enabled"/>
<Setter Property="ScrollViewer.VerticalScrollMode" Value="Disabled"/>
<Setter Property="ScrollViewer.ZoomMode" Value="Disabled"/>
<Setter Property="ItemsPanel" Value="{StaticResource ItemPanel}"/>
<Setter Property="ItemTemplate" Value="{StaticResource DataNotes}"/>
<Setter Property="IsSwipeEnabled" Value="True"/>
<Setter Property="SelectionMode" Value="None"/>
</Style>
</Page.Resources>
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" MinWidth="120"/>
<ColumnDefinition Width="6*"/>
</Grid.ColumnDefinitions>
<Grid Grid.Column="0">
<Grid.RowDefinitions>
<RowDefinition Height="150"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid Height="100">
<TextBlock x:Name="titulo" Style="{ThemeResource HeaderTextBlockStyle}" Text="Social Notes" TextWrapping="WrapWholeWords" Padding="5">
<TextBlock.Transitions>
<TransitionCollection>
<EntranceThemeTransition FromVerticalOffset="20" FromHorizontalOffset="60"/>
</TransitionCollection>
</TextBlock.Transitions>
</TextBlock>
</Grid>
<Grid Grid.Row="1">
<ListView x:Name="ListaRss" ScrollViewer.VerticalScrollBarVisibility="Hidden" SelectionChanged="ListaRss_SelectionChanged">
<ListView.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Vertical">
<TextBlock Style="{ThemeResource TitleTextBlockStyle}" Text="{Binding Fuente}"/>
<TextBlock Style="{ThemeResource SubtitleTextBlockStyle}" Text="{Binding SubTitle}"/>
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</Grid>
</Grid>
<ScrollViewer Grid.Column="1" ZoomMode="Disabled" x:Name="scrolls">
<Grid x:Name="container" >
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid Grid.Row="0" DataContext="{Binding Group[0]}">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Image Source="{Binding Path}" Height="50" Width="80"/>
<TextBlock Grid.Column="1" Text="{Binding Fuente}" FontSize="22" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock.Transitions>
<TransitionCollection>
<EntranceThemeTransition FromHorizontalOffset="60"/>
</TransitionCollection>
</TextBlock.Transitions>
</TextBlock>
</Grid>
<GridView Style="{StaticResource StyleGridView}" ItemsSource="{Binding Items}"/>
</Grid>
<Grid Grid.Row="1" DataContext="{Binding Group[1]}">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Image Source="{Binding Path}" Height="50" Width="80"/>
<TextBlock Grid.Column="1" Text="{Binding Fuente}" FontSize="22" VerticalAlignment="Center" HorizontalAlignment="Left"/>
</Grid>
<GridView Style="{StaticResource StyleGridView}" ItemsSource="{Binding Items}"/>
</Grid>
</Grid>
</ScrollViewer>
</Grid>
</Page>