Programmatically applying a tilt effect on a stackpanel - winrt-xaml

I'm creating the elements of my WinRT app page during runtime because the contents are needed to be dynamically created.
I'm looking at Callisto and Telerik controls/effects and both of them applies the tilt effect during design time (on xaml).
Is there a way to apply the said effect during runtime? When I create my stackpanel on code - behind.

Ended up doing a custom user control, which is my last resort.

Related

windows 10 UWP UI design for mobile device

I am working on windows 10 mobile app. If I design an UI for 5' device, it doesn't look good on 5.2' device. Also on emulators of different screen size show messed up UI. Is there any work around this? Or do I have to design it for every screen size?
Usually, please avoid to have fixed Width/Height for your controls. With a Grid layout, you can set columns/rows and place your controls inside each cells. This is a first level to adapt properly your interface. In addition, UWP provides AdaptiveTriggers if you want to adapt the layout based on the screen resolution (cf. https://channel9.msdn.com/Series/A-Developers-Guide-to-Windows-10/07) for additional information. Last but not least, please check Design&UI documention on https://developer.microsoft.com/en-us/windows/design.
The trick is with UWP that you can design for every screensize at once. It's just a responsive design you use (either HTML/CSS or XAML). But you have to use the right controls and settings.
Some guidance on how to design for various sizes can be found at the MSDN design page.
To create a dynamic layout with XAML, see this article. There are various panel-types you can use to do the layout (see this article). But if you really want to build a responsive UI (or change it dramatically in various sizes) RelativePanel is your friend.

JavaFX GridLayoutPane with GridData.heightHint not updating unless Focus changes

I created a GridLayoutPane and want to set the size of its children programmatically. This is working fine and the sizes are set correct,
but they are not applied after beeing set automatically.
My first thought was that I might have to call .layout() on the Pane, but this has no result at all. Now I noticed that my heightHint (on the GridData) do get applied when I click on a TextField after generating the heightHint (so changing focus does the trick)
I try to get a look into the world of JavaFX
SWT was my default for years nowm but for several reasons I try to port my widgets to JavaFX.
GridLayoutPane http://efxclipse.bestsolution.at/doc/api/org/eclipse/fx/ui/panes/GridLayoutPane.html
is there a manual way to tell JavaFX to layout ALL nodes on a Pane?
layout()
layoutChildren()
requestLayout()
have no result!

WinRT XAML custom Transition

Is it possible to implement a custom Transition in WinRT?
E.g. it would be nice to have transitions for the control visibility. So when you show/hide a part of a split view it animates the entire view by using a sliding effect.
Yes you can, using the usual WPF animation techniques, only with minor changes to WinRT.
The usual pattern is to apply double/color/easing animations to your UI elements via storyboarding - being triggered by changes in the visual state manager. You can do this either declaratively or via code-behind.
http://www.codeproject.com/Articles/23257/Beginner-s-WPF-Animation-Tutorial
http://blogs.msdn.com/b/wpfsdk/archive/2009/02/27/the-visualstatemanager-and-triggers.aspx
As far as I know you can't build your custom transitions and use them like normal WinRT Transitions, that is, inside a TransitionCollection.
<ListView.Transitions>
<TransitionCollection>
<myTransitions:PotatoeTransition/>
</TransitionCollection>
</ListView.Transitions>
You can't do the above as far as I know. (ignore the fact that I exemplified with a ListView, it applies to everything, I think)
You'll probably have to use a Storyboard that animates both the RenderTransform (TranslateTransform) and the Opacity to achieve your objective.
I think you can still create a Behavior though if you want to make it more reusable.

WinRT: how can I set diffrent pointer over effect for elements in gridview?

I need to set different rollover effect for elements in gridview. I created calendar and need to back-light days that were gone and remove rollover effect for other days.
How can I do this?
I found similar question
Windows 8 GridView - disabling item tap visualization
but it didn't work
The roll-over effects for a GridView are managed as part of its ItemContainerStyle.
In Visual Studio, right-click on the GridView on the left and select Edit Additional Templates, Edit Generated Item Container (ItemContainerStyle), Edit a Copy.
In the style that gets generated you'll find a VisualStateGroup called "Hover". These are the changes that take place to the container when a user is hovering over an item. At the bottom of the template you'll find the item container and the default wrapper for the grid-item (a border with checkbox). You'll need to change this and then modify the VisualStateGroups as appropriate.

UIImagePickerController: Custom camera overlay sitting on top of default controls?

I'm creating a custom camera UI using UIImagePickerController cameraOverlayView property. However, I'd like to keep some of the existing UI -- specifically the flash and camera selection buttons at the top.
My thought was that I'd keep showsCameraControls = YES set the cameraOverlayView to my custom UI and then use [picker.view bringSubviewToFront:overlayView] to make sure my controls on the bottom are sitting on top of the default controls.
Alas, this does not work. I've tried moving the overlay to the front of the view hierarchy in various places without luck. Is there any UIImagePickerController hackery that could achive this? It seems a shame not to be able to reuse at least some of the camera controls while still customizing the UI.
Further investigation it appears this is not possible. You either have to use all of the default cameara UI or none of it.

Resources