One more fix for dialogs.
This commit is contained in:
@@ -13,6 +13,16 @@
|
||||
<EnableMsixTooling>true</EnableMsixTooling>
|
||||
<WindowsSdkPackageVersion>10.0.19041.35-preview</WindowsSdkPackageVersion>
|
||||
<GenerateTemporaryStoreCertificate>True</GenerateTemporaryStoreCertificate>
|
||||
<GenerateAppInstallerFile>False</GenerateAppInstallerFile>
|
||||
<AppxPackageSigningEnabled>False</AppxPackageSigningEnabled>
|
||||
<AppxPackageSigningTimestampDigestAlgorithm>SHA256</AppxPackageSigningTimestampDigestAlgorithm>
|
||||
<AppxAutoIncrementPackageRevision>False</AppxAutoIncrementPackageRevision>
|
||||
<AppxPackageDir>C:\Users\bkaan\Desktop\Packages\WinUI\</AppxPackageDir>
|
||||
<AppxSymbolPackageEnabled>True</AppxSymbolPackageEnabled>
|
||||
<GenerateTestArtifacts>True</GenerateTestArtifacts>
|
||||
<AppxBundle>Always</AppxBundle>
|
||||
<AppxBundlePlatforms>x86|x64|arm64</AppxBundlePlatforms>
|
||||
<HoursBetweenUpdateChecks>0</HoursBetweenUpdateChecks>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<None Remove="AppThemes\Custom.xaml" />
|
||||
|
||||
@@ -56,19 +56,19 @@ namespace Wino.Services
|
||||
RequestedTheme = _themeService.RootTheme.ToWindowsElementTheme()
|
||||
};
|
||||
|
||||
#if NET8_0
|
||||
AssignXamlRoot(dialog);
|
||||
#endif
|
||||
|
||||
await HandleDialogPresentation(() => dialog.ShowDialogAsync(title, message));
|
||||
}
|
||||
|
||||
private void AssignXamlRoot(ContentDialog dialog)
|
||||
{
|
||||
#if NET8_0
|
||||
if (ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 8))
|
||||
{
|
||||
dialog.XamlRoot = (_appShellService.AppWindow.Content).XamlRoot;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -82,9 +82,8 @@ namespace Wino.Services
|
||||
|
||||
try
|
||||
{
|
||||
#if NET8_0
|
||||
AssignXamlRoot(dialog);
|
||||
#endif
|
||||
|
||||
return await dialog.ShowAsync();
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -131,6 +130,8 @@ namespace Wino.Services
|
||||
RequestedTheme = _themeService.RootTheme.ToWindowsElementTheme()
|
||||
};
|
||||
|
||||
AssignXamlRoot(dialog);
|
||||
|
||||
return await HandleDialogPresentation(() => dialog.ShowDialogAsync(title, question, confirmationButtonTitle));
|
||||
}
|
||||
|
||||
@@ -166,6 +167,8 @@ namespace Wino.Services
|
||||
};
|
||||
}
|
||||
|
||||
AssignXamlRoot(dialog as ContentDialog);
|
||||
|
||||
return dialog;
|
||||
}
|
||||
|
||||
@@ -360,6 +363,7 @@ namespace Wino.Services
|
||||
public async Task<AccountSignature> ShowSignatureEditorDialog(AccountSignature signatureModel = null)
|
||||
{
|
||||
SignatureEditorDialog signatureEditorDialog;
|
||||
|
||||
if (signatureModel != null)
|
||||
{
|
||||
signatureEditorDialog = new SignatureEditorDialog(signatureModel)
|
||||
|
||||
Reference in New Issue
Block a user