Has any one tried to use the HasShadow property on a Frame?

Lloyd Sheen 1,351 Reputation points
2022-10-04T15:02:26.717+00:00

If it works it is very subtle as I can see no difference from True to False.

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
2,747 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Rob Caplan - MSFT 5,407 Reputation points Microsoft Employee
    2022-10-04T23:10:42.177+00:00

    Please provide full details on what you are doing, including versions of VS, MAUI, and your target platform, exact steps, expected behavior, and how the actual behavior differs from the expected behavior.

    HasShadow works fine for me in a trivial addition of a Frame around the standard template app objects on Maui 7.0.00rc.1.6683 targeting both Android 33 and MacCatalyst 12.6. The results are more dramatic for MacCatalyst than for Android, but visible in both. You may be running into a more complicated edge case, but have not provided sufficient details to delve farther, and I don't see anything obvious at https://github.com/dotnet/maui/issues?q=is%3Aissue+is%3Aopen+HasShadow

    If you want more control of the shadow you can use the recommended Border class and Shadow properties. See the Note in the Frame documentation

    The Frame class existed in Xamarin.Forms and is present in .NET MAUI for users who are migrating their apps from Xamarin.Forms to .NET MAUI. If you're building a new .NET MAUI app it's recommended to use Border instead, and to set shadows using the Shadow bindable property on VisualElement. For more information, see Border and Shadow.

    247576-screen-shot-2022-10-04-at-102207-am.png

    0 comments No comments