-
-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge resources/part1 #27
Conversation
… CustomControlStuff
Wait a minute, did you just put all the control styles in ONE XAML FILE?? I don't think this will be good for the work in future nor the following maintenance. |
You have 2 files ControlsResources.xaml and Generic.xaml You are currently putting all the files in one file! if you look at csproj file you can see that we have a code:
This code specifies that the xaml files hosted in controls folder should be merged into a single file called generic.xaml
so instead of this:
we have actual codes... |
Hi! I got the following exception when I try to run the sample app: By the way can you change the name |
Sure, wait for it |
@NotYoojun i applied #28 and i renamed Theme.xaml to CombinedResources.xaml, also i fixed exception and now Demo apps can be run without any issues. |
@NotYoojun go to Main branch and test it again, this bug still exist and does not related to this pr. |
OK, i fixed the TextBox issue and made a commit. |
excelent, thank you. |
Good idea, maybe you can have a try! |
Wait a minute, I don't think this is a good action. You see, in XamlControlResources.cs there are some lines like this: If you put them together, All the unnecessary stuff in Generic.xaml will be loaded twice. So I think it's better to keep the current structure. What do you think? internal static ResourceDictionary ControlsResources
{
get
{
if (_controlsResources == null)
{
_controlsResources = new ResourceDictionary { Source = PackUriHelper.GetAbsoluteUri("Themes/CombinedResources.xaml") };
}
return _controlsResources;
}
}
|
let me test and see what is happening |
Fix #22
This PR only covers the iNKORE.UI.WPF.Modern and iNKORE.UI.WPF.Modern.Controls will be done in next pr.
i used a tool called XAMLTools.MSBuild which, Combines multiple XAML files to one large file.
This is useful when you want to provide one Generic.xaml instead of multiple small XAML files.
Using one large XAML file not only makes it easier to consume, but can also drastically improving loading performance.
Things that have been done in this PR:
All MergedDictionary and Converters removed from xaml files
All Converters moved to a new File Called Converters.xaml
ControlsResources Removed and some of contents moved to ThemeResources.xaml file
Generic.xaml file removed and some of contents moved to a new file called CustomControlStuff.xaml
All custom controls are automatically merged into
Generic.xaml
file.All styles are automatically merged into a new file named
Theme.xaml
XamlControlsResources.cs file updated to
Theme.xaml
file instead ofControlsResources.xaml
file.