Mohammed Rameez
asked on 21 Aug 2023, 11:44 AM
| edited on 23 Aug 2023, 05:03 AM
Hi Telerik,
I trying to run my app in windows, and observe that the Telerik RadSlideDrawer is not opening, to view the content, whereas the same code works fine in Android.
Hi Rameez, thank you for the screenshots. Something doesn't make 100% sense here and I'd like to ask you to provide some additional clarification.
WinUI code vs .NET MAUI Code
The code in that screenshot looks like it is Telerik UI for WinUI (WinUI 3 native code), and you initially opened this forum post in the Telerik UI for WinUI forums.... but you mention this is a .NET MAUI project.
Are you building custom controls for each platform through custom .NET MAUI Native Embedding? Or are these custom .NET MAUI Handers that you're passing down dynamically loaded Windows-only XAML?
The reason I ask this is because that code you've shared is only valid for WinUI3-only project XAML... it has no place in a normal .NET MAUI XAML ContentPage/View. If you want to define a RadSideDrawer in a .NET MAUI XAML page, then it would look like this:
The "primitives" namespace is a very old naming scheme in .NET MAUI XAML, and is what makes me think you're attempting to use WinUI3 XAML. However, if your code is truly .NET MAUI XAML, it means you're using a version that is too old or are trying to use a new version with old code. Please update to the latest version and use the above example's exact code, including the xmlns.
Alternatively, if you are indeed using Telerik UI for WinUI directly and are building a custom .NET MAUI Handler or using .NET MAUI Native Embedding, please put together a sample project demonstrating the problem, or update my attached demo, to replicate your problem.
We typically do not assist with such topics, but if you can open a Support Ticket and provide a small test project that replicates the issue within the context of an embedded implementation, I will ask the developers to take a look.
From the provided xaml, the drawer is in a ContentPage, not in a ContentView. And from the namespaces, the project is .NET MAUI.
Did you test the project Lance provided? Is it working on your side? If no send us a video of the behavior. If the project works, then compare it with your original app and update the test project with the exact setup you have, then send the project back to us for further research.
Hi Rameez, thank you for the screenshots. Something doesn't make 100% sense here and I'd like to ask you to provide some additional clarification.
WinUI code vs .NET MAUI Code
The code in that screenshot looks like it is Telerik UI for WinUI (WinUI 3 native code), and you initially opened this forum post in the Telerik UI for WinUI forums.... but you mention this is a .NET MAUI project.
Are you building custom controls for each platform through custom .NET MAUI Native Embedding? Or are these custom .NET MAUI Handers that you're passing down dynamically loaded Windows-only XAML?
The reason I ask this is because that code you've shared is only valid for WinUI3-only project XAML... it has no place in a normal .NET MAUI XAML ContentPage/View. If you want to define a RadSideDrawer in a .NET MAUI XAML page, then it would look like this:
<ContentPage xmlns:telerik="http://schemas.telerik.com/2022/xaml/maui" ... > <telerik:RadSideDrawer x:Name="drawer" DrawerLength="200" IsOpen="True"> <telerik:RadSideDrawer.MainContent> <Grid> <Label Text="Main content" /> </Grid> </telerik:RadSideDrawer.MainContent> <telerik:RadSideDrawer.DrawerContent> <VerticalStackLayout Spacing="10"> <Label Text="Drawer content" /> </VerticalStackLayout> </telerik:RadSideDrawer.DrawerContent> </telerik:RadSideDrawer> </ContentPage>
The "primitives" namespace is a very old naming scheme in .NET MAUI XAML, and is what makes me think you're attempting to use WinUI3 XAML. However, if your code is truly .NET MAUI XAML, it means you're using a version that is too old or are trying to use a new version with old code. Please update to the latest version and use the above example's exact code, including the xmlns.
Demo
I have attached a demo for you to reference, it is working on Windows. Please also take a moment to visit the official docs to learn more => .NET MAUI SideDrawer Documentation - Getting Started - Telerik UI for .NET MAUI.
Here's what it looks like at runtime:
WinUI3-Only: Assistance with Custom Controls
Alternatively, if you are indeed using Telerik UI for WinUI directly and are building a custom .NET MAUI Handler or using .NET MAUI Native Embedding, please put together a sample project demonstrating the problem, or update my attached demo, to replicate your problem.
We typically do not assist with such topics, but if you can open a Support Ticket and provide a small test project that replicates the issue within the context of an embedded implementation, I will ask the developers to take a look.
Hi Lance,
Thanks for the reply.
Below is the complete code of the ContentView:
Thanks,
Mohammed Rameez Raza (Rameez).
Hi Rameez,
From the provided xaml, the drawer is in a ContentPage, not in a ContentView. And from the namespaces, the project is .NET MAUI.
Did you test the project Lance provided? Is it working on your side? If no send us a video of the behavior. If the project works, then compare it with your original app and update the test project with the exact setup you have, then send the project back to us for further research.