Theme for devexpress ribbon control in WPF - wpf

How to set theme for devexpress ribbon control in WPF? Already installed the WPF theme editor, but there is no item in the product browser to select. I tried property ribbon style, but it does not work either.

Your main window should start with <dx:ThemedWindow > tag.
Add theme references to project by context menu on the references section, DLL names start with DevExpress.Xpf.Themes. ...
Click on smart tag button for the form.
Select application theme from the combobox.
p.s: this solution applies to .net 4.7 or equivalent

Related

No Resources window .Net Core WPF project in Microsoft Blend 2019

I am having an issue with Blend for Visual Studio 2019 version 16.11.3. When I create a .Net Framework project I can access the Resource Window via the "View" toolbar at the top.
However I seem to be unable to access the same window when the project is using .Net Core.
I am having trouble figuring out where and why the Resources window might be hidden? I want this functionality to make it easier to apply styles using the interface and just drag&dropping styles vs writing them out in xaml.
You could follow the steps below to display the Resources Window menu.
Click Customize... under the Tools menu.
Click Commands and select Menu bar as View.
Click Add Command... ->Select View and Resources Window on the Add Command page and click OK.
Click Close on the Customize page.
Then you could see the Resources Window under the View menu.

WPF User Control Apply Style

I created a custom TimePicker control. It has a label and some combo boxes on it. It is inside a UserControl library.
Now I added a reference to that project in my Desktop project and added the TimePicker to a window.
Finally, I have some styles defined in a 3rd project. I would like to create a style in the Styles project for the TimePicker on my window.
How do I set that TimePicker's style in the Desktop project?
Load Resource Dictionary from your style project.
Set button style defined in your Resource Dictionary.

How to theme WPF custom controls

How I do define and apply themes to my custom control that is hosted in an ElementHost.
VS created Generic.xaml in the Themes folder. If I renamed it to something else (like Blue.xaml), the entire control does not show up.
Another question is what theme xaml files should be set to in VS: Content, Page or Resource?
You should always have a Generic.xaml defined.
Copy it, and then change your Blue.xaml to define your "Blue" theme.
Build Action = Page
See as you're hosting your WPF control in a Windows Forms Application with ElementHost, then you might have difficulty in it seeing changes to the theme.
See:
http://www.actiprosoftware.com/community/thread/20266/how-to-get-themes-working-inside-an-elementho
Dynamic Application-level resources are not dynamic when hosted in ElementHost

How can I get the default XAML style for the WPF DatePicker control in .net 4?

I am trying to find the default control template for the WPF DatePicker control in .NET 4. I have tried the MSDN page, but the "link" to the DatePicker control is just text. I have tried StyleSnooper, but it has an error when loading PresentationFramework.dll.
Is there any way other than Expression Blend to get the default template?
Thanks.
You can download them from this page, or more specifically here.
FYI you can also used Blend to extract a style for any control.

"Please wait" Windows in WPF

I need to create a "please wait" window at the start up of my application, start animation and at the lifetime of app change visibility. I don`t want create explicitly new thread (Maybe ThreadPool or BackgroundWorker).
Any ideas?
WPF has a very nice splash screen class exactly for that: http://www.codeproject.com/Articles/36418/WPF-Splash-Screen.aspx
Here is the quick steps:
Add the image file to the WPF Application project. For more information, see How to: Add Existing Items to a Project.
In Solution Explorer, select the image.
Add the image file to the WPF Application project. For more information, see How to: Add Existing Items to a Project.
In the Properties window, click the drop-down arrow for the Build Action property.
Select SplashScreen from the drop-down list
(source here: WPF SplashScreen implementing)

Resources