Simple XAML-only Animation to Change Image Opacity on Button Click - xaml

I'm trying to create a simple animation example on the Windows Phone 8, but I imagine this should apply for WPF, WinRT, etc. anywhere XAML is used.
How do you animate the opacity of an to change from 0 to 1 when a 's click event is fired?
I've seen many examples of animations, but the button is always animating it's own properties, not the properties of a different control. I know I'm missing something small but I'm stumped -- no matter what I try I get XAML parse exceptions. I can get this to work with C#, but not with XAML.

Here is easy way to handle storyboard animation on any component and control by another component
http://msdn.microsoft.com/en-us/library/windows/apps/dn263220.aspx

Related

Click and drag selection box in UWP

Is it possible to implement mouse click and drag selection box in GridView UWP Windows 10. Should it be done through simply drawing a rectangle, calculating coordinates of its points and evaluating position of other objects inside this box? Or are there some other ways?
Could you give a bit of sample code or a link?
The Universal Windows Platform does allow for Drag-And-Drop behavior. This includes drag from app and drop outside of app, drag and drop inside the app, and drag from outside the app and drop in the app.
The way to do this very simple (with room for heavy customization if you feel like it is needed): UWP XAML controls have a CanDrag and AllowDrop properties. The former is just a property of whichever control you're dealing with, the latter is an event that needs to be handled properly via code. If you want to further customize your app you can also handle the DragOver, which handles behavior when a dragged item is over a drop area but has not been "released" yet.
For further details and a bit example code please read Microsoft's own documentation for Drag-And-Drop. For a more built up example, you can check out the following Github repo.

Windows Phone 8.1 Create a Swipeable Scrollable Control

I am trying to create an animation to a control.
So think of the animation and control of a now playing page on most touch screen devices. You see the control (album photo) and swipe either way and get it to slide off the screen and then the next control (album photo) slides on in its place.
I am not asking for you to code me this, but I am having trouble wrapping my head around a way that this could be done.
The control content is always changing, when you swipe one way, an image is removed from the view and then the next is added.
What you need is FlipView control which can get you the interface you described.
Here are some references:
Quickstart: Adding FlipView controls (XAML)
XAML FlipView control sample

Detect end of GridView / ListView in Windows Store 8.1 App

Both GridView and ListView have a nice "bounce-effect" when you try to scroll beyond the begin or end.
Some applications (on other platforms) use this "drag-beyond-end" gesture as a trigger for some actions, like loading more items.
How can I detect this "state" (=user is at the begin/end and tries to scroll beyond that) in Windows Store App using XAML/C# ?
The rubber-band effect cannot be detected by code in a Windows 8 app (verified with the XAML controls team).
One way you could do that would be by handling all the inputs and the rubber-band effect yourself, but that is a bit of work, it reduces scrolling performance and requires manual handling of input on any list elements as well, so I would only recommend it as a last resort.
Also note the problem of the mouse input scenario since mouse scrolling doesn't involve this pull-beyond-edge behavior.
If you just want to load more items when you reach the end of the GridView, implement the ISupportIncrementalLoading interface with your collection derived from ObservableCollection<T>. See the answer here Load more items on grid view scroll end.

Detecting a scroll event in GridView (Windows 8)

How do we detect a scrolling event in GridView (like ViewChanged on ScrollViewer) on somethig like the default GridView template sample app? I'd like to replicate the effect that the netflix App does on the left red strip.
I tried putting the GridView inside a scrollviewer, but I've been unsuccessful at stretching it to fill the screen for different resolutions.
Update: I intend to use this with VariableGrid control that's on NuGet - though it's not an official control, it inherits GridView
The best way to do this seems that you can read through the components of the control, and assign events to it. based on what's happening in this example
http://mikaelkoskinen.net/post/WinRT-XAML-Automatically-Scrolling-ListView-to-Bottom-and-Detecting-When-ListView-is-Scrolled.aspx
I grabbed access to the scrollbar, suing the VisualTreeExtensions and I could capture the event Scroll, just like in the example. I had to read the children when the Loaded event of the grid was fired.
There is a simpler way.
Edit a template of the GridView, and look inside the XAML to find a ScrollViewer which is a component of the GridView.
The ScrollViewer has a ViewChanged event that you can subscribe to. Now whenever the GridView is scrolled, this event will be fired.
Try ManipulationCompleted and PointerReleased events on GridView. This is just using keyboard mouse..

How do I change the color of TableView and Button controls in iOS?

I designed a web app for iPhone and am now trying my hands at a native Objective-C version, and I'd like to retain some continuity with my original design. Since my web version uses CSS, I was able to customize the color palette, even though the UI was designed to imitate a native iPhone UI. I'd like to use a similar color scheme for my native app, but it doesn't seem so easy out of the box. I've gone through a couple tutorials and played around a bit with Interface Builder, inspecting the individual settings available for each control. My biggest questions are:
Is it possible to (or how do I) change the color of a Round Rect Button?
Is it possible to (or how do I) change the color of cells in a Table View?
Where in the Cocoa Touch Library can I find the standard iOS UI buttons, e.g. the green "Call Back" and red "Delete" buttons in the native voice mail?
Thanks
Nope, I don't think so. And you probably shouldn't anyways. In my opinion it's better to rather stay consistent with the OS and not the web... What you can do is to use a custom image.
UITableViewCell has a property named backgroundView, which is only present if you have a grouped style. This view has -- just like every other view -- a background color. If you don't have this and want to color individual cells, build a custom cell where you put in a view as background view.
As far as I know, they are not publicly available. However, you may find a lot of template images etc on the web that you can use.