Dax Pandhi's nAESTHETIC Dax Pandhi's nAESTHETIC Dax Pandhi's nAESTHETIC Subscribe to this Blog's RSS feed Subscribe to my DeviantArt RSS feed

Popular art from my DeviantArt account:


  Saturday, September 30, 2006


Designers and Developers wanted for high-profile projects at Nukeation Studios

Nukeation Studios has divided right into the thick of WPF since the first bits were released. We were the first company to offer WPF consulting services on the Internet. Over the last year we have made a lot of progress in WPF and are ready to offer even more services and products to the industry - all based around WPF and .NET 3.0.

We are looking for freelancers for the following roles:

  • Windows Presentation Foundation Designer
  • Windows Presentation Foundation Developer (C# or VB)

Intermediate knowledge of Microsoft Expression Interactive Designer is a must. Basic knowledge of Microsoft Visual Studio 2005 is also required. For WPF Designer position, extensive knowledge and experience with CorelDRAW or Adobe Illustrator, and Corel PhotoPaint or Adobe Photoshop, is a must.

Geographic location irrelevant. You will be expected to work via the Internet. Professional experience is not a requirement, but is a plus. We offer some of the finest perks and the opportunity to work on some seriously high-profile projects. If you're really good, you can also expect a long-term relationship with us.

Please submit your résumé with a link (do not attach!) to at least one sample (compiled EXE only, no source required) of work done in WPF to dax [at] nukeation [dot] com. Please make the subject of the email "WPF Designer" or "WPF Developer" as appropriate.

There is no deadline, but positions are limited.









  Wednesday, September 27, 2006


nAesthetic 2.0

I'm expecting a rush on my blog soon - very soon. So I went ahead and made the blog interface more user-friendly. As usual, people reading this via RSS feeds are encouraged to visit http://www.naesthetic.com and check out the new UX.

There are some big, big, big things in the works. Stay tuned. ;)









  Saturday, September 23, 2006


How to use Aero Glass in your WPF applications

Aero Glass
Just about everyone making (or thinking of making) an application for Windows Vista wants to try out the cool new Aero User Experience. Software such as Windows Media Player, Windows Calendar, and the Windows Sidebar really show off the Aero glass look.

While overusing the glass bit is a certain possibility (and a probability), using it judiciously can seriously help spice up your app. A few things to keep in mind when using Aero Glass:

  • Avoid a full glass window. This creates performance as well as usability issues.
  • Use full glass windows only for non-resizable, non-maximizing windows.
  • The glass portions of the window should always allow the entire window to be dragged.
  • When designing the window, keep in mind what it will look like in a pre-Vista OS – i.e., without glass. Always have a non-Glass look ready to fall back on if Aero is disabled or if the app is run on an older Windows.

This exercise will require a good GPU (128MB AGP recommended).

Thanks to Adam Nathan for the original code!

The Code

Create a new code file and add the following code:

using System;

using System.IO;

using System.Net;

using System.Windows;

using System.Windows.Controls;

using System.Windows.Data;

using System.Windows.Media;

using System.Windows.Media.Animation;

using System.Windows.Navigation;

using System.Windows.Interop;

using System.Runtime.InteropServices;

using System.Collections.Generic;

 

namespace AeroGlassExample

{

    public class GlassHelper

    {

        struct MARGINS

        {

            public MARGINS(Thickness t)

            {

                Left = (int)t.Left;

                Right = (int)t.Right;

                Top = (int)t.Top;

                Bottom = (int)t.Bottom;

            }

            public int Left;

            public int Right;

            public int Top;

            public int Bottom;

        }

 

        [DllImport("dwmapi.dll", PreserveSig = false)]

        static extern void DwmExtendFrameIntoClientArea(IntPtr hwnd, ref MARGINS margins);

 

        [DllImport("dwmapi.dll", PreserveSig = false)]

        static extern bool DwmIsCompositionEnabled();

 

 

        public static bool ExtendGlassFrame(Window window, Thickness margin)

        {

            if (!DwmIsCompositionEnabled())

                return false;

 

            IntPtr hwnd = new WindowInteropHelper(window).Handle;

            if (hwnd == IntPtr.Zero)

                throw new InvalidOperationException("The Window must be shown before extending glass.");

 

            // Set the background to transparent from both the WPF and Win32 perspectives

            SolidColorBrush background = new SolidColorBrush(Colors.Red);

            background.Opacity = 0.5;

            window.Background = Brushes.Transparent;

            HwndSource.FromHwnd(hwnd).CompositionTarget.BackgroundColor = Colors.Transparent;

 

            MARGINS margins = new MARGINS(margin);

            DwmExtendFrameIntoClientArea(hwnd, ref margins);

            return true;

        }

    }

} 

 

In your Window.xaml file, make the DocumentRoot object's Background to NULL then just insert the following code (marked in bold) in the codebehind file:

using System;

using System.Text;

using System.Windows;

using System.Windows.Controls;

using System.Windows.Data;

using System.Windows.Documents;

using System.Windows.Input;

using System.Windows.Media;

using System.Windows.Media.Imaging;

using System.Windows.Shapes;

 

namespace AeroGlassExample

{

    /// <summary>

    /// Interaction logic for Window1.xaml

    /// </summary>

       

    public partial class Window1 : System.Windows.Window

    {

       

        private bool neverRendered = true;

       

        public Window1()

        {

            InitializeComponent();

            this.SourceInitialized += new EventHandler(Window1_SourceInitialized);

     

        }

       

        void Window1_SourceInitialized(object sender, EventArgs e)

        {

            GlassHelper.ExtendGlassFrame(this, new Thickness(-1));

        }

       

        protected override void OnContentRendered(EventArgs e)

        {

            if (this.neverRendered)

            {

                // The window takes the size of its content because SizeToContent

                // is set to WidthAndHeight in the markup. We then allow

                // it to be set by the user, and have the content take the size

                // of the window.

                this.SizeToContent = SizeToContent.Manual;

       

                FrameworkElement root = this.Content as FrameworkElement;

                if (root != null)

                {

                    root.Width = double.NaN;

                    root.Height = double.NaN;

                }

       

                this.neverRendered = false;

            }

       

            base.OnContentRendered(e);

        }

       

    }

       

}




You will get the following result:



If you replace the thickness(-1) with thickness(5,70,5,42) you get something like this:



You can download the full code below. It requires Windows Vista RC1 or later, .NET Framework 3.0 (RC1), and Microsoft Expression Interactive Designer September CTP.

AeroGlassExample.zip (14.43 KB)









  Thursday, September 21, 2006


Perplex: Coming Soon

I've tried often to keep a personal website. First there was this unmentionable, horrible website (my first actually! back in the day you made a web page - not a web site), then long years later, there was AFTER-IMAGES (art), then PIXELATED FOCUS (photography), then recently DIGITAL EXILE (art + photography).

In this long tradition the newest generation shall soon be unveiled - PERPLEX. The site will no longer be nomadic but be anchored to http://dax.nukeation.com where it shall stay until the end of time.

Perplex? That's a weird name.

Oh, not really. If you personally know me, you may know that I live by the motto: "the purpose of my life is to confuse as many people as possible". And I always do. I'm often confused myself.

This name was also chosen to reflect the look on the viewer's face when seeing my work or words.

Subscribe to the new RSS feed (a category of this very blog) for updates to my photography and art collections. The site will be online soon enough.









  Wednesday, September 20, 2006


The Code Veterans Reunion

Lt. Cmdr. D. Code:

"Aye, laddie, when we cohded back in the dayh, we haid no stryctyrs. We just payssed 'em vayriabuls one by one."

Gen. A. Bugbyte:

"vayriabuls? you had vayriabuls? Back in my day we didn't even have 1's and 0's, we just had 1. (we had to simulate 0)"









  Saturday, September 16, 2006


The Solace Adventure

A few weeks ago, I had the opportunity to cover new territory near Solitude. The whole place is amazing! As I've mentioned a hundred times, we actually have GRASS this year! And a desert animal like me goes wild when he sees all this green!

Now the trek from Solitude to the new place I've dubbed Solace, is not quite that long. But it is a bit deeper into the hills, and these parts are known to have wolves and even a panther or two. I've seen both of 'em first hand (in another place) so I know the danger. Joining me for this little adventure was Nukeation's newest addition, Parvez Ansari. We were both armed. No, no. No firearms. Just your standard issue melee weapon (see Parvez try to attack me with it in a later photo).

Just look at this photo from the point where we started. Wouldn't that make you just want to go ahead and explore?!

We started at around 5pm. Just 20 minutes of walking later, I saw this cool roundish hill that I just HAD to climb. The surface was covered with small loose stones, hidden by the new grass. Parvez decided to stay back (afraid of heights, I believe) as I ventured forth. To boldly go where some men have gone before. That's my motto. So I climb easily halfway up the hill when I suddenly realized that the rest of the slope was practically unclimbable. The loose stones were dangerous. So then I decide to turn back only to notice that the climb down from the hill would be just as bad, if not worse. Too bad I had the camera, otherwise Parvez might've gotten some cool shots of me panicking.

Now as I'm trying to decide whether to go up, down, or sideways, I suddenly look down and find myself standing not more than 3 centimeters away from a SNAKEHOLE! It's actually a mouse hole. But you can often find snakes living inside them after having the previous resident for dinner. I threw my backpack to Parvez, and slowly began to climb back down. It's a wonder that I did not fall. I did manage to get this beautiful shot of Solitude as seen from this hill. It's a good thing I wasn't able to climb up the hill. The top, as we saw from the other side later, was filled with dry bushes that would definetely hold one or more snakes or other small creatures that might be harmful.

We decided to go around the hill and the nearby lake. Just take a look at all the grass covering the land!!! Woohoo!

We kept following the small creek (see the first photo above) as it had made a clean path through the rocks. I was a bit disappointed that there were no snakes around. But here's a resident of these parts. Isn't he a beauty?! (that one's for you Steve-o!) It's a dragonfly! I've seen this particular dragonfly and his mate (or her mate?) before, I think. The photos I took have the same wing and body patterns. I wonder how long they live.

As soon as we followed the creek path to its end, I saw this AMAZING rocky structure. I couldn't not climb it!! It was beautiful! See for yourself:

The rock was roughly 25 to 30 feet in height. Not making the same mistake again, I gave my camera to Parvez and climb this sucker. This one had loose stones on it as well (the whole damn place was covered in them, it seems), but this was pure rock not gravel, and I'm much more comfortable climbing those. Took me only a couple of minutes to climb it, and the view from atop was AMAZING! Too bad Parvez had the camera. Too bad we took only one camera!!! I have to go back there soon!

This rock, dubbed The Holy Mound of Solace (hey, I had climbed it, if that ain't holy, nothing is!) may seem easy to climb but I tell you there were sharp rocks jutting from bigger rocks, and the climb wasn't as easy as it seems. I nearly broke my leg. What I noticed AFTER I was on top was that this was a quake damaged rock. Half of it had fallen (behind the face you see here). And the whole thing was somewhat unstable. Look at this photo I took of the underside of the rock I was standing on.

A few inches of rock supporting the whole top of one side. Scary. Especially if you have been standing on it. That put a scary end to my rock surfing career you see here.

It was getting dark and we had a lot of ground to cover to get back to the car. But I definetely intend to visit this place again real soon. I plan to spend a whole day scouting out the area as well following the now almost empty river bed of a cool river where you can find crystals inside just about every rock! Check this out!

I'm not rock expert but this seems to be somewhere between a flintstone and a rubble ... I mean flintstone and granite. But its only semi-precious and has no real value.

Here are some other shots from the trip including a vulture that hovered over us a couple of times, Parvez getting tired of my antics (I knew I should've kept the short sword!), a cool spider I found under a rock in the river, the Eye of God we saw as we were leaving, and a strange manmade (?) rock formation we found near the lake.

This was one of my more fun adventures and I definetely intend to revisit this place. Like I said I'm gonna go spend a whole day in the hills and scout out all the paths.









  Tuesday, September 12, 2006


Millaaaaaaaaaaaaaaaahhhhhhhhhhhhhhh

The alien kickin', monkey smackin', ditch diggin', code rushin' hero (?) of the geeks is here and caught in the middle of an international incident.

Get your ass over to http://www.millahseconds.com and get your overdose of Millah!






Installing Windows XP after Windows Vista RC1

One of my primary machines burnt to a crisp from overuse recently, and I had to build a new computer. Must say, Windows Vista running on 2 gigs of RAM and a Pentium D 2.8GHz is really cool. Not to mention a nVidia PCI-E worth 256 megs. Anyways, so there are some compatibility issues - especially with games and applications that rely heavily on 3D hardware. So I decided to install Windows XP on a separate hard drive.

Everything worked fine until I went to reboot to Vista. It couldn't. After several seconds of panicking, I understood that the bootmanager was overwritten.

After some research, this is what I essentially did:

  1. Get the Windows Vista media (on E: in this case) and run the following commandline:
  2. E:\boot>bootsect /nt60 /C: (/nt60 is for Vista, C: is the target drive)
  3. Then run BCDEdit (found in C:\Windows\System32 - the Vista installation)
  4. Execute the commands mentioned in my previous post.
  5. Reboot and you're done.

 Everything is intact as far as I know.









  Friday, September 08, 2006


Become a Wildlife Warrior: In memory of Steve Irwin

Steve Irwin made a profound impact on my life. The death of my "other hero" (as a close friend put it) was a huge shock. If you would like to help - either as a tribute to Steve or just to help our magnificient wildlife - you can find many ways to do so by becoming a Wildlife Warrior at http://www.wildlifewarriors.org.au/ - this is an organization set up by Steve himself, and I'm a proud donor.









  Thursday, September 07, 2006


Mahim Pandhi - 1946-2006

Mahim Pandhi
1946-2006

I'll miss you, Dad









Copyright � 2005-2007 Dax Pandhi. All rights reserved.
designed by nukeation
Sign In