mirror of
https://github.com/jayfunc/BetterLyrics.git
synced 2026-01-12 19:24:55 +08:00
fix: use x:Bind to prevent properties get function got lost after compiling
This commit is contained in:
@@ -32,4 +32,4 @@ namespace BetterLyrics.WinUI3.Models
|
||||
FilterValue = filterValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -92,18 +92,11 @@
|
||||
</Flyout>
|
||||
</Grid.Tag>
|
||||
|
||||
<ListView
|
||||
<Pivot
|
||||
VerticalAlignment="Top"
|
||||
ItemsSource="{x:Bind ViewModel.SongsTabInfoList, Mode=OneWay}"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Auto"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Disabled"
|
||||
SelectedIndex="{x:Bind ViewModel.SelectedSongsTabInfoIndex, Mode=TwoWay}">
|
||||
<ListView.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<ItemsStackPanel Orientation="Horizontal" />
|
||||
</ItemsPanelTemplate>
|
||||
</ListView.ItemsPanel>
|
||||
<ListView.ItemTemplate>
|
||||
<Pivot.HeaderTemplate>
|
||||
<DataTemplate x:DataType="models:SongsTabInfo">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
@@ -123,11 +116,12 @@
|
||||
Grid.Column="0"
|
||||
FontFamily="{StaticResource IconFontFamily}"
|
||||
FontSize="16"
|
||||
Glyph="{Binding Icon}" />
|
||||
Glyph="{x:Bind Icon}" />
|
||||
<TextBlock
|
||||
Grid.Column="1"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding Name}" />
|
||||
Style="{StaticResource BodyTextBlockStyle}"
|
||||
Text="{x:Bind Name}" />
|
||||
</Grid>
|
||||
<Button
|
||||
Grid.Column="1"
|
||||
@@ -137,13 +131,16 @@
|
||||
Glyph=}"
|
||||
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
||||
Style="{StaticResource GhostButtonStyle}"
|
||||
Visibility="{Binding IsClosable, Converter={StaticResource BoolToVisibilityConverter}}" />
|
||||
Visibility="{x:Bind IsClosable, Converter={StaticResource BoolToVisibilityConverter}}" />
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListView.ItemTemplate>
|
||||
</ListView>
|
||||
</Pivot.HeaderTemplate>
|
||||
<Pivot.ItemTemplate>
|
||||
<DataTemplate />
|
||||
</Pivot.ItemTemplate>
|
||||
</Pivot>
|
||||
|
||||
<Grid Margin="0,48,0,0" VerticalAlignment="Top">
|
||||
<Grid Margin="0,56,0,0" VerticalAlignment="Top">
|
||||
<AutoSuggestBox
|
||||
x:Name="SongSearchBox"
|
||||
x:Uid="MusicGalleryPageSongSearchBox"
|
||||
@@ -156,7 +153,7 @@
|
||||
<StackPanel
|
||||
HorizontalAlignment="Left"
|
||||
Orientation="Horizontal"
|
||||
Spacing="12">
|
||||
Spacing="6">
|
||||
<ToggleButton
|
||||
x:Name="SelectAllToggleButton"
|
||||
x:Uid="MusicGalleryPageSelectAll"
|
||||
@@ -181,7 +178,7 @@
|
||||
<StackPanel
|
||||
HorizontalAlignment="Right"
|
||||
Orientation="Horizontal"
|
||||
Spacing="12">
|
||||
Spacing="6">
|
||||
<StackPanel Orientation="Horizontal" Spacing="12">
|
||||
<TextBlock
|
||||
x:Uid="MusicGalleryPageSortType"
|
||||
@@ -320,7 +317,7 @@
|
||||
Grid.Column="1"
|
||||
Margin="0,0,12,0">
|
||||
|
||||
<StackPanel Margin="0,10,0,0" Spacing="12">
|
||||
<StackPanel Margin="0,10,0,0" Spacing="6">
|
||||
<Grid Margin="0,6,0,0" VerticalAlignment="Top">
|
||||
<TextBlock x:Uid="MusicGalleryPagePlayingQueue" Style="{StaticResource BodyStrongTextBlockStyle}" />
|
||||
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
|
||||
@@ -329,7 +326,7 @@
|
||||
<TextBlock Foreground="{ThemeResource TextFillColorSecondaryBrush}" Text="{x:Bind ViewModel.TrackPlayingQueue.Count, Mode=OneWay}" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
<StackPanel Orientation="Horizontal" Spacing="12">
|
||||
<StackPanel Orientation="Horizontal" Spacing="6">
|
||||
<Button x:Uid="MusicGalleryPageEmptyPlayingQueue" Click="EmptyPlayingQueueButton_Click" />
|
||||
<Button x:Uid="MusicGalleryPageScrollToPlayingItem" Click="ScrollToPlayingItemButton_Click" />
|
||||
</StackPanel>
|
||||
|
||||
@@ -10,9 +10,11 @@
|
||||
mc:Ignorable="d">
|
||||
|
||||
<Window.SystemBackdrop>
|
||||
<MicaBackdrop />
|
||||
<DesktopAcrylicBackdrop />
|
||||
</Window.SystemBackdrop>
|
||||
|
||||
<local:MusicGalleryPage />
|
||||
<Grid>
|
||||
<local:MusicGalleryPage />
|
||||
</Grid>
|
||||
|
||||
</Window>
|
||||
|
||||
Reference in New Issue
Block a user