|
1 | 1 | <?xml version="1.0" encoding="utf-8" ?>
|
2 |
| -<TabViewItem x:Class="AlAnvar.Views.QuranTabViewItem" |
3 |
| - xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
4 |
| - xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
5 |
| - xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
6 |
| - xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
7 |
| - xmlns:table="using:AlAnvar.Database.Tables" |
8 |
| - xmlns:views="using:AlAnvar.Views" |
9 |
| - x:Name="tabViewItem" |
10 |
| - mc:Ignorable="d"> |
| 2 | +<TabViewItem |
| 3 | + x:Class="AlAnvar.Views.QuranTabViewItem" |
| 4 | + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
| 5 | + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 6 | + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
| 7 | + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
| 8 | + xmlns:table="using:AlAnvar.Database.Tables" |
| 9 | + xmlns:views="using:AlAnvar.Views" |
| 10 | + x:Name="tabViewItem" |
| 11 | + CloseRequested="QuranTabViewItem_CloseRequested" |
| 12 | + Loaded="QuranTabViewItem_Loaded" |
| 13 | + mc:Ignorable="d"> |
11 | 14 | <TabViewItem.IconSource>
|
12 |
| - <BitmapIconSource ShowAsMonochrome="False" |
13 |
| - UriSource="Assets/Images/quran.png" /> |
| 15 | + <BitmapIconSource ShowAsMonochrome="False" UriSource="Assets/Images/quran.png" /> |
14 | 16 | </TabViewItem.IconSource>
|
15 | 17 | <TabViewItem.Resources>
|
16 |
| - <DataTemplate x:Name="QuranItemTemplate" |
17 |
| - x:DataType="table:QuranItem"> |
18 |
| - <views:QuranItemUC AyaDetail="{x:Bind AyaDetail}" |
19 |
| - AyahText="{x:Bind AyahText}" |
20 |
| - TranslationText="{x:Bind TranslationText}" /> |
| 18 | + <DataTemplate x:Name="QuranItemTemplate" x:DataType="table:QuranItem"> |
| 19 | + <views:QuranItemUC |
| 20 | + AyaDetail="{x:Bind AyaDetail}" |
| 21 | + AyahText="{x:Bind AyahText}" |
| 22 | + TranslationText="{x:Bind TranslationText}" /> |
21 | 23 | </DataTemplate>
|
22 | 24 | </TabViewItem.Resources>
|
23 | 25 | <Grid>
|
|
26 | 28 | <RowDefinition />
|
27 | 29 | </Grid.RowDefinitions>
|
28 | 30 |
|
29 |
| - <StackPanel Margin="5,0,5,0" |
30 |
| - VerticalAlignment="Top"> |
| 31 | + <StackPanel Margin="5,0,5,0" VerticalAlignment="Top"> |
31 | 32 | <Grid>
|
32 | 33 | <Grid.ColumnDefinitions>
|
33 | 34 | <ColumnDefinition Width="Auto" />
|
34 | 35 | <ColumnDefinition />
|
35 | 36 | <ColumnDefinition Width="2*" />
|
36 | 37 | </Grid.ColumnDefinitions>
|
37 |
| - <MediaPlayerElement x:Name="mediaPlayerElement" |
38 |
| - Grid.Column="2" |
39 |
| - HorizontalAlignment="Stretch" |
40 |
| - AreTransportControlsEnabled="True" |
41 |
| - AutoPlay="False" /> |
42 |
| - <TextBlock Grid.Column="0" |
43 |
| - Margin="10,0" |
44 |
| - VerticalAlignment="Center" |
45 |
| - Text="قاری" /> |
46 |
| - <ComboBox x:Name="CmbQari" |
47 |
| - Grid.Column="1" |
48 |
| - HorizontalAlignment="Stretch" |
49 |
| - VerticalAlignment="Center" |
50 |
| - ItemsSource="{x:Bind QarisCollection, Mode=OneWay}" |
51 |
| - SelectedIndex="{x:Bind QariIndex, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" |
52 |
| - SelectedItem="{x:Bind CurrentQari, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" |
53 |
| - SelectionChanged="CmbQari_SelectionChanged"> |
| 38 | + <MediaPlayerElement |
| 39 | + x:Name="mediaPlayerElement" |
| 40 | + Grid.Column="2" |
| 41 | + HorizontalAlignment="Stretch" |
| 42 | + AreTransportControlsEnabled="True" |
| 43 | + AutoPlay="False" /> |
| 44 | + <TextBlock |
| 45 | + Grid.Column="0" |
| 46 | + Margin="10,0" |
| 47 | + VerticalAlignment="Center" |
| 48 | + Text="قاری" /> |
| 49 | + <ComboBox |
| 50 | + x:Name="CmbQari" |
| 51 | + Grid.Column="1" |
| 52 | + HorizontalAlignment="Stretch" |
| 53 | + VerticalAlignment="Center" |
| 54 | + ItemsSource="{x:Bind QarisCollection, Mode=OneWay}" |
| 55 | + SelectedIndex="{x:Bind QariIndex, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" |
| 56 | + SelectedItem="{x:Bind CurrentQari, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" |
| 57 | + SelectionChanged="CmbQari_SelectionChanged"> |
54 | 58 | <ComboBox.ItemTemplate>
|
55 | 59 | <DataTemplate x:DataType="table:QuranAudio">
|
56 | 60 | <StackPanel Orientation="Horizontal">
|
|
70 | 74 | <ColumnDefinition />
|
71 | 75 | <ColumnDefinition Width="2*" />
|
72 | 76 | </Grid.ColumnDefinitions>
|
73 |
| - <TextBlock Margin="10,0" |
74 |
| - VerticalAlignment="Center" |
75 |
| - Text="مترجم" /> |
76 |
| - <ComboBox x:Name="CmbTranslation" |
77 |
| - Grid.Column="1" |
78 |
| - HorizontalAlignment="Stretch" |
79 |
| - VerticalAlignment="Center" |
80 |
| - ItemsSource="{x:Bind TranslationsCollection, Mode=OneWay}" |
81 |
| - SelectedIndex="{x:Bind TranslationIndex, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" |
82 |
| - SelectedItem="{x:Bind CurrentTranslation, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" |
83 |
| - SelectionChanged="CmbTranslation_SelectionChanged"> |
| 77 | + <TextBlock |
| 78 | + Margin="10,0" |
| 79 | + VerticalAlignment="Center" |
| 80 | + Text="مترجم" /> |
| 81 | + <ComboBox |
| 82 | + x:Name="CmbTranslation" |
| 83 | + Grid.Column="1" |
| 84 | + HorizontalAlignment="Stretch" |
| 85 | + VerticalAlignment="Center" |
| 86 | + ItemsSource="{x:Bind TranslationsCollection, Mode=OneWay}" |
| 87 | + SelectedIndex="{x:Bind TranslationIndex, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" |
| 88 | + SelectedItem="{x:Bind CurrentTranslation, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" |
| 89 | + SelectionChanged="CmbTranslation_SelectionChanged"> |
84 | 90 | <ComboBox.ItemTemplate>
|
85 | 91 | <DataTemplate x:DataType="table:QuranTranslation">
|
86 | 92 | <StackPanel Orientation="Horizontal">
|
|
92 | 98 | </ComboBox.ItemTemplate>
|
93 | 99 | </ComboBox>
|
94 | 100 |
|
95 |
| - <CommandBar Grid.Column="2" |
96 |
| - HorizontalAlignment="Center" |
97 |
| - Background="Transparent" |
98 |
| - DefaultLabelPosition="Right" |
99 |
| - IsOpen="False"> |
100 |
| - <AppBarToggleButton x:Name="btnShowTranslation" |
101 |
| - Checked="OnAppBarToggleButtonChanged" |
102 |
| - Icon="Caption" |
103 |
| - IsChecked="True" |
104 |
| - Label="نمایش ترجمه" |
105 |
| - Tag="Translation" |
106 |
| - Unchecked="OnAppBarToggleButtonChanged" /> |
107 |
| - <AppBarToggleButton x:Name="btnShowAya" |
108 |
| - Checked="OnAppBarToggleButtonChanged" |
109 |
| - Icon="Caption" |
110 |
| - IsChecked="True" |
111 |
| - Label="نمایش آیه" |
112 |
| - Tag="Aya" |
113 |
| - Unchecked="OnAppBarToggleButtonChanged" /> |
| 101 | + <CommandBar |
| 102 | + Grid.Column="2" |
| 103 | + HorizontalAlignment="Center" |
| 104 | + Background="Transparent" |
| 105 | + DefaultLabelPosition="Right" |
| 106 | + IsOpen="False"> |
| 107 | + <AppBarToggleButton |
| 108 | + x:Name="btnShowTranslation" |
| 109 | + Checked="OnAppBarToggleButtonChanged" |
| 110 | + Icon="Caption" |
| 111 | + IsChecked="True" |
| 112 | + Label="نمایش ترجمه" |
| 113 | + Tag="Translation" |
| 114 | + Unchecked="OnAppBarToggleButtonChanged" /> |
| 115 | + <AppBarToggleButton |
| 116 | + x:Name="btnShowAya" |
| 117 | + Checked="OnAppBarToggleButtonChanged" |
| 118 | + Icon="Caption" |
| 119 | + IsChecked="True" |
| 120 | + Label="نمایش آیه" |
| 121 | + Tag="Aya" |
| 122 | + Unchecked="OnAppBarToggleButtonChanged" /> |
114 | 123 | <AppBarSeparator />
|
115 |
| - <AppBarButton x:Name="btnNext" |
116 |
| - Click="AppBarButton_Click" |
117 |
| - Icon="Next" |
118 |
| - Label="بعدی" |
119 |
| - Tag="Next" /> |
120 |
| - <AppBarToggleButton x:Name="btnPlay" |
121 |
| - Click="AppBarToggleButton_Click" |
122 |
| - Icon="Play" |
123 |
| - Label="پخش" /> |
124 |
| - <AppBarButton x:Name="btnPrev" |
125 |
| - Click="AppBarButton_Click" |
126 |
| - Icon="Previous" |
127 |
| - Label="قبلی" |
128 |
| - Tag="Previous" /> |
| 124 | + <AppBarButton |
| 125 | + x:Name="btnNext" |
| 126 | + Click="AppBarButton_Click" |
| 127 | + Icon="Next" |
| 128 | + Label="بعدی" |
| 129 | + Tag="Next" /> |
| 130 | + <AppBarToggleButton |
| 131 | + x:Name="btnPlay" |
| 132 | + Click="AppBarToggleButton_Click" |
| 133 | + Icon="Play" |
| 134 | + Label="پخش" /> |
| 135 | + <AppBarButton |
| 136 | + x:Name="btnPrev" |
| 137 | + Click="AppBarButton_Click" |
| 138 | + Icon="Previous" |
| 139 | + Label="قبلی" |
| 140 | + Tag="Previous" /> |
129 | 141 | </CommandBar>
|
130 | 142 |
|
131 | 143 | </Grid>
|
132 | 144 | </Border>
|
133 | 145 |
|
134 | 146 | </StackPanel>
|
135 | 147 |
|
136 |
| - <ListView x:Name="quranListView" |
137 |
| - Grid.Row="1" |
138 |
| - Margin="10" |
139 |
| - ItemTemplate="{StaticResource QuranItemTemplate}" |
140 |
| - RightTapped="quranListView_RightTapped" |
141 |
| - SelectionChanged="quranListView_SelectionChanged"> |
| 148 | + <ListView |
| 149 | + x:Name="quranListView" |
| 150 | + Grid.Row="1" |
| 151 | + Margin="10" |
| 152 | + ItemTemplate="{StaticResource QuranItemTemplate}" |
| 153 | + RightTapped="quranListView_RightTapped" |
| 154 | + SelectionChanged="quranListView_SelectionChanged"> |
142 | 155 | <ListView.Resources>
|
143 | 156 | <MenuFlyout x:Name="menuFlyout">
|
144 | 157 | <MenuFlyout.Items>
|
145 |
| - <MenuFlyoutItem x:Name="mnuPlay" |
146 |
| - Click="menuFlyout_Click" |
147 |
| - Icon="Volume" |
148 |
| - Tag="Play" |
149 |
| - Text="قرائت" /> |
| 158 | + <MenuFlyoutItem |
| 159 | + x:Name="mnuPlay" |
| 160 | + Click="menuFlyout_Click" |
| 161 | + Icon="Volume" |
| 162 | + Tag="Play" |
| 163 | + Text="قرائت" /> |
150 | 164 | <MenuFlyoutSeparator />
|
151 | 165 |
|
152 |
| - <MenuFlyoutItem x:Name="mnuAddNote" |
153 |
| - Click="menuFlyout_Click" |
154 |
| - Icon="Add" |
155 |
| - IsEnabled="False" |
156 |
| - Tag="AddNote" |
157 |
| - Text="افزودن یادداشت" /> |
| 166 | + <MenuFlyoutItem |
| 167 | + x:Name="mnuAddNote" |
| 168 | + Click="menuFlyout_Click" |
| 169 | + Icon="Add" |
| 170 | + IsEnabled="False" |
| 171 | + Tag="AddNote" |
| 172 | + Text="افزودن یادداشت" /> |
158 | 173 | <MenuFlyoutSeparator />
|
159 |
| - <MenuFlyoutSubItem Icon="Copy" |
160 |
| - Text="کپی"> |
161 |
| - <MenuFlyoutItem x:Name="mnuCopyTranslation" |
162 |
| - Click="menuFlyout_Click" |
163 |
| - Icon="Copy" |
164 |
| - Tag="CopyTranslation" |
165 |
| - Text="ترجمه" /> |
166 |
| - <MenuFlyoutItem x:Name="mnuCopyAya" |
167 |
| - Click="menuFlyout_Click" |
168 |
| - Icon="Copy" |
169 |
| - Tag="CopyAya" |
170 |
| - Text="آیه" /> |
| 174 | + <MenuFlyoutSubItem Icon="Copy" Text="کپی"> |
| 175 | + <MenuFlyoutItem |
| 176 | + x:Name="mnuCopyTranslation" |
| 177 | + Click="menuFlyout_Click" |
| 178 | + Icon="Copy" |
| 179 | + Tag="CopyTranslation" |
| 180 | + Text="ترجمه" /> |
| 181 | + <MenuFlyoutItem |
| 182 | + x:Name="mnuCopyAya" |
| 183 | + Click="menuFlyout_Click" |
| 184 | + Icon="Copy" |
| 185 | + Tag="CopyAya" |
| 186 | + Text="آیه" /> |
171 | 187 | </MenuFlyoutSubItem>
|
172 | 188 | </MenuFlyout.Items>
|
173 | 189 | </MenuFlyout>
|
174 | 190 | </ListView.Resources>
|
175 | 191 | </ListView>
|
176 |
| - <ProgressRing x:Name="prgLoading" |
177 |
| - Grid.Row="1" |
178 |
| - HorizontalAlignment="Center" |
179 |
| - VerticalAlignment="Center" /> |
| 192 | + <ProgressRing |
| 193 | + x:Name="prgLoading" |
| 194 | + Grid.Row="1" |
| 195 | + HorizontalAlignment="Center" |
| 196 | + VerticalAlignment="Center" /> |
180 | 197 |
|
181 | 198 | </Grid>
|
182 | 199 | </TabViewItem>
|
0 commit comments