Click here to Skip to main content
15,903,012 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

I am developing a SW that can automatically detect the render ability of current machine then decide what GUI file is loaded. At this time, I have to create these files:

1. HighResGUI.xaml + HighResGUI.xaml.cs

2. LowResGUI.xaml + LowResGUI.xaml.cs

Both HighResGUI.xaml.cs and LowResGUI.xaml.cs are the same, only the xaml has different styles (due to the render capability of the current machine). This can solve my problem, at this time. However, when I want to modify one xaml.cs code, I have to do it twice for both High and Low.

So my question is, how can I combine these two different interface (HighResGUI.xaml+ LowResGUI.xaml) and use only one code behind, for example common.xaml.cs?

Thanks,

Anh
Posted

1 solution

I think you'll find this article helpful:

Creating a Skinned User Interface in WPF[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900