ContextMenu - TextBox inside a DataForm

2 posts, 0 answers
  1. Felipe
    Felipe avatar
    1 posts
    Member since:
    Dec 2012

    Posted 12 Nov 2014 Link to this post

    Hello!

    I have problems whit ContextMenu inside a TextBox but, when I use the textbox inside a DataFormDataField the items doesn´t appears, just appears "Copy, Paste, Cut", the Textbox whit the contextmenu works perfect when is outside a DataForm, any idea?

    Thanks in adnvace

    Here some code:

    <Grid>
            <Grid.Resources>
                <ResourceDictionary>
                    <ResourceDictionary.MergedDictionaries>
                        <ResourceDictionary Source="Styles.xaml"/>
                    </ResourceDictionary.MergedDictionaries>
                </ResourceDictionary>
            </Grid.Resources>
           <telerik:RadDataForm x:Name="DataForm">
                <telerik:RadDataForm.ReadOnlyTemplate>
                    <DataTemplate>
                    <TextBox x:Name="textBox"
             Width="200" ContextMenu="{x:Null}"
             VerticalAlignment="Top" Margin="141,125,176,0">
                        <telerik:RadContextMenu.ContextMenu>
                            <telerik:RadContextMenu x:Name="ContextMenuHugo" ItemContainerStyle="{StaticResource MenuItemContainer}" Opening="ContextMenuHugo_OnOpening">
                                                       
                            </telerik:RadContextMenu>
                        </telerik:RadContextMenu.ContextMenu>
             
            </TextBox>
            </DataTemplate>
            </telerik:RadDataForm.ReadOnlyTemplate>
            </telerik:RadDataForm>
            <TextBox x:Name="textBox"
             Width="200" ContextMenu="{x:Null}"
             VerticalAlignment="Top" Margin="141,125,176,0">
                <telerik:RadContextMenu.ContextMenu>
                    <telerik:RadContextMenu x:Name="ContextMenuHugo" ItemContainerStyle="{StaticResource MenuItemContainer}"
                                                    >
     
                    </telerik:RadContextMenu>
                </telerik:RadContextMenu.ContextMenu>
     
            </TextBox>
        </Grid>

    Cheers
  2. Boris
    Admin
    Boris avatar
    276 posts

    Posted 14 Nov 2014 Link to this post

    Hi Felipe,

    In order to avoid double posting, I would like to kindly ask you to keep any further communication in the ContextMenu on DataForm forum thread, which is similar to this one.

    Regards,
    Boris
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top