mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Fix PageNubmerDisplay
This commit is contained in:
parent
ff7b986e41
commit
0cf7fa7c17
2 changed files with 7 additions and 2 deletions
|
|
@ -109,7 +109,7 @@
|
|||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="14"
|
||||
Text="1/5"
|
||||
Text="{Binding PageDisplay, Mode=OneWay, UpdateSourceTrigger=PropertyChanged, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}"
|
||||
TextAlignment="Center" />
|
||||
</StackPanel>
|
||||
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ namespace Flow.Launcher
|
|||
InitializeComponent();
|
||||
BackButton.IsEnabled = false;
|
||||
this.settings = settings;
|
||||
|
||||
pages = new()
|
||||
{
|
||||
new WelcomePage1(settings),
|
||||
|
|
@ -38,11 +39,16 @@ namespace Flow.Launcher
|
|||
};
|
||||
ContentFrame.Navigate(pages[0]);
|
||||
}
|
||||
|
||||
private int page;
|
||||
private int pageNum = 1;
|
||||
private int MaxPage = 5;
|
||||
public string PageDisplay => $"{pageNum}/5";
|
||||
|
||||
private void UpdateView()
|
||||
{
|
||||
pageNum = page + 1;
|
||||
PageNavigation.Text = PageDisplay;
|
||||
if (page == 0)
|
||||
{
|
||||
BackButton.IsEnabled = false;
|
||||
|
|
@ -84,7 +90,6 @@ namespace Flow.Launcher
|
|||
}
|
||||
}
|
||||
|
||||
public string PageDisplay => $"{page}/5";
|
||||
private void BtnCancel_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Close();
|
||||
|
|
|
|||
Loading…
Reference in a new issue