Blur the background of the WPF container

no, it is not possible. The Effect is applied to the element and all its children but you can easily place the TextBlock outside the container, rather than inside it. Normally you would use a grid like so: <Grid> <Border> <Border.Effect> <BlurEffect Radius=”5″ KernelType=”Gaussian”/> </Border.Effect/> </Border> <TextBlock …/> </Grid> In your example that will make … Read more

Does jQuery have a plugin to display a “message bar” like the Twitter “wrong password” bar at the top of screen?

You can do this with just a few lines of code, like this: ​​​​function topBar(​​​message) { $(“<div />”, { ‘class’: ‘topbar’, text: message }).hide().prependTo(“body”) .slideDown(‘fast’).delay(10000).slideUp(function() { $(this).remove(); }); } Then just give the class you use some styling, for example: .topbar { background: #990000; border-bottom: solid 2px #EEE; padding: 3px 0; text-align: center; color: white; … Read more

Android: How to create fade-in/fade-out sound effects for any music file that my app plays?

This is my entire handler class for Android MediaPlayer. Look at the play() and pause() functions. Both contain the ability to either fade or not. The updateVolume() function was the key to let the sound increase/decrease linearly. package com.stackoverflow.utilities; import java.io.File; import java.util.Timer; import java.util.TimerTask; import android.content.Context; import android.media.MediaPlayer; import android.net.Uri; public class MusicHandler { … Read more

How to attach callback to jquery effect on dialog show?

Update 2015-07-27 For anyone using jQuery v1.10.0 or above please see this other answer as my solution will not work with newer versions of jQuery. Original answer Already answered but since I had an answer, I’m going to post it anyway… $(‘#dialog’).dialog({ show: { effect: ‘slide’, complete: function() { console.log(‘animation complete’); } }, open: function(event, … Read more

How can I add moving effects to my controls in C#?

Window animation is a built-in feature for Windows. Here’s a class that uses it: using System; using System.ComponentModel; using System.Windows.Forms; using System.Runtime.InteropServices; public static class Util { public enum Effect { Roll, Slide, Center, Blend } public static void Animate(Control ctl, Effect effect, int msec, int angle) { int flags = effmap[(int)effect]; if (ctl.Visible) { … Read more