Skip to content

Commit 726f30c

Browse files
committed
Added Drop Shadow to Progress Box, Tweaked PhotoAlbumView Directory Icon
1 parent 3438bed commit 726f30c

File tree

4 files changed

+14
-43
lines changed

4 files changed

+14
-43
lines changed

FileLoader.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,7 @@ public async void GetItemsAsync(string path)
175175
PropertyName = "System.ItemNameDisplay"
176176
};
177177
options.SortOrder.Add(sort);
178-
uint fol_index = 0;
179-
uint file_index = 0;
180-
const uint step = 100;
178+
181179
StorageFileQueryResult fileQueryResult = folder.CreateFileQueryWithOptions(options);
182180
StorageFolderQueryResult folderQueryResult = folder.CreateFolderQueryWithOptions(options);
183181
folderList = await folder.GetFoldersAsync(); // Create a read-only list of all folders in location

GenericFileBrowser.xaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@
165165
</MenuFlyoutItem>
166166
</MenuFlyout>
167167

168-
<MenuFlyout x:Name="RightClickContextMenu" x:Key="RightClickFlyout">
168+
<MenuFlyout x:Name="RightClickContextMenu" x:Key="RightClickFlyout">
169169
<MenuFlyout.Items>
170170
<MenuFlyoutItem Text="Open" Name="OpenItem">
171171
<MenuFlyoutItem.Icon>
@@ -244,13 +244,15 @@
244244
<Grid Visibility="Collapsed" Background="{StaticResource Accent}" VerticalAlignment="Bottom" Height="30">
245245

246246
</Grid>
247-
<Grid x:Name="ProgressBox" Visibility="{x:Bind local2:ItemViewModel.PVIS.isVisible, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Center" VerticalAlignment="Center" Width="500" Height="225">
248-
<Rectangle Fill="White" Stroke="Blue" Width="500" Height="225" HorizontalAlignment="Center" VerticalAlignment="Center"/>
247+
<controls:DropShadowPanel x:Name="ProgressBox" Visibility="{x:Bind local2:ItemViewModel.PVIS.isVisible, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Center" VerticalAlignment="Center" Width="500" Height="225">
248+
<Grid>
249+
<Rectangle Fill="White" Stroke="White" Width="500" Height="225" HorizontalAlignment="Center" VerticalAlignment="Center"/>
249250
<TextBlock Text="{x:Bind local2:ItemViewModel.PUIH.Header, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="25,0,0,150" FontSize="22"/>
250251
<Button Content="Hide" HorizontalAlignment="Right" Margin="0,0,25,25" VerticalAlignment="Bottom" Width="175" Click="Button_Click"/>
251252
<TextBlock Text="{x:Bind local2:ItemViewModel.PUIP.Path, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="25,0,0,50" FontSize="14"/>
252253
<ProgressBar Name="pbar" Value="{x:Bind local2:ItemViewModel.PROGRESSPER.prog, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" Height="8" HorizontalAlignment="Center" Width="450" Margin="0,50,0,0"/>
253254
</Grid>
255+
</controls:DropShadowPanel>
254256
</Grid>
255257

256258

ItemInteractions.cs

Lines changed: 5 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ namespace Interact
3434

3535
public class Interaction
3636
{
37-
public static LargeImageSource lis = new LargeImageSource();
38-
public static LargeImageSource LIS { get { return lis; } }
37+
3938

4039

4140
public static Page page;
@@ -45,7 +44,7 @@ public Interaction(Page p)
4544
}
4645

4746

48-
47+
// Double-tap event for DataGrid
4948
public static async void List_ItemClick(object sender, DoubleTappedRoutedEventArgs e)
5049
{
5150
if (page.Name == "GenericItemView")
@@ -147,9 +146,8 @@ public static void FileList_RightTapped(object sender, RightTappedRoutedEventArg
147146

148147
public static async void OpenItem_Click(object sender, RoutedEventArgs e)
149148
{
150-
var ItemInvoked = sender as DataGridRow;
151-
var RowIndex = ItemInvoked.GetIndex();
152-
var RowData = ItemViewModel.FilesAndFolders[RowIndex];
149+
var ItemSelected = GenericFileBrowser.data.SelectedIndex;
150+
var RowData = ItemViewModel.FilesAndFolders[ItemSelected];
153151

154152
if (RowData.FileExtension == "Folder")
155153
{
@@ -203,33 +201,5 @@ public static void CopyItem_Click(object sender, RoutedEventArgs e)
203201

204202

205203

206-
public class LargeImageSource : INotifyPropertyChanged
207-
{
208-
209-
210-
public BitmapImage _image;
211-
public BitmapImage image
212-
{
213-
get
214-
{
215-
return _image;
216-
}
217-
218-
set
219-
{
220-
if (value != _image)
221-
{
222-
_image = value;
223-
NotifyPropertyChanged("image");
224-
}
225-
}
226-
}
227-
public event PropertyChangedEventHandler PropertyChanged;
228-
229-
private void NotifyPropertyChanged(string info)
230-
{
231-
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(info));
232-
}
233-
234-
}
204+
235205
}

PhotoAlbum.xaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@
120120
</ScrollViewer>
121121

122122
</Grid>
123+
<TextBlock Name="EmptyText" Visibility="{x:Bind local2:ItemViewModel.TextState.isVisible, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Center" Text="This folder is empty." TextWrapping="Wrap" VerticalAlignment="Top" Margin="0,275,0,0" Canvas.ZIndex="5"/>
123124
<GridView IsRightTapEnabled="True" IsItemClickEnabled="True" Background="White" ItemsSource="{x:Bind local2:ItemViewModel.FilesAndFolders}" Name="FileList" Padding="0, 0, 0, 0" Margin="40,200,40,0" Grid.Row="1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" >
124125
<GridView.Resources>
125126
<MenuFlyout x:Name="RightClickContextMenu" x:Key="RightClickFlyout">
@@ -182,8 +183,8 @@
182183

183184
<Grid Name="Album" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Visibility="{Binding FolderImg}">
184185

185-
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
186-
<FontIcon Foreground="Black" FontSize="48" Glyph="&#xE7C5;"/>
186+
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
187+
<FontIcon FontSize="72" Glyph="&#xE8D5;" FontFamily="Segoe MDL2 Assets" Foreground="#ffe793"/>
187188
</Grid>
188189
</Grid>
189190
<TextBlock VerticalAlignment="Bottom" Text="{Binding FileName}" TextAlignment="Center"/>

0 commit comments

Comments
 (0)