Wpf ribbon preview command binding

Stimulsoft Reports.WPF discussion
jmiller
Posts: 91
Joined: Mon Sep 20, 2010 12:18 pm

Wpf ribbon preview command binding

Post by jmiller »

I have an app with its own ribbon. I am looking into hiding the supplied Wpf preview control's ribbon and creating my buttons in my app's ribbon. How can I bind my buttons to the ribbon preview control's equivalent? For example, I have an Open button on my ribbon and I want it to function just like your Open button. I am not worried the image/text/tooltip. I do want to make sure the enable state and the command operate the same way.
jmiller
Posts: 91
Joined: Mon Sep 20, 2010 12:18 pm

Wpf ribbon preview command binding

Post by jmiller »

I found the solution to my question. I found the commands that are available and I can now bind to them. For example: ReportOpenCommand.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Wpf ribbon preview command binding

Post by Alex K. »

Ok! Have a nice day!
mcgu
Posts: 4
Joined: Fri Jul 15, 2011 1:27 am

Wpf ribbon preview command binding

Post by mcgu »

Hi,
i'm having the same problem. Where can i find the commands?

best regards
Michael
Andrew
Posts: 4108
Joined: Fri Jun 09, 2006 3:58 am

Wpf ribbon preview command binding

Post by Andrew »

Hello,

There is a realization of RoutedUICommand only in a viewer. In WPF designer we have not used it because in complicated UI it is difficult and not convenient.

Thank you.
mcgu
Posts: 4
Joined: Fri Jul 15, 2011 1:27 am

Wpf ribbon preview command binding

Post by mcgu »

ok, maybe i don't get it right. i use the wpf viewercontrol, but without the toolbar. i want to use my own ribbon controls for that.
how can i make my ribbon buttons use the commands of the viewer? can you give me an example?

i thougth of something like this:



is this the right way?

thanks!
Michael
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Wpf ribbon preview command binding

Post by Alex K. »

Hello Michael,

Please check the sample in attachment.

Thank you.
Attachments
1209.StiWpfRibbonViewerControl.cs
(109.32 KiB) Downloaded 688 times
1208.WpfViewer_Test.zip
(8.79 KiB) Downloaded 598 times
mcgu
Posts: 4
Joined: Fri Jul 15, 2011 1:27 am

Wpf ribbon preview command binding

Post by mcgu »

Perfect, excatly what i was looking for!

Thanks a lot!
Andrew
Posts: 4108
Joined: Fri Jun 09, 2006 3:58 am

Wpf ribbon preview command binding

Post by Andrew »

Hello,

As always we are happy to help you.

Thank you.
gugler
Posts: 6
Joined: Fri Jan 10, 2014 9:58 am

Re: Wpf ribbon preview command binding

Post by gugler »

Hello!

After i updated my solution to Stimulsoft 2013.3 some of the command bindings stopped working.
In Detail, the PageDeleteCommand, PageNewCommand, PageDesignCommand and PageSizeCommand are not working. Other Commands (for example FullScreen and Find) are still working.

Here is my XAML:

Code: Select all

<telerik:RadRibbonButton Text="Seitengröße" Command="report:StiWpfViewerControl.PageSizeCommand" CommandTarget="{Binding WorkspaceView.CurrentItem.Viewer}" Size="Large" LargeImage="/SigiNX;component/Images/32/page_size.png" />
<StackPanel>
	<telerik:RadRibbonButton Text="Seite löschen" Command="report:StiWpfViewerControl.PageDeleteCommand" CommandTarget="{Binding WorkspaceView.CurrentItem.Viewer}"  Size="Medium" SmallImage="/SigiNX;component/Images/16/page_delete.png" 
							 telerik:ScreenTip.Description="Löscht die aktuelle Seite aus dem Bericht. Die Änderung ist nur für diesen Ausdruck gültig." telerik:ScreenTip.Title="Seite löschen"/>
	<telerik:RadRibbonButton Text="Seite einfügen" Command="report:StiWpfViewerControl.PageNewCommand" CommandTarget="{Binding WorkspaceView.CurrentItem.Viewer}" Size="Medium" SmallImage="/SigiNX;component/Images/16/page_add.png" 
							 telerik:ScreenTip.Description="Fügt eine leere Seite in den Bericht ein. Die Änderung ist nur für diesen Ausdruck gültig." telerik:ScreenTip.Title="Seite löschen"/>
	<telerik:RadRibbonButton Text="Seite bearbeiten" Command="report:StiWpfViewerControl.PageDesignCommand" CommandTarget="{Binding WorkspaceView.CurrentItem.Viewer}" Size="Medium" SmallImage="/SigiNX;component/Images/16/page_edit.png" 
							 telerik:ScreenTip.Description="Öffnet den Editor. Dort können einzelne Inhalte des Berichts geändert werden. Die Änderung ist nur für diesen Ausdruck gültig." telerik:ScreenTip.Title="Seite löschen"/>
</StackPanel>
Have there been any changes?

Kind regards
Michael
Post Reply