How to customize the Toolbar in WPF Viewer

Stimulsoft Reports.WPF discussion
Post Reply
euregon
Posts: 21
Joined: Thu Apr 21, 2011 8:13 am
Location: Germany, Augsburg

How to customize the Toolbar in WPF Viewer

Post by euregon »

Hi,

i'd like to customize the toolbar of the WPF Viewer.

We used the following code:

Code: Select all

            Button myButton = new Button()
            {
                Content="My cool button"
            };

            ToolBar tb = viewerControl1.FindToolBar;
            tb.Items.Add(myButton);
However there is no additional Button in the Toolbar.

Is there a way to achieve this?

Thank you.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

How to customize the Toolbar in WPF Viewer

Post by Alex K. »

Hello,

Please check the sample in attachment.

Thank you.
Attachments
971.WpfApplication3.zip
(16.76 KiB) Downloaded 591 times
euregon
Posts: 21
Joined: Thu Apr 21, 2011 8:13 am
Location: Germany, Augsburg

How to customize the Toolbar in WPF Viewer

Post by euregon »

Hello Aleksey,

we are using "Stimulsoft Reports.Ultimate 2011.1 Trial".

Unfortunately there is still no button.

Even with:

Code: Select all

    
        
    
Attachments
973.viewer2.png
973.viewer2.png (55.24 KiB) Viewed 4138 times
972.viewer.png
972.viewer.png (69.05 KiB) Viewed 4145 times
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

How to customize the Toolbar in WPF Viewer

Post by Alex K. »

Hello,

Your code add button in Find toolbar:


Thank you.
Attachments
978.Screen.png
978.Screen.png (101.25 KiB) Viewed 4129 times
euregon
Posts: 21
Joined: Thu Apr 21, 2011 8:13 am
Location: Germany, Augsburg

How to customize the Toolbar in WPF Viewer

Post by euregon »

Hello Aleksey,

sorry I mixed up MainToolBar with FindToolbar. The "Find" implyed to find the
ToolBar - and not the Finder's toolbar :)

My programm works very nice!

Thanks a lot!
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

How to customize the Toolbar in WPF Viewer

Post by Alex K. »

Hello,

We are always glad to help you!
Let us know if you need any additional help.

Thank you.
Post Reply