February 28, 2018

How do I get an animated gif to work in WPF?

You can install it with NuGet
PM> Install-Package WpfAnimatedGif
and to use it, at a new namespace to the Window where you want to add the gif image and use it as below

    Title="MainWindow" Height="350" Width="525">


    
     gif:ImageBehavior.AnimatedSource="Images/animated.gif" />
The package is really neat, you can set some attributes like below
     gif:ImageBehavior.RepeatBehavior="3x"
           gif:ImageBehavior.AnimatedSource="Images/animated.gif" />

February 27, 2018

Disable Browser Back Button Functionality using JavaScript

<script type = "text/javascript" >
   function preventBack(){window.history.forward();}
    setTimeout("preventBack()", 0);
    window.onunload=function(){null};
</script>

Suppose there are two pages Page1.aspx and Page2.aspx and Page1.aspx redirects to Page2.aspx

Dashboard | Log in
   

February 9, 2018

Township Game - Regular Customers


    Grandma


    Orders
    wheat - 5 (Available at the starting of game)


    Orders
    Bread - 1 (Available at the starting of game)