Can't able to apply Bounds Control in Prefab - hololens

I'm using prefab instead of objects. I'm able to apply bounds control's handle style (Hololens 2 style) in Objects But not in prefab which I've created.
Is there any solutions, How can I apply Hololens2's Handle style in prefab ?
enter image description here

You need to save the Configuration in BoundsControl/Visuals as an .asset file for reuse in the prefab. You can also drag the .asset file from Packages/Mixed Reality Toolkit Foundation/SDK/StandardAssets/Profile/BoundsControl/HoloLens2Style_Slate to the Assets folder, modify it to the style you want, and then add it to the BoundsControl component of the prefab.

Related

Dynamically add / remove editable area to custom control embedded in XPage

Okay... this is a little difficult to explain but I will try my best.
In Custom Control while adding properties in Property Definition we can set "Allow multiple instances" which allows us to add multiple instances of that property when the control is embedded in XPage.
Similarly, I need to know whether it is possible to add (and remove) Editable Areas in a custom control when it is embedded in XPage? What I plan is that I would have a repeat control inside my custom control and I would be able to put the contents in each editable area in every loop of that repeat.
Is this the right way to go about or am I looking at this problem incorrectly? Any solution not involving editable areas is also welcome :)
Update 4 Apr 2013:
A use case context I am looking for is a simple carousel where contents of each screen in carousel can have different contents. These contents would be put into each (dynamically added) editable area. The contents can be very different from each other with one screen containing only text, other only image and another both image and text.
Look at the table walker example in the 26 original exercises. It does mostly what you are looking for (conceptually). You won't need multiple editable areas. Whatever is inside the repeat gets repeated.
What you want to do is to give the control a custom property "boolean editMode" so you can render that one line to be edited - if that's the UI pattern you want to follow.
You also could consider a dojo table with Ajax which allows for a familiar spreadsheet UI

iPhone SDK building an Omnigraffle like app

I have been trying to find an example or some hints on how to create an app that I could drag, resize, rotate images onto a UIView and then save the individual pieces (including their size, rotation and placement) and the entire UIView into CoreData. Kind of like the omnigraffle app.
Any tutorials, examples or anything on any piece of the app would be greatly appreciated.
for dragging a view
http://www.cocoacontrols.com/platforms/ios/controls/tkdragview
for roting a view http://www.cocoacontrols.com/platforms/ios/controls/ktonefingerrotationgesturerecognizer
for resizing a view
http://www.cocoacontrols.com/platforms/ios/controls/spuserresizableview
What respects to core data, its actually pretty straightforward just, gather the classes in one view, see the properties you need to save, and the new one you will need for your app and thats it.
Like:
Object Canvas containing a many relationship to morphlingViews wich contain all the properties as center, color, width, height, angle, UIPath (if you plan to create custom shapes) layer position (so it gets drawn correctly) and if you plan to connect the views as omnigraffle add a many realtionship to self (in morphlingViews) so you can take the center of different morphlingViews and add a simple line between them. (and a string if you plan to add drawInRect method to allow users to write in the objects, then it will be a good idea to add the text properties as well).
You can also add Quartz Composer drawing styles properties to the object, as shadow, shadowColor, shadowOffset, or add patterColor to add resizable background.

Can I create a custom DialogPreference based on a pre-existing custom Dialog?

In my Android project I've already created a custom dialog: A class named SelectColorDialog, extending Dialog, that allows the user to view a large matrix of color cells in order to select a particular color. The dialog returns the selected color value (as Integer) to the dialog initiator – typically an Activity – via a callback function.
I've a similar custom dialog, SelectTypefaceDialog, to allow easy font selection. A list of available typefaces are shown, as ListView rows, each identified by name and with an associated short sample text rendered in that typeface. The available typefaces include usual droid fonts, such as NORMAL, MONOSPACE, etc. as well as any externally sourced TTF font files that the user cares to load into a particular subdirectory on the SDCard.
These custom dialogs were not initially designed to be used directly in conjunction with SharedPreferences, preferences definition XML files or with any PreferenceActivity. Instead of, each dialog can be popped up from any activity, via the user pressing a button or via a menu item. The activity classes that create these dialogs also have internal callback classes, selection event listeners, to detect when the user selects a color or font.
These two dialogs do not have OK and Cancel buttons. Instead, the user just clicks on an item - a view of some kind - in the dialog to select the corresponding color or typeface value (implicit OK) or else presses the device’s back button to dismiss the dialog with no action taken (implicit Cancel).
I would now like to go further and incorporate these two custom dialogs into the shared preferences framework via a preferences.XML and an associated PreferenceActivity.
I would prefer to base two DialogPreference subclasses directly on these existing dialogs if possible, but I cannot see how to do so. I suspect that I cannot, and that I'll need to start all over again, and copy or adapt all the java code that is presently in the custom dialog classes – for color or font display and selection – directly into the custom DialogPreference classes instead, perhaps by overriding onCreateDialogView() and/or other methods?
This question may be a bit old, but I hope to help those, looking at the same problem in future: just extend Preference instead of DialogPreference. DialogPreference is designed badly and expected "official" way to use custom Dialog - overriding protected showDialog method does not work, because this single method contains half of class logic.

How can a graphic be placed in the OneUI .lotusBanner area using the Application Layout Control

I am using the Extension Libraries Application Layout Control and need to have a banner graphic placed in the .lotusBanner div on the right. How can this be done as it seems that the Application Layout Control can't be modified.
You could use the utilityLinksFacet on the extended control that Steve Pridemore did.
http://www.openntf.org/internal/home.nsf/project.xsp?action=openDocument&documentId=CED2E61A75526CD086257997006DA95B
or you could use onload javascript to add it.
I was able to place a graphic in the upper right of the Application Layout Control in the Banner area by doing the following:
In the control under the Banner > Utility links I added a Basic node. For the node I specified the href and image. This worked and placed the image n the correct spot.
Artifacts of this were the location of the Banner Application links. To remedy this I used some CSS for the .lotusBanner ul.lotusLinks {margin-top: 45px;position:absolute;}
The margin-top was to push the links down so I could enlarge the logo that is used by the Application Layout Control.
The applicationLayout control in ExtLib is, as you have found out, locked down to only allow certain aspects of the configuration to be changed by the developer. You can add links to different sections of the applicationLayout but nothing beyond that.
One possible alternative is to NOT use the applictionLayout control itself but create your own approximation of it in a custom control, You would need to add all the necessary panels/divs with the special oneUI2 classes in all the correct places and then add editable areas and callbacks within these panels for the parts that you would want to customize throughout the application. All of the other sections in the applicationLayout control, like the bannerUtilityLinks are created using the ListofLinks control that is also found in the Extension Library.

How to Make A Callout Appear for MKOverlay Region?

I have used a gesture recognizer and the boundingRect for a given overlay to determine when a user taps on it. However I would now like to make a callout appear over the overlay region that the user taps, just like how it is done for annotations. Must I create the overlays as annotations in order to accomplish this? Thanks.
Overlays are also annotation objects if you wish.
From the Location Awareness Programming Guide:
The MKOverlay protocol conforms to the MKAnnotation protocol. As a result, all overlay objects are also annotation objects and can be treated as one or both in your code. If you opt to treat an overlay object as both, you are responsible for managing that object in two places. If you want to display both an overlay view and annotation view for it, you must implement both the mapView:viewForOverlay: and mapView:viewForAnnotation: methods in your application delegate. It also means that you must add and remove the object from both the overlays and annotations arrays of your map.

Resources