What is Continuum Transition ExitElement and how do I use it? - windows-phone-8.1

I am adding ContinuumNavigationTransitionInfo to my application, and I have an issue (I'll get to it in a moment) which I think might be solvable by setting the ExitElement property to something appropriate. So, what does ExitElement do, and how do I use it?
For example I see no difference setting the property (very naively):
<Page.Transitions>
<TransitionCollection>
<NavigationThemeTransition>
<ContinuumNavigationTransitionInfo>
<ContinuumNavigationTransitionInfo.ExitElement>
<Canvas Background="Red" Width="500" Height="500" />
</ContinuumNavigationTransitionInfo.ExitElement>
</ContinuumNavigationTransitionInfo>
</NavigationThemeTransition>
</TransitionCollection>
</Page.Transitions>
The issue I'm trying to solve, which I'm hoping I might be able to solve with this property, is that I have a page in my app which forces the light theme (RequestedTheme="Light"). This page can link to itself, but as I'm running the OS in dark theme, I see a startling black flash in the transition, which I think is the OS theme background color, which I'd like to override as white.

You set the exit element on one of your content elements on your page, not in the TransitionInfo iself. I is only writable, because the page will set the exit element when initiating the transition.
Like for example:
<TextBlock Text="This is the exit element" ContinuumNavigationTransitionInfo.IsExitElement="True" />
If you set this, the exit element will get animated (it kind of flies out to the bottom of your page). You don't have to set it to the ContinuumNavigationTransitionInfo itself, but on one of your pages elements.
Also be aware: The Exit element is set on the page from that you are navigating TO a page with the Continuum Navigation on it.
So:
Page 1 (Set IsExitElement = true here)
Page 2 (Set ContinuumNavigationTransitionInfo here)

Related

auto hide the sidebar menu - wordpress

http://www.new.techmoney360.com is the website and it's made in wordpress.
If you visit the site you will see a big "showcase" type banner as the first item below the navigation bar.
To the right is optional other posts that a user can choose, or they can choose to hide it or show it.
By default, it's showing. I would like to make it hide on default and have the option to show it instead.
Anyone know how I can do this?
Open the file /wp-content/themes/discussionwp/assets/js/modules.min.js, find the first mkd.windowWidth<769?, where the 769 (actually 768) means the maximum window width to auto hide the "showcase" on default. You can modify this number into a larger one (which is obviously larger than normal width of browser window, such as.. 9999?) without editing other part of this encrypted JavaScript file.
Once you've done this, there will be an animation of hiding progress when you visit the site. If you want to get rid of this animation as well, you can add a property style="left: 100%;" in <div class="mkd-post-block-part mkd-pb-four-non-featured">, in Line 813 (as I can see) of the index file.

How to change page transition in Windows Phone 8.1

I'm doing an application in windows phone 8.1 that contains several pages and you can navigate between them.
Default animation when I change the page it's like a flip animation. Is it possible to change it?
I want a fade out (page that is going out) and fade in (page that is going in) in most of changes. Is it possible?
I tried to put this:
<Grid.Transitions>
<TransitionCollection>
<ContentThemeTransition/>
</TransitionCollection>
</Grid.Transitions>
but I still see flip transition.
Thank you very much!
You have to use a Navigation Transition in each page to decide the transition used when you navigate to that screen.
For example, with this code you'll use a SlideTransition when you go to that screen and when you leave it:
<Page
...>
<Page.Transitions>
<TransitionCollection>
<NavigationThemeTransition>
<NavigationThemeTransition.DefaultNavigationTransitionInfo>
<SlideNavigationTransitionInfo />
</NavigationThemeTransition.DefaultNavigationTransitionInfo>
</NavigationThemeTransition>
</TransitionCollection>
</Page.Transitions>
...
</Page>
Some transitions are:
CommonNavigationTransitionInfo
SlideNavigationTransitionInfo
ContinuumNavigationTransitionInfo
I'm not sure if there're more or if you can choose a fade in/out.

Flex 4 <s:Scroller> Recalculate Range?

I am building a Flex 4 application which uses a <s:Scroller> component to vertically scroll overflown content. Let me explain what happens before I ask my question:
The body of the page is loaded from a database
Once the information has loaded, the "body" of the application (in this case the list of items you see below) is constructed
Once the list is constructed, the entire encapsulating component is transitioned into view using TweenMax, like so:
myComponent.visible = true;
TweenMax.to(myComponent, 1, {
alpha : 1,
y -= 20 //Slides the component up 20px from its original location
});
Below is the result. Notice how the scrollbar is scrolled the whole way down, but you can see the tips of a few white letters that were cut off at the very bottom.
Using my custom menu, I can navigate away from the page, and come back to it, and Flex will correctly recalculate the range of the scroller so I can scroll down and see all of the desired content. This issue only happens if the initial URL that the user enters is a longer page like this one.
Any ideas on how I can force Flex to recalculate the range of the scroller?
Thank you for your time.
Ok, after many hours of researching, piecing together, and trial and error here is what I came up with.
What I was doing wrong:
When I first posted this question, the "component" that I had mentioned was already added as a child element of the <s:Scroller>, but collapsed and hidden away, like this:
<comp:MyComp alpha="0" height="0" visible="false"/>
When the data would be loaded and the component's visual appearance would be restored and transitioned into place, like this:
myComp.visible = true;
myComp.height = NaN;
myComp.invalidateSize();
myComp.height = myComp.measuredHeight;
TweenMax.to(myComp, 1, {
alpha : 1,
y -= 20 //Slides the component up 20px from its original location
});
This method of approach didn't force the <s:Scroller> to recalculate its proper size until later, sometimes not until myComp was transitioned away and another component was transitioned into place using the same method. Even then, the size of the scroller would fit the size of the previous component, not the one that is currently displaying.
Now, what I am doing correctly:
My research showed me that anytime the addElement() method is called, either directly within the <s:Scroller> itself or by any of its children, the scroller's measure() method is called, and properly re-sizes the scroller.
Instead of placing the components inside of the scroller and simply hiding them until I need them, I dynamically created them in ActionScript, set their properties, and added and removed them as needed using the addElement() and removeElement() methods respectively. Now, as old elements are transitioned away and new ones take their place, the scroller re-sizes itself correctly.
There was one final problem that I was faced with. If the very first page the user was viewing (i.e. there was no previous component that was transitioned away and destroyed) required a scroller, it wouldn't show up.
I corrected this final issue by adding an event listener that listened for when the new component had finished transitioning into place. Inside of the event handler, I explicitly set the height of the component using this code:
newComp.height = NaN;
newComp.invalidateSize();
newComp.height = newComp.measuredHeight;
Now that the component has an explicit height, the scroller now appears, even if it is the first page.
The scroller now works as expected in all cases, and does not cut off any content or disappear when it shouldn't.
I hope that it is helpful to someone.

Adobe air mobile - softKeyboardType is not working when using skinClass to allow scrolling?

I am trying to set the softKeyboardType to email but when ever i use skinClass="spark.skins.mobile.TextAreaSkin" it doesn't change it but when i take off skinClass="spark.skins.mobile.TextAreaSkin" it does work. The problem is i need the skinClass="spark.skins.mobile.TextAreaSkin" class to allow my application so scroll with out it the text does not stay with in the bounds of the text input boxes. Has anyone seen this problem or another fix the the scrolling problem?
Code examples
<s:TextInput softKeyboardType="email" id="id1" width="100%" skinClass="spark.skins.mobile.TextInputSkin" />
<s:TextArea softKeyboardType="email" id="id2" height="400" width="100%" skinClass="spark.skins.mobile.TextAreaSkin" />
Thank for the help,
Justin
I've checked mobiletheme default.css in flex 4.6 sdk
adobe is using different skins for TextInput and TextArea components
TextArea
{
...
skinClass: ClassReference("spark.skins.mobile.StageTextAreaSkin");
}
TextInput
{
...
skinClass: ClassReference("spark.skins.mobile.StageTextInputSkin");
}
so I think you should use StageTextAreaSkin or StageTextInputSkin as a skinClass for corresponding components
softKeyboardType will work in this case but text position problem will stay, I think you will need to change/fix StageTextAreaSkin or StageTextInputSkin sources for your scrolling
Confronted with this issue, I came up with a workaround which worked in my case.
Use default skin, set your softKeyboardType.
While doing layout for your screen, create a section which contains the uppermost part of your screen and which you can easily collaps or toggle its includeInLayout property, so when you do that, it will make your TextInput or TextArea to appear over the keyboard, bypassing the scroller for that purpose.
Then, when your field receives focus, in focusIn handler, you collaps or toggle this section. This does two good things: first, it lifts your field over the keyboard, and second, it removes focus from your field (at least in my case it did, not sure 100%, if it doesn't, then shift focus manually). This is good because when you set focus on your field once again (yourfield.setFocus()), the cursor will appear where you want it, within the bounds of your field.
Once done typing, you restore top section to its original state from focusOut or softKeyboardDeactivate handlers.
Hope this helps...
seems like it's flex 4.6 bug
http://forums.adobe.com/message/4122095

Flex: Everything goes white when I switch TabNavigator tabs

I've just dropped a TabNavigator into my application:
<mx:TabNavigator width="100%" height="100%"
backgroundColor="#F7F7F7">
<custom:SomeCustomContainer label="Details" />
<mx:Canvas label="Reporting" width="100%" height="100%">
</mx:Canvas>
</mx:TabNavigator>
And when the app first loads, everything seems fine:
everything working http://img.skitch.com/20090818-dimqrp3ghd89fp9eftipafajk3.jpg
Until I click the 'Reporting' tab. Then, sometimes, the the rest of the application (that is, everything outside of the TabNavigator) goes white:
alt text http://img.skitch.com/20090818-tgud6797qcx18fwxwkik38nrp9.jpg
Everything seems to go back to normal when Flash is asked to do a redraw (for example, the browser window looses then regains focus).
So, err… Is this normal? Is there some simple way to fix it?
Edit: I've tried a variation on Joel's suggestion:
// Where 'this' is the main Application
ChangeWatcher.watch(this, ["myTabNavigator", "selectedIndex"], function() {
invalidateDisplayList()
});
And it mostly works… Except for a small portion of the ApplicationControlBar, which remains white:
control bar is still white http://img.skitch.com/20090903-fbif9r67jg9wx1rkiwad7sbey6.png
Setting the historyManagementEnabled property of the TabNavigator to false works for me.
I had this issue with Firefox on Mac. I use PureMVC so my solution wasn't too painful, but I manually dispatch an Event.RESIZE from my root application when I switch tabs. This forces the displayList to refresh and solved the problem.