8 Answers, 1 is accepted
0
Hello Harald,
I am not sure that I understand your requirement. May I ask you to clarify what you mean by that you open RadPane in a RadRibbon menu? And also, how many times the pane can be opened?
Regards,
Martin Ivanov
Progress Telerik
I am not sure that I understand your requirement. May I ask you to clarify what you mean by that you open RadPane in a RadRibbon menu? And also, how many times the pane can be opened?
Regards,
Martin Ivanov
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
Harald
Top achievements
Rank 2
answered on 28 Jun 2018, 02:28 PM
The user can open different RadPanes via the ribbon menu. I would like to deny that a RadPane can be opened twice.
0
Harald
Top achievements
Rank 2
answered on 28 Jun 2018, 02:29 PM
The user can open different RadPanes via the ribbon menu. I would like to deny that a RadPane can be opened twice.
0
Harald
Top achievements
Rank 2
answered on 28 Jun 2018, 02:31 PM
The user can open different RadPanes via the ribbon menu. I would like to deny that a RadPane of the same type can be opened twice.
0
Hello Harald,
Can you send me some code that shows how the RadPane is created and opened by the menu? And also can you tell me what ribbon menu you are using? Maybe you can include some code that shows also the menu definition.
Regards,
Martin Ivanov
Progress Telerik
Can you send me some code that shows how the RadPane is created and opened by the menu? And also can you tell me what ribbon menu you are using? Maybe you can include some code that shows also the menu definition.
Regards,
Martin Ivanov
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
Harald
Top achievements
Rank 2
answered on 01 Jul 2018, 07:39 PM
XAML Code:
01.
...
02.
<
telerik:RadRibbonButton
x:Name
=
"ribbonButtonCalendar"
ToolTip
=
"Tooltip"
Click
=
"ribbonButtonCalendar_Click"
>
03.
<
StackPanel
Orientation
=
"Vertical"
>
04.
<
Image
Width
=
"48"
Height
=
"48"
Source
=
"Images/calendar.png"
/>
05.
<
Label
HorizontalAlignment
=
"Center"
Content
=
"Kalender"
/>
06.
</
StackPanel
>
07.
</
telerik:RadRibbonButton
>
08.
...
09.
10.
...
11.
<
telerik:RadDocking
x:Name
=
"DockingPanel"
Grid.Row
=
"3"
BorderThickness
=
"0"
>
12.
<
telerik:RadDocking.DocumentHost
>
13.
<
telerik:RadSplitContainer
SizeChanged
=
"RadSplitContainer_SizeChanged"
>
14.
<
telerik:RadPaneGroup
>
15.
<
telerik:RadDocumentPane
x:Name
=
"DocumentPane"
Header
=
"Protokoll"
Visibility
=
"Collapsed"
CanUserClose
=
"False"
IsActive
=
"True"
>
16.
...
17.
</
telerik:RadDocumentPane
>
18.
</
telerik:RadPaneGroup
>
19.
</
telerik:RadSplitContainer
>
20.
</
telerik:RadDocking.DocumentHost
>
21.
<
telerik:RadSplitContainer
x:Name
=
"LeftSplitContainer"
InitialPosition
=
"DockedLeft"
Width
=
"320"
>
22.
<
telerik:RadPaneGroup
x:Name
=
"LeftPaneGroup"
>
23.
</
telerik:RadPaneGroup
>
24.
</
telerik:RadSplitContainer
>
25.
<
telerik:RadSplitContainer
x:Name
=
"RightSplitContainer"
InitialPosition
=
"DockedRight"
Width
=
"320"
>
26.
<
telerik:RadPaneGroup
x:Name
=
"RightPaneGroup"
>
27.
</
telerik:RadPaneGroup
>
28.
</
telerik:RadSplitContainer
>
29.
</
telerik:RadDocking
>
30.
...
C# Code:
01.
...
02.
private
void
ribbonButtonCalendar_Click(
object
sender, RoutedEventArgs e)
03.
{
04.
RadPane calendar =
new
RadPane();
05.
calendar.Title =
"Kalender"
;
06.
calendar.Name =
"Kalender"
;
07.
proitdesk.Meeting.Controls.Calendar calendarControl =
new
Controls.Calendar();
08.
calendar.Content = calendarControl;
09.
this
.RightPaneGroup.AddItem(calendar, DockPosition.Top);
10.
}
11.
...
0
Accepted
Hello Harald,
Thank you for the additional information.
To achieve your requirement you can check if the pane already exists in the Panes collection of the RadDocking control and add it if it is not presented there. For example:
Regards,
Martin Ivanov
Progress Telerik
Thank you for the additional information.
To achieve your requirement you can check if the pane already exists in the Panes collection of the RadDocking control and add it if it is not presented there. For example:
private
void
ribbonButtonCalendar_Click(
object
sender, RoutedEventArgs e)
{
string
kalenderName =
"Kalender"
;
var kalenderPane =
this
.DockingPanel.Panes.FirstOrDefault(x => x.Name !=
null
&& x.Name.Equals(kalenderName));
if
(kalenderPane ==
null
)
{
RadPane calendar =
new
RadPane();
calendar.Title = kalenderName;
calendar.Name = kalenderName;
this
.RightPaneGroup.AddItem(calendar, DockPosition.Top);
}
}
Regards,
Martin Ivanov
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
Harald
Top achievements
Rank 2
answered on 03 Jul 2018, 08:36 PM
Thanks. It works.