Re: Toolbar

WPF

Windows Presentation Foundation controls

Toolbar

  • rated by 0 users
  • This post has 7 Replies |
  • 2 Followers
  • How can I add another button to the toolbar?  I need to have a buton for export.

    Thanks,

  • Hi,
     
    You might have to write some custom code for that to add new button in the tool bar.
    It would be better to customize the C1DocumentViewer to add new button by creating a wrapper class of it.
     
    Hope this helps.
     
    Regard,
    Patrick
    <morgenweck> wrote in message news:217755@10.0.1.98...

    How can I add another button to the toolbar?  I need to have a buton for export.

    Thanks,



    http://helpcentral.componentone.com/cs/forums/p/79202/217755.aspx#217755

  • I need this too. I can't believe they left the export button out of the WPF document viewer. Did you ever figure out how to add it?
  • The best that I could do is to add the entire Report Viewer to a Parent Form with it's own toolbar. Adding/hiding buttons should be built-in in my opinion. Maybe ComponentOne can show some sample code about how to customize the viewer to add buttons.

  • Thanks for the reply. That's what I did too, but it looks goofy and tacked on since there is a lot of wasted space on the DocumentViewer toolbar and the toolbar I added on top.  After all the options available to the WinForm version, I just don't get the reason for making the WPF version so sparse, or not making it possible to add to it. It looks like they are not really serious about WPF, spending more time on ASP.Net and Silverlight. They seem to be limiting the WPF controls to what Silverlight can do. There may be a lot of interest in the .Net side now, but what I'm seeing is that with companies finally moving to VS08 and VS10, everyone is finally starting to pick up WPF and writing their new apps in it. I know we are. The interest in WPF is starting to explode and C1 is going to miss the boat. 

    Can anyone give some example code of taking a WPF C1DocumentViewer and creating a wrapper class that would allow objects to be added to the built in toolbar?

  • How do I switch off the toolbar so I can add my own? I have been told to change the template and that the XAML for the template is provided but I have been unable to find it.

  • WpfApplication1.zip

    Hi Everyone,

    Attached is a simple sample that modifies the C1DocumentViewer's template, and add a custom button to the template.  I used MS Expression Blend 3 to obtain the template automatically ("Edit a Copy"), and then just manually added the button and it's click event.  You can take this further if you'd like, replacing the entire toolbar with your own and so forth.  I hope this helps.

    Regards,

    -Raleigh

  • Excellent, thank you

Page 1 of 1 (8 items)