I understand in order to create a toggle group, I have to select the game object I want as the holder/parent of the toggle objects, and then in the Inspector, click on Add Component and then of course select UI -> ToggleGroup
Is it wise to select Canvas to be the holder/parent of the group, or should I create a Panel first and then set the Panel as the holder/parent, or...?
Is there a set of guidelines and what might be a good design regarding this situation?
Depends on your Canvas. If its a screen overlay type I would advice to create a holder for the toggles, since you might want to have multiple toggle groups. If for example its a world space canvas holding only the Toggles then adding the Toggle group component to the canvas itself shouldn't be an issue.
Related
In Unity you can animate an object (such as a character) with the animation window:
And you can select properties of the object that you want to animate:
My problem is that it seems you can only add a single property at a time and then the whole list closes:
This causes a big problem when you want to animate every part of a full human (or any type of complex) 3d model:
My Question: Is there some way I can add more than one property at the same time? Or atleast not have the window of properties close, that way I can just keep choosing them?
Worth mentioning as well that if you right click on the transform instead of hitting the plus sign you can just add an entire group of transforms and the menu does not close. Should speed things up
The animation window will close after adding the property but their is a way to do this . Open animation window and inspector in separate tabs so that both can be seen at same time and animation must be in recording mode . After that select your game object in hirarchy and you can directly change its properties from inspector for each selected frame for example you can set position rotation and scale directly from inspector and this will make your animation in a fly :) Reference to unity documentation http://docs.unity3d.com/Manual/animeditor-MultipleParts.html
Yes! I've tested this method on Unity 2020.3.29f1, but it may work in earlier versions too.
In your hierarchy tab, select which bones you want to add properties for*. If you want to include all bones, select the parent bone and right click -> Select Children.
In your inspector tab, go to the Transform component and right click on Position, then select Add Key
Repeat step 2 for Rotation and Scale, if desired.
*: If you want to select multiple bones but not every bone, you can expand your list of bones and the use shift-click and ctrl-click (cmd-click) to select various bones.
I am new to Windows Phone Programming. In my application, I Have a listbox which lists the phone contacts. Currently it is listed as a regular list with equal size for list items in the UI.I am looking to modify the front end like this :
I dont want to have different sizes /back ground color for each list items rather a fixed UI and let the lists scroll through it and the list item in the view, at any time, should be displayed as in the picture.
I dont expect any codes as answers but any examples are welcome too, just want to know using what feature this kind of functionality is possible so that i can do my reading!
Thanks,
Deepak
It would be difficult to modify an existing control (ListBox for example) to act like this, so your best bet would probably be an ItemsControl with its RenderTransform set as a TranslateTransform.
If you place a Rectangle (with Fill="Transparent") over the ItemsControl, you can attach handlers to the ManipulationStarted, ManipulationDelta, and ManipulationCompleted events to control the "scrolling" by setting the TranslateTransform's Y offset.
To resize the items in the list there are two options: a custom panel or manual setting.
Custom Panel
You could create a custom Panel implementation that will appropriately resize its Children based on a property you would create to represent the scroll position. Set the ItemsControl to use your panel, and either through binding or attaching a handler to the panel's Loaded event and keeping a pointer to the panel, update the aforementioned property from inside the ManipulationDelta handler.
Manual Setting
From inside of the ManipulationDelta handler, you can also calculate the various heights of the boxes and use MyItemsControl.ItemContainerGenerator.ContainerFromIndex to get the visual for each item and set its height.
I would suggest putting this all inside of a custom UserControl.
You may have issues with clipping using the TranslateTransform but hopefully this will get you started. Unfortunately, this looks like a rather difficult control to try making as your first windows phone project!
So Finally I did manage to find a way to do it.
First approach was as #Murkaeus suggested, Using UserControl and ManipulationDelta event handler. However for some reason the manipulationDelta event was triggered only for 2 finger gestures (Zoom, Pinch..etc), I have no clue why. And after some trying I had to give up on this.
The next approach was using Listbox itself. The source of the Listbox was set as the List( of Models objects) that I create after reading the contact information from phone. The height and color of the listbox item was bound to a property in my model named "scaleLevel" and was accordingly converted by implementing IValueConvertors to give predefined color and height values for different scale levels.
I created an attached property for the scrollviewer vertical offset like mentioned [here] (http://www.scottlogic.co.uk/blog/colin/2010/07/exposing-and-binding-to-a-silverlight-scrollviewer%E2%80%99s-scrollbars/)!
This event is triggered on change of the vertical offset and every time there is a scroll, I find out which listbox item to be enlarged and which reduced based current vertical offset.
Once I have this information, I change the property ("scaleLevel") of the affected items in the List (of Model) (which is bound to listbox height and color). This change is updated in UI using the INotifyPropertyChanged Event.
I have no idea if this the best way of doing it , but it works well and there is no considerable in updating the UI despite the processing involved.
I would like to hear your opinion about the implementation and any other solution which you feel will work better.
I was wondering if it is possible to assign an eventtrigger to a source outside the current artboard.
Example: I have a text box that I want to slide out of one content presenter into another when a button is selected. I have it set up so the box slides out of one and I need to bind the box to slide into the new content presenter when the previous trigger was selected.
What you described sounds an awful lot like the FluidMoveBehavior from the Blend SDK. It's a more advanced Blend concept, but it's quite snazzy and should provide a nice animation as your move your control from one container to another. Here's a quick tutorial on it.
I want to use the same sort of UI style of Xcode has right above the editor pane, as show below:
I've browsed through all the Views in Interface Builder and can't figure out what type of view this is. At this point I'm merely referring to the bar itself; not to the controls nested inside the bar, though I will be adding dropdowns in the same way as this.
What type of view should I be looking for?
TextMate uses one along the bottom of the editor too, which provides similar controls:
see:
$(DEVELOPER_ROOT)/Applications/Utilities/Accessibility Tools/Accessibility Inspector.app
just open Accessibility Inspector.app and move the cursor over the views you're interested in for details (you may need to enable accessibility options in system preferences.app).
it's also helpful to press cmd+F7 to lock onto a view and then to inspect its children.
so... 3 primary options:
1) if you want drag & drop convenience, you can simulate it with a Gradient Button
2) or you can use the button with a custom image in the button to achieve something closer
3) or just create a new view subclass and render it using a CGGradient or NSGradient
Let's say I have a split view, and I want to fill half of it with a table view (a fairly common use case, I would think). Is there any way to tell the table view to size itself to fit the split view or do I really have to size it manually?
I've done this, the way Jon Hess mentions first. Assuming you're using Interface Builder version 3:
Drag and resize your GUI (tableview from what I understand?) component to fit into the enclosing area the way you want it.
Click it to select it.
Press Command-Shift-I to open the inspector window for this GUI component. The inspector window should now actually show that you've selected a "Scroll View".
Click the "ruler" heading to be able to set the sizing. You'll see to the right an animated representation of how your GUI component will behave within its enclosing GUI component, and to the left another represenation of the same, without animation, but with four springs and two struts that you can turn on or off.
Turn all six things on, making them red.
VoilĂ :-)
It's generally easier to create the subviews first, then use the Layout/Embed Objects In/Split View menu item to create the split view around them.
As far as I know, doing it manually is the only way to go. However, if you turn on "snap to cocoa guidelines", the inner view will snap to the edges of the enclosing view as you drag towards them. This makes it easier than having to manually mouse the edges into place, or manually edit the sizes to match.
You can set all of the springs and struts of the table view to "on" in the size inspector and that will cause the table view to fill the split view. Alternatively, you can use the outline view in the main document window to place the tableview's enclosing scroll view directly into the splitview instead of in an intermediary custom view.