playlist search - switch from lists to observabledictionary
This commit is contained in:
@@ -174,6 +174,9 @@
|
|||||||
<data name="FilterWindow.Title" xml:space="preserve">
|
<data name="FilterWindow.Title" xml:space="preserve">
|
||||||
<value>Filter</value>
|
<value>Filter</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="HiddenTextBlock.Text" xml:space="preserve">
|
||||||
|
<value>Hidden: </value>
|
||||||
|
</data>
|
||||||
<data name="MediaOptionsHeader.Text" xml:space="preserve">
|
<data name="MediaOptionsHeader.Text" xml:space="preserve">
|
||||||
<value>Media options</value>
|
<value>Media options</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ using VDownload.Models;
|
|||||||
using VDownload.Services.Data.Settings;
|
using VDownload.Services.Data.Settings;
|
||||||
using VDownload.Services.UI.StoragePicker;
|
using VDownload.Services.UI.StoragePicker;
|
||||||
using VDownload.Sources.Twitch.Configuration.Models;
|
using VDownload.Sources.Twitch.Configuration.Models;
|
||||||
|
using SimpleToolkit.MVVM;
|
||||||
|
|
||||||
namespace VDownload.Core.ViewModels.Home
|
namespace VDownload.Core.ViewModels.Home
|
||||||
{
|
{
|
||||||
@@ -34,7 +35,7 @@ namespace VDownload.Core.ViewModels.Home
|
|||||||
|
|
||||||
protected Playlist _playlist;
|
protected Playlist _playlist;
|
||||||
|
|
||||||
protected Dictionary<VideoViewModel, bool> _allVideos;
|
protected List<VideoViewModel> _removedVideos;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@@ -46,11 +47,17 @@ namespace VDownload.Core.ViewModels.Home
|
|||||||
protected string _name;
|
protected string _name;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
protected ObservableCollection<VideoViewModel> _videos;
|
protected ObservableDictionary<VideoViewModel, bool> _videos;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
protected int _removedCount;
|
protected int _removedCount;
|
||||||
|
|
||||||
|
[ObservableProperty]
|
||||||
|
protected int _hiddenCount;
|
||||||
|
|
||||||
|
[ObservableProperty]
|
||||||
|
protected bool _isSomethingHidden;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
@@ -63,8 +70,9 @@ namespace VDownload.Core.ViewModels.Home
|
|||||||
_settingsService = settingsService;
|
_settingsService = settingsService;
|
||||||
_storagePickerService = storagePickerService;
|
_storagePickerService = storagePickerService;
|
||||||
|
|
||||||
_allVideos = new Dictionary<VideoViewModel, bool>();
|
_removedVideos = new List<VideoViewModel>();
|
||||||
_videos = new ObservableCollection<VideoViewModel>();
|
|
||||||
|
_videos = new ObservableDictionary<VideoViewModel, bool>();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@@ -77,15 +85,15 @@ namespace VDownload.Core.ViewModels.Home
|
|||||||
{
|
{
|
||||||
_playlist = playlist;
|
_playlist = playlist;
|
||||||
|
|
||||||
_allVideos.Clear();
|
_removedVideos.Clear();
|
||||||
foreach (Video video in playlist)
|
|
||||||
{
|
|
||||||
_allVideos.Add(new VideoViewModel(video, _settingsService, _storagePickerService), false);
|
|
||||||
}
|
|
||||||
|
|
||||||
Name = _playlist.Name;
|
Name = _playlist.Name;
|
||||||
Videos = new ObservableCollection<VideoViewModel>(_allVideos.Keys);
|
Videos.Clear();
|
||||||
RemovedCount = 0;
|
foreach (Video video in playlist)
|
||||||
|
{
|
||||||
|
Videos.Add(new VideoViewModel(video, _settingsService, _storagePickerService), true);
|
||||||
|
}
|
||||||
|
UpdateCounters();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@@ -100,7 +108,7 @@ namespace VDownload.Core.ViewModels.Home
|
|||||||
string? newDirectory = await _storagePickerService.OpenDirectory();
|
string? newDirectory = await _storagePickerService.OpenDirectory();
|
||||||
if (newDirectory is not null)
|
if (newDirectory is not null)
|
||||||
{
|
{
|
||||||
foreach (VideoViewModel video in _allVideos.Keys)
|
foreach (VideoViewModel video in Videos.Keys)
|
||||||
{
|
{
|
||||||
video.DirectoryPath = newDirectory;
|
video.DirectoryPath = newDirectory;
|
||||||
}
|
}
|
||||||
@@ -110,22 +118,23 @@ namespace VDownload.Core.ViewModels.Home
|
|||||||
[RelayCommand]
|
[RelayCommand]
|
||||||
public void RemoveVideo(VideoViewModel video)
|
public void RemoveVideo(VideoViewModel video)
|
||||||
{
|
{
|
||||||
_allVideos[video] = true;
|
Videos[video] = false;
|
||||||
|
|
||||||
Videos.Remove(video);
|
_removedVideos.Add(video);
|
||||||
|
|
||||||
RemovedCount = _allVideos.Where(x => x.Value).Count();
|
UpdateCounters();
|
||||||
}
|
}
|
||||||
|
|
||||||
[RelayCommand]
|
[RelayCommand]
|
||||||
public void RestoreRemovedVideos()
|
public void RestoreRemovedVideos()
|
||||||
{
|
{
|
||||||
foreach(VideoViewModel video in _allVideos.Where(x => x.Value == true).Select(x => x.Key))
|
foreach(VideoViewModel video in _removedVideos)
|
||||||
{
|
{
|
||||||
_allVideos[video] = false;
|
Videos[video] = true;
|
||||||
Videos.Add(video);
|
|
||||||
}
|
}
|
||||||
RemovedCount = _allVideos.Where(x => x.Value).Count();
|
_removedVideos.Clear();
|
||||||
|
|
||||||
|
UpdateCounters();
|
||||||
}
|
}
|
||||||
|
|
||||||
[RelayCommand]
|
[RelayCommand]
|
||||||
@@ -142,7 +151,7 @@ namespace VDownload.Core.ViewModels.Home
|
|||||||
|
|
||||||
protected void CreateTasks(bool download)
|
protected void CreateTasks(bool download)
|
||||||
{
|
{
|
||||||
foreach (VideoViewModel video in Videos)
|
foreach (VideoViewModel video in Videos.Keys)
|
||||||
{
|
{
|
||||||
DownloadTask task = _tasksManager.AddTask(video.Video, video.BuildDownloadOptions());
|
DownloadTask task = _tasksManager.AddTask(video.Video, video.BuildDownloadOptions());
|
||||||
if (download)
|
if (download)
|
||||||
@@ -153,6 +162,13 @@ namespace VDownload.Core.ViewModels.Home
|
|||||||
CloseRequested?.Invoke(this, EventArgs.Empty);
|
CloseRequested?.Invoke(this, EventArgs.Empty);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void UpdateCounters()
|
||||||
|
{
|
||||||
|
RemovedCount = _removedVideos.Count;
|
||||||
|
HiddenCount = Videos.Values.Where(x => !x).Count();
|
||||||
|
IsSomethingHidden = HiddenCount > 0;
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,8 @@
|
|||||||
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.5.240227000" />
|
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.5.240227000" />
|
||||||
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.3233" />
|
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.3233" />
|
||||||
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.2" />
|
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.2" />
|
||||||
<PackageReference Include="SimpleToolkit.UI.Models" Version="1.6.1" />
|
<PackageReference Include="SimpleToolkit.MVVM" Version="1.7.1" />
|
||||||
|
<PackageReference Include="SimpleToolkit.UI.Models" Version="1.7.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -37,7 +37,12 @@
|
|||||||
TextWrapping="WrapWholeWords"/>
|
TextWrapping="WrapWholeWords"/>
|
||||||
<StackPanel Grid.Column="1"
|
<StackPanel Grid.Column="1"
|
||||||
Orientation="Horizontal"
|
Orientation="Horizontal"
|
||||||
Margin="-5">
|
Margin="-5"
|
||||||
|
Spacing="10">
|
||||||
|
<TextBlock VerticalAlignment="Center"
|
||||||
|
Visibility="{Binding IsSomethingHidden, Converter={StaticResource BoolToVisibilityConverter}}">
|
||||||
|
<Run x:Uid="/VDownload.Core.Strings/HomePlaylistViewResources/HiddenTextBlock"/><Run Text="{Binding HiddenCount}"/>
|
||||||
|
</TextBlock>
|
||||||
<AppBarToggleButton x:Name="FilterButton"
|
<AppBarToggleButton x:Name="FilterButton"
|
||||||
Icon="Filter"
|
Icon="Filter"
|
||||||
Width="40"
|
Width="40"
|
||||||
@@ -165,7 +170,8 @@
|
|||||||
<Expander HorizontalAlignment="Stretch"
|
<Expander HorizontalAlignment="Stretch"
|
||||||
Margin="0,0,0,10"
|
Margin="0,0,0,10"
|
||||||
CornerRadius="10"
|
CornerRadius="10"
|
||||||
HorizontalContentAlignment="Stretch">
|
HorizontalContentAlignment="Stretch"
|
||||||
|
Visibility="{Binding Value, Converter={StaticResource BoolToVisibilityConverter}}">
|
||||||
<Expander.Header>
|
<Expander.Header>
|
||||||
<Grid Padding="-16,0,-16,0">
|
<Grid Padding="-16,0,-16,0">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
@@ -174,7 +180,7 @@
|
|||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Image Grid.Column="0"
|
<Image Grid.Column="0"
|
||||||
Source="{Binding ThumbnailUrl, TargetNullValue={StaticResource ImageOtherThumbnail}}"
|
Source="{Binding Key.ThumbnailUrl, TargetNullValue={StaticResource ImageOtherThumbnail}}"
|
||||||
Height="100"/>
|
Height="100"/>
|
||||||
<Grid Grid.Column="1"
|
<Grid Grid.Column="1"
|
||||||
Margin="10"
|
Margin="10"
|
||||||
@@ -185,7 +191,7 @@
|
|||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<TextBlock Grid.Row="0"
|
<TextBlock Grid.Row="0"
|
||||||
FontSize="16"
|
FontSize="16"
|
||||||
Text="{Binding Title}"
|
Text="{Binding Key.Title}"
|
||||||
FontWeight="SemiBold"
|
FontWeight="SemiBold"
|
||||||
TextTrimming="CharacterEllipsis"/>
|
TextTrimming="CharacterEllipsis"/>
|
||||||
<Grid Grid.Row="1"
|
<Grid Grid.Row="1"
|
||||||
@@ -214,7 +220,7 @@
|
|||||||
Grid.Row="0"
|
Grid.Row="0"
|
||||||
FontSize="{StaticResource FontSize}"
|
FontSize="{StaticResource FontSize}"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Text="{Binding Author}"/>
|
Text="{Binding Key.Author}"/>
|
||||||
<Image Grid.Column="0"
|
<Image Grid.Column="0"
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
@@ -224,7 +230,7 @@
|
|||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
FontSize="{StaticResource FontSize}"
|
FontSize="{StaticResource FontSize}"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Text="{Binding PublishDate}"/>
|
Text="{Binding Key.PublishDate}"/>
|
||||||
<Image Grid.Column="2"
|
<Image Grid.Column="2"
|
||||||
Grid.Row="0"
|
Grid.Row="0"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
@@ -234,7 +240,7 @@
|
|||||||
Grid.Row="0"
|
Grid.Row="0"
|
||||||
FontSize="{StaticResource FontSize}"
|
FontSize="{StaticResource FontSize}"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Text="{Binding Duration}"/>
|
Text="{Binding Key.Duration}"/>
|
||||||
<Image Grid.Column="2"
|
<Image Grid.Column="2"
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
@@ -244,7 +250,7 @@
|
|||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
FontSize="{StaticResource FontSize}"
|
FontSize="{StaticResource FontSize}"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Text="{Binding Views}"/>
|
Text="{Binding Key.Views}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
<AppBarButton Grid.Column="2"
|
<AppBarButton Grid.Column="2"
|
||||||
@@ -253,7 +259,7 @@
|
|||||||
Icon="Delete"
|
Icon="Delete"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Command="{Binding ElementName=Root, Path=DataContext.RemoveVideoCommand}"
|
Command="{Binding ElementName=Root, Path=DataContext.RemoveVideoCommand}"
|
||||||
CommandParameter="{Binding}"/>
|
CommandParameter="{Binding Key}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Expander.Header>
|
</Expander.Header>
|
||||||
<Expander.Content>
|
<Expander.Content>
|
||||||
@@ -267,8 +273,8 @@
|
|||||||
<BitmapIcon ShowAsMonochrome="False"
|
<BitmapIcon ShowAsMonochrome="False"
|
||||||
UriSource="{ThemeResource ImageHomePlaylistViewMedia}"/>
|
UriSource="{ThemeResource ImageHomePlaylistViewMedia}"/>
|
||||||
</ctc:SettingsCard.HeaderIcon>
|
</ctc:SettingsCard.HeaderIcon>
|
||||||
<ComboBox ItemsSource="{Binding Streams}"
|
<ComboBox ItemsSource="{Binding Key.Streams}"
|
||||||
SelectedItem="{Binding SelectedStream, Mode=TwoWay}"/>
|
SelectedItem="{Binding Key.SelectedStream, Mode=TwoWay}"/>
|
||||||
</ctc:SettingsCard>
|
</ctc:SettingsCard>
|
||||||
<ctc:SettingsCard x:Uid="/VDownload.Core.Strings/HomePlaylistViewResources/MediaTypeSettingsCard">
|
<ctc:SettingsCard x:Uid="/VDownload.Core.Strings/HomePlaylistViewResources/MediaTypeSettingsCard">
|
||||||
<ctc:SettingsCard.HeaderIcon>
|
<ctc:SettingsCard.HeaderIcon>
|
||||||
@@ -276,7 +282,7 @@
|
|||||||
UriSource="{ThemeResource ImageHomePlaylistViewMedia}"/>
|
UriSource="{ThemeResource ImageHomePlaylistViewMedia}"/>
|
||||||
</ctc:SettingsCard.HeaderIcon>
|
</ctc:SettingsCard.HeaderIcon>
|
||||||
<ComboBox ItemsSource="{ct:EnumValues Type=m:MediaType}"
|
<ComboBox ItemsSource="{ct:EnumValues Type=m:MediaType}"
|
||||||
SelectedItem="{Binding MediaType, Mode=TwoWay}">
|
SelectedItem="{Binding Key.MediaType, Mode=TwoWay}">
|
||||||
<ComboBox.ItemTemplate>
|
<ComboBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<ctuc:SwitchPresenter Value="{Binding Converter={StaticResource ObjectToStringConverter}}">
|
<ctuc:SwitchPresenter Value="{Binding Converter={StaticResource ObjectToStringConverter}}">
|
||||||
@@ -301,13 +307,13 @@
|
|||||||
</ctc:SettingsExpander.HeaderIcon>
|
</ctc:SettingsExpander.HeaderIcon>
|
||||||
<ctc:SettingsExpander.Items>
|
<ctc:SettingsExpander.Items>
|
||||||
<ctc:SettingsCard x:Uid="/VDownload.Core.Strings/HomePlaylistViewResources/TrimStartSettingsCard">
|
<ctc:SettingsCard x:Uid="/VDownload.Core.Strings/HomePlaylistViewResources/TrimStartSettingsCard">
|
||||||
<c:TimeSpanControl Value="{Binding TrimStart, Mode=TwoWay}"
|
<c:TimeSpanControl Value="{Binding Key.TrimStart, Mode=TwoWay}"
|
||||||
Maximum="{Binding TrimEnd, Mode=OneWay}"/>
|
Maximum="{Binding Key.TrimEnd, Mode=OneWay}"/>
|
||||||
</ctc:SettingsCard>
|
</ctc:SettingsCard>
|
||||||
<ctc:SettingsCard x:Uid="/VDownload.Core.Strings/HomePlaylistViewResources/TrimEndSettingsCard">
|
<ctc:SettingsCard x:Uid="/VDownload.Core.Strings/HomePlaylistViewResources/TrimEndSettingsCard">
|
||||||
<c:TimeSpanControl Minimum="{Binding TrimStart, Mode=OneWay}"
|
<c:TimeSpanControl Minimum="{Binding Key.TrimStart, Mode=OneWay}"
|
||||||
Value="{Binding TrimEnd, Mode=TwoWay}"
|
Value="{Binding Key.TrimEnd, Mode=TwoWay}"
|
||||||
Maximum="{Binding Duration, Mode=OneWay}"/>
|
Maximum="{Binding Key.Duration, Mode=OneWay}"/>
|
||||||
</ctc:SettingsCard>
|
</ctc:SettingsCard>
|
||||||
</ctc:SettingsExpander.Items>
|
</ctc:SettingsExpander.Items>
|
||||||
</ctc:SettingsExpander>
|
</ctc:SettingsExpander>
|
||||||
@@ -317,20 +323,20 @@
|
|||||||
FontWeight="Bold"
|
FontWeight="Bold"
|
||||||
FontSize="15"/>
|
FontSize="15"/>
|
||||||
<ctc:SettingsCard x:Uid="/VDownload.Core.Strings/HomePlaylistViewResources/DirectorySettingsCard"
|
<ctc:SettingsCard x:Uid="/VDownload.Core.Strings/HomePlaylistViewResources/DirectorySettingsCard"
|
||||||
Description="{Binding DirectoryPath}">
|
Description="{Binding Key.DirectoryPath}">
|
||||||
<ctc:SettingsCard.HeaderIcon>
|
<ctc:SettingsCard.HeaderIcon>
|
||||||
<BitmapIcon ShowAsMonochrome="False"
|
<BitmapIcon ShowAsMonochrome="False"
|
||||||
UriSource="{ThemeResource ImageHomePlaylistViewDirectory}"/>
|
UriSource="{ThemeResource ImageHomePlaylistViewDirectory}"/>
|
||||||
</ctc:SettingsCard.HeaderIcon>
|
</ctc:SettingsCard.HeaderIcon>
|
||||||
<Button x:Uid="/VDownload.Core.Strings/HomePlaylistViewResources/DirectorySettingsCardButton"
|
<Button x:Uid="/VDownload.Core.Strings/HomePlaylistViewResources/DirectorySettingsCardButton"
|
||||||
Command="{Binding BrowseCommand}"/>
|
Command="{Binding Key.BrowseCommand}"/>
|
||||||
</ctc:SettingsCard>
|
</ctc:SettingsCard>
|
||||||
<ctc:SettingsCard x:Uid="/VDownload.Core.Strings/HomePlaylistViewResources/FilenameSettingsCard">
|
<ctc:SettingsCard x:Uid="/VDownload.Core.Strings/HomePlaylistViewResources/FilenameSettingsCard">
|
||||||
<ctc:SettingsCard.HeaderIcon>
|
<ctc:SettingsCard.HeaderIcon>
|
||||||
<BitmapIcon ShowAsMonochrome="False"
|
<BitmapIcon ShowAsMonochrome="False"
|
||||||
UriSource="{ThemeResource ImageHomePlaylistViewFilename}"/>
|
UriSource="{ThemeResource ImageHomePlaylistViewFilename}"/>
|
||||||
</ctc:SettingsCard.HeaderIcon>
|
</ctc:SettingsCard.HeaderIcon>
|
||||||
<TextBox Text="{Binding Filename, Mode=TwoWay}"/>
|
<TextBox Text="{Binding Key.Filename, Mode=TwoWay}"/>
|
||||||
</ctc:SettingsCard>
|
</ctc:SettingsCard>
|
||||||
<ctc:SettingsCard x:Uid="/VDownload.Core.Strings/HomePlaylistViewResources/FileTypeSettingsCard">
|
<ctc:SettingsCard x:Uid="/VDownload.Core.Strings/HomePlaylistViewResources/FileTypeSettingsCard">
|
||||||
<ctc:SettingsCard.HeaderIcon>
|
<ctc:SettingsCard.HeaderIcon>
|
||||||
@@ -338,13 +344,13 @@
|
|||||||
UriSource="{ThemeResource ImageHomePlaylistViewExtension}"/>
|
UriSource="{ThemeResource ImageHomePlaylistViewExtension}"/>
|
||||||
</ctc:SettingsCard.HeaderIcon>
|
</ctc:SettingsCard.HeaderIcon>
|
||||||
<i:Interaction.Behaviors>
|
<i:Interaction.Behaviors>
|
||||||
<ic:DataTriggerBehavior Binding="{Binding MediaType, Converter={StaticResource ObjectToStringConverter}}"
|
<ic:DataTriggerBehavior Binding="{Binding Key.MediaType, Converter={StaticResource ObjectToStringConverter}}"
|
||||||
ComparisonCondition="Equal"
|
ComparisonCondition="Equal"
|
||||||
Value="OnlyAudio">
|
Value="OnlyAudio">
|
||||||
<ic:ChangePropertyAction PropertyName="Content">
|
<ic:ChangePropertyAction PropertyName="Content">
|
||||||
<ic:ChangePropertyAction.Value>
|
<ic:ChangePropertyAction.Value>
|
||||||
<ComboBox ItemsSource="{ct:EnumValues Type=m:AudioExtension}"
|
<ComboBox ItemsSource="{ct:EnumValues Type=m:AudioExtension}"
|
||||||
SelectedItem="{Binding AudioExtension, Mode=TwoWay}">
|
SelectedItem="{Binding Key.AudioExtension, Mode=TwoWay}">
|
||||||
<ComboBox.ItemTemplate>
|
<ComboBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<TextBlock Text="{Binding}"/>
|
<TextBlock Text="{Binding}"/>
|
||||||
@@ -354,13 +360,13 @@
|
|||||||
</ic:ChangePropertyAction.Value>
|
</ic:ChangePropertyAction.Value>
|
||||||
</ic:ChangePropertyAction>
|
</ic:ChangePropertyAction>
|
||||||
</ic:DataTriggerBehavior>
|
</ic:DataTriggerBehavior>
|
||||||
<ic:DataTriggerBehavior Binding="{Binding MediaType, Converter={StaticResource ObjectToStringConverter}}"
|
<ic:DataTriggerBehavior Binding="{Binding Key.MediaType, Converter={StaticResource ObjectToStringConverter}}"
|
||||||
ComparisonCondition="NotEqual"
|
ComparisonCondition="NotEqual"
|
||||||
Value="OnlyAudio">
|
Value="OnlyAudio">
|
||||||
<ic:ChangePropertyAction PropertyName="Content">
|
<ic:ChangePropertyAction PropertyName="Content">
|
||||||
<ic:ChangePropertyAction.Value>
|
<ic:ChangePropertyAction.Value>
|
||||||
<ComboBox ItemsSource="{ct:EnumValues Type=m:VideoExtension}"
|
<ComboBox ItemsSource="{ct:EnumValues Type=m:VideoExtension}"
|
||||||
SelectedItem="{Binding VideoExtension, Mode=TwoWay}">
|
SelectedItem="{Binding Key.VideoExtension, Mode=TwoWay}">
|
||||||
<ComboBox.ItemTemplate>
|
<ComboBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<TextBlock Text="{Binding}"/>
|
<TextBlock Text="{Binding}"/>
|
||||||
|
|||||||
@@ -21,8 +21,8 @@
|
|||||||
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.5.240227000" />
|
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.5.240227000" />
|
||||||
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.3233" />
|
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.3233" />
|
||||||
<PackageReference Include="Microsoft.Xaml.Behaviors.WinUI.Managed" Version="2.0.9" />
|
<PackageReference Include="Microsoft.Xaml.Behaviors.WinUI.Managed" Version="2.0.9" />
|
||||||
<PackageReference Include="SimpleToolkit.UI.WinUI.Behaviors" Version="1.6.1" />
|
<PackageReference Include="SimpleToolkit.UI.WinUI.Behaviors" Version="1.7.1" />
|
||||||
<PackageReference Include="SimpleToolkit.UI.WinUI.Controls" Version="1.6.1" />
|
<PackageReference Include="SimpleToolkit.UI.WinUI.Controls" Version="1.7.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -155,7 +155,7 @@
|
|||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
|
||||||
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.5.240227000" />
|
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.5.240227000" />
|
||||||
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.3233" />
|
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.3233" />
|
||||||
<PackageReference Include="SimpleToolkit.UI.WinUI.Converters" Version="1.6.1" />
|
<PackageReference Include="SimpleToolkit.UI.WinUI.Converters" Version="1.7.1" />
|
||||||
<Manifest Include="$(ApplicationManifest)" />
|
<Manifest Include="$(ApplicationManifest)" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user