hi telerik,
I have implemented a context menu in my project, its working but with some limitation and bugs.
When my view loaded at that time, on first right click in schedulerView context menu is not opened. After that it will open the context menu and on every next click its working fine. Just problem with first time load. This is the very big problem for me.
As I had test it more I found that when I go from one Viewmode(Day,week,month) to another at that time same problem arise.
One thing which is something problematic for me. When I right click on appointment at that time new appointment is also enabled. I think it should be disabled.(See Image-1).
In my application I done following thing in XAML
<telerik:RadContextMenu.ContextMenu>
<telerik:RadContextMenu IsOpen="{Binding IsContextMenuOpen, Mode=TwoWay}" >
<telerik:RadMenuItem Header="New Reservation..." CommandTarget="{Binding Menu.UIElement, RelativeSource={RelativeSource Self}}"
Command="schedule:RadScheduleViewCommands.CreateAppointment" Icon="{Binding Text, Converter={StaticResource XamlImageSourceConverter}, ElementName=XamlRecurrence}" />
<TextBlock x:Name="XamlRecurrence"
Text="Recurrence"
Width="1000"
Visibility="Collapsed" />
<telerik:RadMenuItem Header="Open reservation..." CommandTarget="{Binding Menu.UIElement, RelativeSource={RelativeSource Self}}"
Command="schedule:RadScheduleViewCommands.EditAppointment" />
</telerik:RadContextMenu>
</telerik:RadContextMenu.ContextMenu>
I have implemented a context menu in my project, its working but with some limitation and bugs.
When my view loaded at that time, on first right click in schedulerView context menu is not opened. After that it will open the context menu and on every next click its working fine. Just problem with first time load. This is the very big problem for me.
As I had test it more I found that when I go from one Viewmode(Day,week,month) to another at that time same problem arise.
One thing which is something problematic for me. When I right click on appointment at that time new appointment is also enabled. I think it should be disabled.(See Image-1).
In my application I done following thing in XAML
<telerik:RadContextMenu.ContextMenu>
<telerik:RadContextMenu IsOpen="{Binding IsContextMenuOpen, Mode=TwoWay}" >
<telerik:RadMenuItem Header="New Reservation..." CommandTarget="{Binding Menu.UIElement, RelativeSource={RelativeSource Self}}"
Command="schedule:RadScheduleViewCommands.CreateAppointment" Icon="{Binding Text, Converter={StaticResource XamlImageSourceConverter}, ElementName=XamlRecurrence}" />
<TextBlock x:Name="XamlRecurrence"
Text="Recurrence"
Width="1000"
Visibility="Collapsed" />
<telerik:RadMenuItem Header="Open reservation..." CommandTarget="{Binding Menu.UIElement, RelativeSource={RelativeSource Self}}"
Command="schedule:RadScheduleViewCommands.EditAppointment" />
</telerik:RadContextMenu>
</telerik:RadContextMenu.ContextMenu>
10 Answers, 1 is accepted
0
Hello,
You could use the GetClickedElements<> method of the RadContextMenu to get the items under the mouse at the time of the click. Then you could set the visibility of the RadMenuItems exposed. Check the attached project for more details.
I am sorry for the project name RadDatePickerDisabled. The controls demo inside is for RadScheduleView anyway.
Kind regards,
Pana
the Telerik team
You could use the GetClickedElements<> method of the RadContextMenu to get the items under the mouse at the time of the click. Then you could set the visibility of the RadMenuItems exposed. Check the attached project for more details.
I am sorry for the project name RadDatePickerDisabled. The controls demo inside is for RadScheduleView anyway.
Kind regards,
Pana
the Telerik team
Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>
0
Hardik
Top achievements
Rank 1
answered on 08 Sep 2011, 12:53 PM
Hi telerik,
What about this?
When my view loaded at that time, on first right click in schedulerView context menu is not opened. After that it will open the context menu and on every next click its working fine. Just problem with first time load. This is the very big problem for me.
As I had test it more I found that when I go from one Viewmode(Day,week,month) to another at that time same problem arise.
When I right click on appointment at that time new appointment is also enabled. I think it should be disabled.(See Image-1).
I just want to make the New tab disable when I right click on Appointment.
thanks
H@rdik Pancholi
What about this?
When my view loaded at that time, on first right click in schedulerView context menu is not opened. After that it will open the context menu and on every next click its working fine. Just problem with first time load. This is the very big problem for me.
As I had test it more I found that when I go from one Viewmode(Day,week,month) to another at that time same problem arise.
When I right click on appointment at that time new appointment is also enabled. I think it should be disabled.(See Image-1).
I just want to make the New tab disable when I right click on Appointment.
thanks
H@rdik Pancholi
0
Hello,
Note that my project uses Visibility and works fine while yours try to set the IsEnabled. The problem is when RadMenuItem is se a Command the IsEnabled will depend on the CanExecute on the command. It will lead to unexpected results playing around with both the Command and IsEnabled on the RadMenuItem. Please follow my approach with the Visibility or if you want to be setting the IsEnabled set the Command to null when you set the IsEnabled to false.
Please check the attached project. Also it opens the RadMenu always no mater the view even the first time. I have added multiple view modes.
Greetings,
Pana
the Telerik team
Note that my project uses Visibility and works fine while yours try to set the IsEnabled. The problem is when RadMenuItem is se a Command the IsEnabled will depend on the CanExecute on the command. It will lead to unexpected results playing around with both the Command and IsEnabled on the RadMenuItem. Please follow my approach with the Visibility or if you want to be setting the IsEnabled set the Command to null when you set the IsEnabled to false.
Please check the attached project. Also it opens the RadMenu always no mater the view even the first time. I have added multiple view modes.
Greetings,
Pana
the Telerik team
Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>
0
Hardik
Top achievements
Rank 1
answered on 14 Sep 2011, 08:04 AM
Hi telerik,
I used visibility and its working fine. but one problem is still there. If I right click on reservation and context menu opened as per that, after that I right click on any slot in schedulerview then still it behaves same as appointment right click.
As I left click on slot(selection of slot) and again right click on slot then its working fine.
Any solution for this.?
Thanks
H@rdik Pancholi
I used visibility and its working fine. but one problem is still there. If I right click on reservation and context menu opened as per that, after that I right click on any slot in schedulerview then still it behaves same as appointment right click.
As I left click on slot(selection of slot) and again right click on slot then its working fine.
Any solution for this.?
Thanks
H@rdik Pancholi
0
Hardik
Top achievements
Rank 1
answered on 16 Sep 2011, 06:01 AM
Hi,
Its working now. One more thing I want translation of header. Wants in other languages also.
<telerik:RadMenuItem Header="Delete Reservation..." CommandTarget="{Binding Menu.UIElement, RelativeSource={RelativeSource Self}}"
Command="schedule:RadScheduleViewCommands.DeleteAppointment" >
Thanks
H@rdik Pancholi
Its working now. One more thing I want translation of header. Wants in other languages also.
<telerik:RadMenuItem Header="Delete Reservation..." CommandTarget="{Binding Menu.UIElement, RelativeSource={RelativeSource Self}}"
Command="schedule:RadScheduleViewCommands.DeleteAppointment" >
Thanks
H@rdik Pancholi
0
Hi,
Have you tried using the localization manager. It should be possible to set
Kind regards,
Pana
the Telerik team
Have you tried using the localization manager. It should be possible to set
telerik:LocalizationManager.ResourceKey="TranslateMeKey"
And add the "TranslateMeKey" in a custom translation table as shown in the help page.Kind regards,
Pana
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Khaled
Top achievements
Rank 1
answered on 23 Nov 2011, 01:16 AM
it seems there is a bug when using a right-to-left language, the coordinate is calculated as if there is a mirror, I mean if you want to click an item on the left you will have to click in the opposite right, but the context menu will be rendered on the wrong position two, is there a workaround for this issue?
0
Khaled
Top achievements
Rank 1
answered on 23 Nov 2011, 01:18 AM
it seems there is a bug when using a right-to-left language, the coordinate is calculated as if there is a mirror, I mean if you want to click an item on the left you will have to click in the opposite right, but the context menu will be rendered on the wrong position two, is there a workaround for this issue?
0
Khaled
Top achievements
Rank 1
answered on 23 Nov 2011, 01:20 AM
it seems there is a bug when using a right-to-left language, the coordinate is calculated as if there is a mirror, I mean if you want to click an item on the left you will have to click in the opposite right, but the context menu will be rendered on the wrong position two, is there a workaround for this issue?
I am sorry but everytime I posted my post I get a server error, I was able to see my posts yesterday, but today I saw that there are 3 same post, I wish moderators delete the duplicated post.
Thank you
I am sorry but everytime I posted my post I get a server error, I was able to see my posts yesterday, but today I saw that there are 3 same post, I wish moderators delete the duplicated post.
Thank you
0
Hi Khaled,
I tested this using both RightToLeft and LeftToRight flow directions and it behaved exactly as the WPF's original context menu. You can find a video what I tried. Did I miss something?
Best wishes,
Ivo
the Telerik team
I tested this using both RightToLeft and LeftToRight flow directions and it behaved exactly as the WPF's original context menu. You can find a video what I tried. Did I miss something?
Best wishes,
Ivo
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>