Reduce DevExpress theme dll's on deploy folder - dll

Using the
DevExpress Assembly Deployment Tool
helps finding out the needed dll's depending on your references. In my case I have as a reference just DevExpress.Xpf.Charts.v16.1.
The total amount of dll's to deploy from DevExpress is 33. From those, 20 are DevExpress.Xpf.Themes.XXX related.
I understand that depending on the context you can have different themes, like aero, metro, win xp...
Is there any way to reduce the amount of dll's in the deploy folder.
Or
Is there any way to 'fix'/'hardcore' the theme to be used and have just one of them deployed?

Refer this DevExpress Thread - Could not load file or assembly DevExpress.Xpf.Themes...
Starting with version 16.1, the default application theme is "Office2016White". Thus, it is required to add a reference to the DevExpress.Xpf.Themes.Office2016White.v16.1 assembly in your project if it uses the default theme.
In addition, the default theme is now applied to standard WPF controls, not only DevExpress ones.
To switch to another theme, use the ApplicationThemeHelper.ApplicationThemeName property. The DevExpress.Xpf.ThemeManager.ApplicationThemeName property has become obsolete.
To restore the old behavior, set the DevExpress.Xpf.Core.ApplicationThemeHelper.UseLegacyDefaultTheme property to true before the first reference to the DevExpress.Xpf.Core.v16.1 assembly. See the example below:
public partial class App : Application {
public App() {
ApplicationThemeHelper.UseLegacyDefaultTheme = true;
}
}
The value of the static Theme.Default property has been changed to Office2016White.
For the answer of you question, You can just add that theme assembly which your added controls use. If you have changed theme from different control by modifying some properties then you have to be careful about that required assemblies.
Hope this help..

Related

UWP Using Pages from different Project

Is it possible to have all pages in a different project from where the app.xaml/cs is in?
I tested this by creating a new "Class Library (Universal Windows)" or "Windows Runtime Component" project, then I created the new pages in those projects.
After I add this project as a reference to the main UWP app and call the page(s) in the "rootFrame.Navigate(typeof(MainShellView), e.Arguments)" I get the exception
system.accessviolationexception attempted to read or write protected memory
Is it possible to have the pages, controls in different projects than the UWP main project and use them as references?
You will need to keep an empty/dummy MainPage.xaml page in the main project as there is a hard-coded reference to it in the project system. With that in place you can load all your pages (incl. the initial start page) from other projects that you are referencing in the solution.
I will log a bug on the hard-coded dependency on the existence of "MainPage.xaml". Thanks for reporting!

How to view the procedural code for any xaml file

I'm working in Visual Studio 2012 with xaml to create an application. When I make a new solution and WPF project and look at the xaml in the application file, I see xmlns, a startupuri, and a tag for application.resources.
When I want to see the code-behind that these tags are creating, I have only the .cs file with maybe a few things in it and the mysterious InitializeComponent() that performs all of the parsing. Here's an example of what it looks like:
public partial class MainWindow : Window //This is generated with a wpf project.
{
public MainWindow()
{
InitializeComponent();
}
}
If possible, how can I view the procedurally generated code that InitializeComponent is creating?
I don't think that the complete xaml source gets compiled into .g.cs files.
Quoting this codeproject article:
When you compile a WPF application in Visual Studio it will compile your XAML files into a compressed representation known as Binary Application Markup Language (BAML). The BAML is then saved as a resource in the resultant assembly. When that assembly is loaded and the resource is requested, the BAML is streamed out and very quickly turned into the object graph described by the original XAML.
In the project directory, under the obj and Debug folders should be files labeled .g.cs that correspond to existing files. Presumably, these are Generated C-Sharp files that contain the generated code that I was looking for.

"The tag 'MenuItem' does not exist in XML namespace 'clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input.Toolkit'" error

I'm getting an error trying to build a Silverlight application on a new machine. (Silverlight 4, Visual Studio 2010) This application compiles without error on four other machines.
The error is:
the tag 'MenuItem' does not exist in XML namespace 'clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input.Toolkit'.
The references appear to be pointer to the correct assemblies. Has anyone else ever had this problem?
Another reason this issue may occur is due to missing a reference to all "three" assemblies required to use the portions of the the Toolkit controls.
Make sure you have reference to the following assemblies if attempting to use the Toolkit inputs (and assuming the themes also possibly).
System.Windows.Controls
System.Windows.Controls.Toolkit
System.Windows.Controls.Input.Toolkit
This solved the problem I was having in relation to the error.
http://marktinderholt.wordpress.com/2011/07/12/silverlight-toolkit-for-silverlight-5-beta
its the recompiled toolkit in SL5, just reference those and you're set
You can always fall back on creating the context menu in code.
public LedgerEntryControl()
{
InitializeComponent();
ContextMenu contextMenu = new ContextMenu();
MenuItem voidMenuItem = new MenuItem() { Header = "Void" };
voidMenuItem.SetBinding(MenuItem.CommandProperty, new Binding("Void"));
contextMenu.Items.Add(voidMenuItem);
ContextMenuService.SetContextMenu(this, contextMenu);
}
looks like you're missing the Silverlight Toolkit on that machine, but it's installed on the four other ones.
For some reason, the SilverLight Toolkit from NuGet Package Manager is for SL4, even when the project is set to SL5. You can download the SL5 version directly from CodePlex. Note that the date is December 2011, instead of February 2011 like the SL4 version.
If for some reason the MSI does not install (which happened to me), you can extract the files contained in the MSI using 7-zip. All I had to do was manually add a reference to System.Windows.Controls.Input.Toolkit.dll from the extracted files, and my SL5 project now compiles successfully with its NumericUpDown control. Happily, my program now compiles both in Release and Debug mode.
Also to add, for those who have not already done so, you may need to have a reference in the XAML to the correct toolkit. I used the following:
<sdk:Page xmlns:input="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input.Toolkit" ... >
Note that the first part, where is says input, is what needs to be typed in the XAML to use the control:
<input:NumericUpDown x:Name="myControl" ... />

Silverlight AccentColor Theme Issues

I am trying to build a Business Application using the AccentColor Theme by copy/pasting the styles into the asset folder and adding the Merged Dictionaries in the app.xaml. After getting everything in place, per the instructions, I get 100+ errors about controls that do not exist like the buttonspinner. I currently have the Silverlight 4 toolkit installed. What am I missing?
If the control isn't used in your solution, you'll get errors. You have 2 options:
-Comment out the styles for the controls you're not using.
-Create a page that has all the controls specified in the styles that you think you’ll use, and comment out the styles for the controls you're not using.

vb.net: Get to resources of a referenced project

I have a project which contains all custom controls and images; we'll call it projectBase. Now I have created a windows forms project (project1) that references projectBase. I need to access the embedded resource (images) of projectBase in project1. Any idea how i can pull this off?
In project properties, under Resources, you have the Access Modifier at the top, which you can set as Public. Now you can access resources from the other project like this:
Dim someResource = MyReferencedProject.My.Resources.SomeResource
One option would be to expose the images as readonly properties of your custom control classes.