• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Adding Global Toolbar to WPF Application (C#)

Asparagus

Senior member
WPF/C# newbie here...

I have a WPF app with several pages. I've created a toolbar with a custom logo on it and a few icons. Each time I add a new page to the app, I have to manually copy/paste the code for the toolbar into each new page's XAML file. Is there a way that I can define the toolbar in App.xaml and make it be an inherent part of each new page I create?
 
You can create the toolbar as a custom User Control and just place it on each of your forms during design time like you would any other form element, or I believe you can use a Resource Dictionary.

I'm not too familiar with the Resource Dictionary route(I've only been doing WPF for a month or so now)
 
Back
Top