remove workaround from old wpfui
This commit is contained in:
parent
02e92e782f
commit
a601b8937c
3 changed files with 2 additions and 16 deletions
|
@ -11,7 +11,7 @@
|
|||
ExtendsContentIntoTitleBar="True"
|
||||
WindowBackdropType="Mica"
|
||||
|
||||
Title="EnvyUpdate" MinHeight="500" Height="500" MinWidth="600" Width="600" Icon="icon.ico" StateChanged="Window_StateChanged" Closing="Window_Closing" ResizeMode="CanMinimize" Activated="UiWindow_Activated" WindowStyle="None">
|
||||
Title="EnvyUpdate" MinHeight="500" Height="500" MinWidth="600" Width="600" Icon="icon.ico" StateChanged="Window_StateChanged" Closing="Window_Closing" ResizeMode="CanMinimize" WindowStyle="None">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
|
|
|
@ -106,20 +106,6 @@ namespace EnvyUpdate
|
|||
Application.Current.Shutdown();
|
||||
}
|
||||
|
||||
private void UiWindow_Activated(object sender, EventArgs e)
|
||||
{
|
||||
// This is a workaround for a bug (?) in the UI library, which causes the nav to not load the first item on startup.
|
||||
// Without this, the nav attempts to navigate before the window is shown, which doesn't work.
|
||||
try
|
||||
{
|
||||
var test = RootNavigation.Current.PageType;
|
||||
}
|
||||
catch (NullReferenceException)
|
||||
{
|
||||
RootNavigation.Navigate(0);
|
||||
}
|
||||
}
|
||||
|
||||
private void AdjustTheme(object sender = null, UserPreferenceChangedEventArgs e = null)
|
||||
{
|
||||
if (Util.IsDarkTheme())
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
<Expander Margin="0,4,0,0" Header="WPF-UI">
|
||||
<TextBox x:Name="textBoxLicWpfui" IsReadOnly="True" TextWrapping="Wrap"/>
|
||||
</Expander>
|
||||
<Expander Margin="0,4,0,0" Header="WPF-UI">
|
||||
<Expander Margin="0,4,0,0" Header="7-Zip">
|
||||
<TextBox x:Name="textBoxLic7zip" IsReadOnly="True" TextWrapping="Wrap"/>
|
||||
</Expander>
|
||||
</StackPanel>
|
||||
|
|
Reference in a new issue