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.
Related
i need to create a MCQ question with 4 options. On clicking any option i need proper correct mark with some color animation over it. how to do this animation part in appcelerator Titanium. Share link to achieve it.
Animations are handled by the view object in Appcelerator. So, for example, if you put your answers in a label object, inside a view, then you can apply a animation. See the documentation and examples here: http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.Animation
I am in process of developing custom GUI generator tool (its new GUI tool like glade) and to achieve that i am using ruby-gtk2. I am a newbie to the world of ruby and gtk, so i need a help in a problem which i am struck regarding adding background image to a widget.
Let me explain in detail, the application (i.e.,GTK::window) has two sections say left section and right section (section can be frames,layouts,panned window or equivalent). Left section has a list of all widgets like Button, Label, CheckBox and so on as images. So user who needs to design the GUI will drag and drop any widgets from left section to right sections, on dropping to right section it (i.e., widget) should be re-sizable and also draggable across right section.
Currently i am adding all widgets to eventbox so that on drag n drop on right section i will get all the controls of events like drag_start, drag_motion, drag_end etc..But how can i add an image as background to eventbox, so that i have button image added to eventbox and also handle resize and drag. Concept is user should be able to resize the properties of widget that drops to right section. Need help in implementing this, i know i am missing something to achieve this. Awaiting any suggestions.
I am following some tutorials with expression blend and many of them are tell me to drag a TextBlock from the toolbox. Sure enough I see it, if I long click on it it displays for additional controls.
So if I click it and drag it it should work but it opens up the other controls.
If I double click it then it places it in my design view but I want to drag and drop it.
Am I missing something here, the tutorials I am following are for Expression Blend 4 and I am using Expression Blend 4.
Thinking about it, its sounds correct that you should be able to drag and drop a control on the design surface, but it doesn't work here.
Well in Standard Expression Blend and I assume there is only one version of Expression Blend 4 you actually can't place controls via drag and drop from the toolbox onto the design surface. At least this is my experience.
If you want to place a control what you do is to choose a control via left mouse click in the toolbox which makes it the currently selected one. Then you can place it onto the design surface by defining its dimensions at the place you want to have it positioned.
AFAIK there is no function to drag a control out of the toolbox.
I'm building a BattleShip game for WP7 that has board with 250 cells. I need to make each cell clickable, so I thought to put in each cell a button and handle each click as I need.
My question is: do 250 buttons slow the phone? If it does, so what are the alternatives?
Hell yes. 250 UI controls are complete utter madness. The alternative, and correct solution, is to use XNA instead, and developing your game as a real game, and not as a bunch of UI controls.
Yes, 250 buttons will make your application quite slow. Silverlight constructs a visual tree to represent your UI. Each button contains a template which generates various broders, rectangles etc ... for representing visual states.
A couple of alternatives are:
Use a more lightweight visual elements, for example Rectangle. These do not have a Click event, so you can handle MouseLeftButtonUp instead.
Probably the most lightweight approach is not to have an element for each cell at all. Simply handle mouse interactions on a parent element, then determine the grid cell from the click location. The MouseEventArgs contain a e.GetPosition() method that allows you to determine where the mouse click occurred.
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.