Unable to resolve InitializeComponent in colors.xaml.cs and styles.xaml.cs - maui

I'm trying to create a MAUI project from my existing forms project, and as part of it I created two resources files, one for colors and the other for styles, but it says that it cannot find the InitializeComponent method in it, I've tried cleaning bin, obj, restarting VS, creating new Resource files, but it is still giving the error
Any inputs would be really helpful

Usually, resources and styles are defined in *.xaml files without *.xaml.cs. Can you try adding a new ResourcesDictionary file and define your resources or styles there?
A ResourceDictionary file should look like this:
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:SampleApp">
</ResourceDictionary>

Related

Building Blocks not appearing after upgrade to Word 2013

I have a document-level (dotx) customization, with a custom ribbon, and one of the controls in that ribbon is this:
<gallery idMso="CustomGallery1" label="Building Blocks" size="large" />
The only other part that makes this work is the creation of entries under Custom1 in the Building Blocks Organizer. In Word 2010, this would show all the building blocks under the Custom1 category. In Word 2013, it shows the name of each building block briefly, and then all of them are removed and the list is empty:
The building blocks themselves all contain either a document property or document variable.
I have tried the following to resolve this but without success:
Ensured that they are still present by opening the template outside of Visual Studio; they are.
Upgraded the template to the 2013 dotx format.
Re-created the building blocks.
Re-created the entire dotx file, and then re-created the building blocks.
I also tried using other ribbon IDs, they are empty too (they do all have entries) but they display it differently:
There should be four entries there, they exist in my Normal.dotm. The last two controls there, for equations and content controls, do work, except the content control that is inserted displays similar behavior as the Autotext gallery:
I don't know what should be shown in this case but I doubt it's nothing.
Right now I'm assuming that this is just a broken feature in 2013 and will have to replace it with something else. Does anyone know anything to the contrary?
I don't think it is a broken feature, after some struggle, I did get to understand how to use it:
The gallery button in the "toolbar" of a newly added Building Block Gallery Content Control indeed seems empty at first, because it is set to list QuickParts. You have to change it in the properties of the control so that it lists the content of the AutoText Gallery instead (or any other Gallery of Building Blocks you'd like). To do so, either directly click on the Properties button in the Developper tab while the control is selected, or switch to Design Mode so that the Properties appears in the context menu (right-click on the control):
AutoText is "Insertion automatique" in French, the rest you can guess ;)
As far as I could find, it's just a broken feature. There's also a ridiculous memory leak the first time you do a Find and add fields during that find.

How to properly implement Find in Files in Custom Project?

I tried implement interface IVsProjectTextImageProvider. Method OpenItemTextImage is called for each file in project (files are packed inside project files - something like zip) but in there is still no result in Find Results window.
What i am missing?
It seams that item must be registered in Running Document Table.

Extending the Eclipse PropertiesView with further tabs for existing PropertySources

After a quite long struggle with the known and unfortunately one of the few help articles about controlling properties, tabbed properties etc. (links below), I have decided to ask for your help.
What I need to do seems not that hard, but, well, I just couldn't bring the pieces together. So the problem is:
I want to extend the existing properties view of Eclipse (PropertySheet) with some further tabs, which will be later on filled with certain information from EMF objects, which in the end implement IAdaptable. So they can be queried for PropertySources and there are already a few tabs, sections extended in the corresponding project in its manifest, which are being successfully gathered from the Selection Listener of the PropertiesView.
Here comes the tricky part: I don't need to extend this project further, by defining further tabbed properties in its manifest. I need to implement a seperate plug-in project, which does this extension job for the other main project. I don't need extra views or so. This existing project provides the property sources and like sad has its own designed tabbed property view via its extensions.
I have actually become quite familiar with the concept of the views and properties, I can build some Property Sources and let the Properties View gather/show/manipulate the properties.
But this idea, letting an external plug-in extend the Properties View with tabs of an another EMF-based plug-in project, just can't get to me. I am really confused and don't know with what to begin with.
I would be unbelievably glad, if you could point me to the right direction.
Thanks a lot!
*Links:
http://www.eclipse.org/articles/Article-Properties-View/properties-view.html
http://www.eclipse.org/articles/Article-Tabbed-Properties/tabbed_properties_view.html

JavaFX Scenebuilder does not see ids when FXML is in a different package than controller

i installed netbeans with java se7, and javafx samples are running fine. In scenebuilder, i can select an ID for each control defined and annotated with #FXML in my controller. however, i like my project organised. when i create a new package, and move my FXML file there, (myapp/views) and the controller stays in the root where it was -> myapp, then in scenebuilder does not seem to find the id.
I know about the 'controller class' in the FXML, but since i didn't move my controller, that should not be changed.
More specific, when both my controller and fxml are in the package 'holidayapp', it works. moving the fxml to a subpackage holidayapp/views', doesn't work. The controller class remains
<AnchorPane id="AnchorPane" prefHeight="200" prefWidth="320" xmlns:fx="http://javafx.com/fxml" fx:controller="holidayapp.HolidayViewController">
as the HolidayViewController remains in the root package. I do nothing else but moving the fxml file from the main package into a subpackage.
I would like to see the id's from the holidayViewController in my scenebuilder. Compoling and running with the fxml in a subpackage, was never any problem.
Thanks
I think you might be suffering from the following issue:
https://bugs.openjdk.java.net/browse/JDK-8091793
If you think you do, please consider to vote for and/or comment on this issue.
The way I worked with this was placing my Main class into the view (the one that extends Application). This gave me access to my Controller classes, their variables, and methods. This works for SceneBuilder 1.1.
I can only speak for when using Eclipse and not NetBeans so doing this may still result in nothing.

SugarCRM installable changes in detailview

I have a simple problem but may be serious for me , I made custom fields and added them all in the custom\modules\Leads\metadata\detailviewdefs.php (detailview layout) of Leads module but problem is that i have to make a installer package of changes. I managed with custom fields and copied them in the custom\Extension\modules\Leads\Ext\Vardefs through manifest. Now i don't know how to apply detailviewdefs changes through manifest (add new fields panel in detailview). The point is that the existing detailview layout should not be changed but only add a new panel in it.
Possible solution in my mind is like I should add code in $layout_defs array $layout_defs["Leads"]["DetailView"] ['panels']['panel_name'] and place it in custom\Extension\modules\Leads\Ext\Layoutdefs\ and copy Layoutdefs file through manifest. I tried this but not seems working one.
Looking for a smart solution share if you can.
Addition:
Even if i export module changes from Studio ->export Customizations and import in other instance with module builder. It override all the previous custom files(customizations) in newer instance (Is it not a limitation in SugarCRM) but my requirement is to add only changes in newer instance's detailview.
That's a tough one. There are two options that I know of. 1) Provide directions to the user for how to add the fields to the layouts using Studio 2) In a post_install.php script mimic how a Studio layout deploy works to insert your fields into any given layout (best practice would be to create a new panel for all of your fields if mass distributing).
I had found following functions of sugar's ModuleInstaller class to add or remove fields from layouts through manifest script. These functions will add/remove fields to both editview and detail view at the same time. Just add following lines in post_install / pre_install no need to require anything,
$installer_func = new ModuleInstaller();
$layoutAdditions = array('Users' => 'users_access');
To add users_access field in Users module:
$installer_func->addFieldsToLayout($layoutAdditions);
To remove users_access field from Users module:
$installer_func->removeFieldsFromLayout($layoutAdditions);
Hope it's helping.
mansoor