Hello @Md. Niaz Mahmud Welcome to Microsoft Q&A,
How to remove shadow of ContentDialog in UWP?
Please check Z-depth and shadow document.
ThemeShadow automatically casts shadows when applied to any XAML element in a Popup. It will cast shadows on the app background content behind it and any other open Popups below it.
If you want to disable it, the better way is that set Container
a new Translation
in loaded event, and make z value as low enough.
For example: (place the style of ContentDialog in the page resource and give it new Key MyContentDialog
).
var diaog = new ContentDialog() { Title = "hello world!",Style= (Style)Resources["MyContentDialog"] ,SecondaryButtonText="ok"};
await diaog.ShowAsync();
Set the new Translation.
private void Container_Loaded(object sender, RoutedEventArgs e)
{
var border = sender as Border;
border.Translation += new Vector3(0, 0, -100);
}
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.