AutoComplete doesn't show TextBox paste menu on right click nor allow MenuFlyout customization

Right clicking on the AutoComplete control should show the default context menu providing Paste option and icon etc like any other TextBox.

In addition I tried below which compiled but didn't do anything:


<editors:SfAutoComplete.ContextFlyout>
    <MenuFlyout>
        <MenuFlyoutItem Text="Paste"
                        Command="{x:Bind ViewModel.PasteCommand}"
                         />
    </MenuFlyout>
</editors:SfAutoComplete.ContextFlyout>

3 Replies

SN Sudharsan Narayanan Syncfusion Team June 30, 2025 10:03 AM UTC

Hi Conor Dockry,

We have checked the reported issue from our end. For internal purpose, we have restricted the context menu in AutoComplete control. So, we suggest you to use below workaround solution to enable the default context menu or you can use the customization context menu. Please find the code snippet and attached sample below.

Default ContextMenu:
In AutoComplete loaded, we have enabled the content menu opening event to use default context menu.

XAML:

<sync:SfAutoComplete x:Name="auto" PlaceholderText="SfAutoComplete" Width="300" Loaded="SfAutoComplete_Loaded"/>


C#:
private void SfAutoComplete_Loaded(object sender, RoutedEventArgs e)

{

    var txtbox = auto.FindDescendant<TextBox>();

    txtbox.ContextMenuOpening += (s, args) =>

    {

        args.Handled = false;

    };

}


To customize Context menu:

XAML:

<StackPanel.Resources>

    <MenuFlyout x:Key="CustomTextBoxFlyout">

        <MenuFlyoutItem Text="Cut" />

        <MenuFlyoutItem Text="Copy" />

        <MenuFlyoutItem Text="Paste" />

    </MenuFlyout>

</StackPanel.Resources>

<sync:SfAutoComplete x:Name="auto" PlaceholderText="SfAuto" Width="300" Loaded="SfAutoComplete_Loaded">

    <sync:SfAutoComplete.TextBoxStyle>

        <Style TargetType="TextBox">

            <Setter Property="ContextFlyout" Value="{StaticResource CustomTextBoxFlyout}" />

        </Style>

    </sync:SfAutoComplete.TextBoxStyle>

</sync:SfAutoComplete>

C#:
private void SfAutoComplete_Loaded(object sender, RoutedEventArgs e)

{

    var txtbox = auto.FindDescendant<TextBox>();

    txtbox.ContextMenuOpening += (s, args) =>

    {

        args.Handled = false;

    };

}


Please check the above solution. If we have misunderstood your query or if you have additional details or a modified sample, kindly share them with us. This will help us provide a more accurate and prompt solution.

Regards,

Sudharsan


Attachment: AutoCompletePaste_bbd6f795.zip


CF Christmas Fantasy September 10, 2025 04:18 PM UTC

SyncFusion's controls since we have a license. I'm able to generate our PDF file already, but I couldn't find a way to show it to the user 



BS Bharathi Selvam Syncfusion Team September 12, 2025 12:53 PM UTC

Hi Conor Dockry,

Thank you for reaching out. You can display the PDF using the .NET MAUI PDF Viewer, which supports integration into a WinUI application. To get started, please refer to the user guide for Getting Started with .NET MAUI PDF Viewer , which provides step-by-step instructions. Additionally, you can check out the knowledge base article How to integrate .NET MAUI PDF viewer with a native WinUI application?  for detailed guidance on integrating it into your WinUI project.

Let us know if you need any further assistance.

Regards,
Bharathi S


Loader.
Up arrow icon