Buttons mouse effects in windows store apps / WinRT? - c#

I have some tiles layed out as buttons in my app. Im not that good at xaml and hope someone here can guide or show how i come around making them behave alittle like the tiles in the start screen of windows.
I have with some template set. How can i add the little border when mouse is moved over it and how do i make it look like it gets pushed down when clicked.
my button is just a sqare box with a background color.

You have to edit the Control template for Button. And add an additional border which should appear on Pointer over state. Write your own animation in Visual State manager to achieve this. To make this more easier just open your project in Expression Blend. Right click the button and choose edit template. the default template will fell into resources, so that you can just modify.
http://msdn.microsoft.com/en-us/library/cc294908.aspx
To perform a push effect, need to animate Scale Transform in pointer pressed state.
Regards,

Related

how to make CircularFloatingActionMenu like android in c# WPF?

i use materialDesign Mahapps at c# wpf.
and i want make some floating button that open and spread other button when i click it.
i saw CircularFloatingActionMenu animation in android.
i already saw it
https://github.com/MaterialDesignInXAML
but i couldn't get something.
please see this(CircularFloatingActionMenu animation) and this(https://github.com/wasabeef/awesome-android-ui/blob/master/art/CircularFloatingActionMenu.gif) and know me how do i make it...
What you'll need is to use a StoryBoard Microsoft Documentation in WPF to animate several properties of the animated buttons such as Width/Height/Rotation/Opacity and X/Y to appropriate final location. You'll probably need another one to do the reverse.

WPF Window content navigation with slide in transition

I have been having a hard time trying to implement content navigation (with slide in effect) inside a window just like the one in Visual Studio Ultimate Setup.exe using Microsoft Blend for Visual Studio 2013.
The installer is a available from here and demonstrates the effect I'm looking for:
http://www.microsoft.com/en-us/download/details.aspx?id=40778
Please let me know if you know how to slide in another window content inside the same window as exhibited in the above setup file.
I would really appreciate it if you can show me how to do that in Blend editor visually instead of code. (I already tried displaying different pages inside a frame but I couldn't change the source of the frame inside the visualstate storyboard)
Thanks in advance!!!!
I think the way to do this is to use more than one navigation object. You have both on the page, but invisible. Then when they click NEXT, you use a storyboard to animate one off the screen and the next into the screen.
http://snsatyendra.wordpress.com/2011/12/30/create-navigation-using-fluid-ui-and-behaviors-in-wpf-and-silverlight/
I did something like this in Silverlight once. I had multiple usercontrols and just slide one off the screen and the other onto the screen. I had a reverse animation too. After the animation is finished, you can reset everything for the animation, setting the previous/next page contents ahead of time for the next animation trigger.
Also, check out http://msdn.microsoft.com/en-us/library/ff723946(v=Expression.40).aspx for the FluidMoveBehavior. That might help with animating.

How to avoid size change when user drag window to top/right/left of screen

When I drag a window to the Top/Left/Right of screen, the window will be magnified or max automatically.
How to avoid system max or magnify this window when user drag it to specified area?
If you want to disable Snap, please follow this guide
To turn Snap on or off
Open the Make the keyboard easier to use page by clicking the Start
button Picture of the Start button, clicking Control Panel, clicking
Ease of Access, clicking Ease of Access Center, and then clicking Make
the keyboard easier to use.
Under Explore all settings, click Make the mouse easier to use.
Under Make it easier to manage windows, do one of the following:
To turn Snap off, select the Prevent windows from being automatically
arranged when moved to the edge of the screen check box.
To turn Snap on, clear the Prevent windows from being automatically
arranged when moved to the edge of the screen check box.
Click OK.
As I mentioned in the comment, please don't try to manipulate this through (application specific) code.
Thanks for everybody...
I make a trick in SizeChanged event.
When size is changed, application will re-size to original size...

WPF: Slide Grid left with fade

What I want is for a user to click "Next" and then the current "page" of content (actually just a grid) slides left (off screen) and fades out whilst the new content slides in left from off the screen whilst fading in.
How can I achieve this as easily (and reusable) as possible?
Kevin's Bag-of-Tricks has a TransitionPresenter sample with a bunch of different transitions. It includes a wipe transition and a fade transition, but not a "wipe and fade". You can download the source, so you should be able to combine the two transitions.
Check FluidKit library from Pavan Podila (blog). It has exactly what you need (TransitionPresenter more specifically).
There is a project called Transitionals (it hasn't been updated in a while) that provides packaged transitions for WPF. You can extend it to include a Wipe and Fade transition for your needs. If you wanted to build it for yourself, it's not difficult if you have Blend (animations are not something at which the Visual Studio designer excels and I wouldn't want to code them by hand).

C# Change Global Mouse Cursor

I have a form with a Transparency-key color, where I'm doing a global mouse hook for the right click.
Until there everything is okay, but since the form is transparent, the mouse cursor is changing according to what is behind the form.
Is there any way to change the global mouse cursor?
Yup, that's how transparency works. Not just to the eye of the user, also to what the mouse sees from its left eye. Has to work that way, major user confusion if it didn't, no option to change it.
The workaround is to show a fake version of the desktop. A screen shot. Just what the ever popular Windows Snipping Tool does. Sample code is in this thread.

Categories

Resources