Website may be up and down over next few months. I'm currently doing a complete overhaul of everything. Going back to simple individual .htm pages, new overall site theme, sanitizing and cleaning up html of all pages and blog posts, attempting to implement a new tooling and publishing system etc etc.

I was trying to figure out how I could apply multiple shader effects to a UIElement in xaml but was having problems. Then I realized I could just use a nesting approach and embed my ui element into a hierarchy of canvas elements or some other container control and apply an effect to that canvas.  I have provided an example below of how to do it in xaml ...

    d:DesignHeight="552" d:DesignWidth="702" Name="rootCtrl" Loaded="rootCtrl_Loaded">


GAH! Google is such phail, Bing is no better either. Been trying to find out how to use EF + SqlCe without having to specify any settings in my web.config.

Finally I found this page on unit testing that pointed be in the right direction.

And here is how to do it in code!

    public class testModel
        public int ID { get; set; }
        public int SomeID { get; set; }

    public class MyClass : System.Data.Entity.DbContext
        public MyClass() { }
        public MyClass(string filename) : base(filename) { }
        public DbSet TableTest { get; set; }
    public class HomeController : Controller

        public ActionResult Index()
            var path = this.Context.Server.MapPath("~/bin/");
            Database.DefaultConnectionFactory = new SqlCeConnectionFactory("System.Data.SqlServerCe.4.0", path, "");
            Database.SetInitializer(new DropCreateDatabaseIfModelChanges());
            var tmp = new MyClass("test.sdf");
            tmp.TableTest.Add(new testModel() { SomeID = 5 });

            return this.View(); 

Created by: X

Just another personal website in this crazy online world

Name of author Dean Lunz (aka Created by: X)
Computer programming nerd, and tech geek.
About Me -- Resume