Steve Clements

.Net and then some....


News




MCP

Add to Technorati Favorites



Subscribe to this Blog by Email


this is Steve's profile
Locations of visitors to this page

My Stats

  • Posts - 130
  • Comments - 295
  • Trackbacks - 38

Twitter












Tag Cloud


Recent Comments


Recent Posts


Archives


Post Categories


Image Galleries


Fav Blogs


Fav Places


Services!


Top Kudos



OK, so its Sport Relief time and I going to run…it’s no marathon, but if you know me, you would know that’s out of the question…so I’m doing this!!!

Sponsor me…just a few quid is all i ask!!!

http://www.mysportrelief.com/stevecl



I am both a Google docs and Windows SkyDrive user, one thing however that I am always thought would help, especially with SkyDrive, as its essentially a backup tool for me is being able to access through Windows explorer (or FTP would suffice!).

Well I have found a little app that does just that!!

It’s from Gladinet and the catch line is “Delivering cloud services to your desktop and operating system”, it does connect to other things like Azure blob store and Amazon.

You can download a free version and the only restriction seems to be a limit of 1000 files per job.

I would recommend you give it a go, its not the quickest thing in the world to navigate around, but for me the main purpose is for backup.  It does have a built in backup tool, which I am yet to explore, as I’m a SyncBack user I’m going to setup a SyncBack job and see how it gets on!

You can just use explorer and drag and drop files in, it uploads in the background in groups of 5 files.  That’s ok for the odd file I guess, but automation is the way forward for me!

image

Another job sorted!

Technorati Tags: ,,,,,,A,,,

Share this post :


I am talking in the context of services such as Google Docs. I don’t have a huge amount of documents, but I simply don’t have the perfect solution for having these docs available anywhere and everywhere I am. I like many users I expect work on/want access to docs in different locations and on different machines.
Google docs seems like a perfect solution, but when you don’t have an Internet connection, like when you are on a plane for example, its not a good solution at all.

Then there are services like Live Mesh, DropBox that both sync files on your local machine, into the cloud and sync to any other machine where you have the software installed. Well sometimes you are working on a machine that isn’t yours, or you don’t/cant install anything.
Going back to Google Docs, despite the fact that it’s an excellent service, but lets face it , Google Docs doesn’t have the same features or usability as MS Word/Excel etc.
Then there’s Office Live, which again is kind of a mix, but still not perfect. You need to install the software, do connect to your online DMS (Office Live), open the file from Word/Excel, edit and save directly back to the cloud.

So what do I want? Well I want it all, I want to be able to store docs in the my own secure DMS, be able to upload scanned docs (which I do with google docs at the moment, it works well!), read/edit those docs on my iPhone (which is possible, but its not great!). But I think the mostly I would like to have the option to work on them locally or in the cloud.

With the new Office web apps on the horizon, it looks like this may be a reality, although Word for the web isn’t released yet, Excel is and looks great. One problem, the docs have to be in my SkyDrive, which as far as I am aware cannot be linked directly to my local copy of MS Word? Perhaps this will come!!
I still don’t think I will be able to edit or even have great viewing experience on my iPhone for these docs as lets face it…the iPhone is apple and Word is Microsoft! But one can dream!!

[Posted from Blogo on the Mac!] [[ Prefer Live Writer!!]]

[So much that I had to open in Live writer to sort the formatting out!]




I came up against a problem, it seems like a pretty specific problem, but none the less the solution took me a while to figure out, so worth sharing!

My problem: I have a user control that contains some text among other things, but the text is of various length, the containing textblock therefore, like the user control has a dynamic height (set the Height property to System.Double.NaN).

There are n instances of the user control within a StackPanel, as a control is added to the StackPanel I want a StoryBoard which animates the Height and the Opacity.  The Height of course I do not know.

So I need to the set the Value of the Double Animation at runtime.

The XAML for the StoryBoard.

Code Snippet
  1. <Storyboard x:Name="sbExpandControl">
  2.     <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="(FrameworkElement.Height)">
  3.         <EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
  4.         <EasingDoubleKeyFrame KeyTime="00:00:02" Value="100" x:Name="expandToHeight"/>
  5.     </DoubleAnimationUsingKeyFrames>
  6.     <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="(UIElement.Opacity)">
  7.         <EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
  8.         <EasingDoubleKeyFrame KeyTime="00:00:02" Value="1"/>
  9.     </DoubleAnimationUsingKeyFrames>
  10. </Storyboard>

 

Firstly I need to new up the user control, set all the properties, add the control to the StackPanel, set the height of the DoubleAnimation and fire the StoryBoard.

Just simply going UserControl.ActualHeight will return 0 because the layout engine has not calculated the ActualHeight property. Which is the problem!!!

So we need to use the Dispatcher class (you can find out more on MSDN).

Code Snippet
  1. UserComment uc = new UserComment()
  2. {
  3.     Comments = v.Comments,
  4. };
  5.  
  6. stkComments.Children.Insert(0, uc);
  7. stkComments.Dispatcher.BeginInvoke(() =>
  8.     {
  9.         uc.ExpandControl();
  10.     });

In the User Control (UserComment)

Code Snippet
  1. public void ExpandControl()
  2. {
  3.     expandToHeight.Value = this.ActualHeight;
  4.     sbExpandControl.Begin();
  5. }

 

Hope this helps!



By Default scrolling with the mouse wheel is not enabled in the Silverlight DataGrid, actually I don’t think any control has it enabled.

Personally I think its pretty standard functionality for things to scroll with the mouse wheel.

So, I have got this little chunk of code that takes does the trick, nothing fancy going on here, but it works a treat.

Code Snippet
  1. private void dgResults_MouseWheel(object sender, MouseWheelEventArgs e)
  2. {
  3.     if (!e.Handled)
  4.     {
  5.         int rowsToMove = 0;
  6.         if (e.Delta < 0)
  7.         {
  8.             rowsToMove = e.Delta / 120 * -1;
  9.         }
  10.         else
  11.         {
  12.             rowsToMove = e.Delta / 120 * -1;
  13.         }
  14.  
  15.         if (dgResults.SelectedIndex == 0
  16.                 || dgResults.SelectedIndex == (dgResults.ItemsSource.Cast<ItemSourceType>().ToList().Count - 1))
  17.         { return; }
  18.  
  19.         dgResults.SelectedIndex = dgResults.SelectedIndex + rowsToMove;
  20.         dgResults.ScrollIntoView(dgResults.SelectedItem, dgResults.Columns[0]);
  21.     }
  22. }

 

 

To explain a little…I found that my delta would change in multiples of 120, depending on how fast I scrolled, –120 if I scrolled down, +120 is I scrolled up.  I needed to change this as if I scrolled down I needed the SelectedIndex to increase, so that’s what the first bit does.

Then I check that I’m not at either 0 or the last item in the datagrid, set the selected index and use the ScrollToView() method.

You may need to change slightly if you have horizontal scrolling, to stay with the correct column, for me having the first column is more than ideal, perfect in fact.

Note: This code has been tested nowhere except on  my dev machine. So, here goes!!



The issue is with Sharepoint blog category view. The page should only show the posts which have been tagged with the category you click on, but I have found this not to be the case.

I posted a thread on the Sharepoint blog forums and thankfully Laura Rogers came up with a solution.

 

Here we go…

Navigate to the category.aspx page of the Sharepoint blog.

Add a Query string (URL) Filter web part.

clip_image002

 

 

 

 

Modify the query string web part settings. Query string parameter name must be Name.

clip_image004

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Remove the filter from the posts web part.

Go into the Posts web parts settings, click edit the current view.

clip_image006

 

 

 

 

 

 

 

 

 

In the Filter section, change the option selected.

clip_image008

 

 

 

 

 

 

Now connect the query string web part to the posts web part.

clip_image010

 

 

 

 

 

 

 

 

 

You will get this little popup (you may need to allow popups). Select Category from the list.

clip_image012

 

 

 

 

 

 

 

 

 

 

That’s it.

Your category filtering should now work.



I had a little mishap last night at the driving range...

Needless to say I am now in the market for a new driver...I never liked the sound of that one anyway!!

 

 

Technorati Tags: ,


After watching a DNRTV episode with Scott Cate on EasyDB I was really impressed and could definitely see how it could solve a requirement in a project I am planning...

Straight after listening to the show, with the advice of Scott Cate (a promotion code), I hot stepped over to http://easydb.com to sign up.  After waiting for a few days, maybe a week and still having heard nothing I tried again and was greeted with this little chestnut...

 

image 

...and that remains to this day.

Why bother doing a dnrtv episode then not letting me in to try it, blog about it and generally test it???? Pointless...

Anyone else using this beta that may have the power to let me in?!?!



iphone Its my birthday in a couple of weeks and as a present my girlfriend bought me an iPhone...its an early present, but she's been going to the o2 shop for the last couple of weeks and this is the first time they have been in stock.

Anyway, she is a gem, because she used her contract so I could get it! I had too long remaining on mine! (Which means for the first time in about 5 years my mobile number has changed, which is probably a good thing, anyway, if you haven't got my new number and want it, contact me!)

Here are my thoughts on what is probably one of the most hyped gadgets I have ever known...

With IFAF ratings, IFAF you say? I fone acceptance factor i.e. what am I willing to accept just to keep using my iPhone!! Its funny what's forgiven when presented with one of the best user experiences ever...

  1. Battery life: I have always looked at battery life as fairly important when shopping for a mobile phone, but here I am re-charging with less that a full days use. IFAF: Tolerate - Not enough to send it back. Mind you, why couldn't Apple just allow spare batteries to be used? Compromise design perhaps...such apple bollocks!
  2. SMS functionality: what do I mean? Well, I cant save text drafts, I cant forward messages, no MMS - what's that about? Ahh...I should email everything/one...well, not everyone has as easy and consistent access to email as me(us)!! IFAF: Pushing it - I don't send a great deal of text messages, but I do often prepare ahead of time and send pictures of humorous things to my misses! (my sea monkeys being the latest thing!)
  3. Tariffs: I cant speak for all carriers, but here in the UK o2 have the exclusive contract for iPhones and aren't shy about exploiting it. Currently (still with o2) I pay £25 per month for more minutes and texts than the £35 iPhone contract, and about 500% more than the £30 contract that is surely just a token deal which is so shite that no-one will take it and go for the £35. take a look here http://o2.co.uk/iphone/paymonthly IFAF: its only money right! I want an iPhone!!
  4. iPod: Of course the iPhone has an iPod built in with the same interface as the iTouch, which is so silky it slippery to the touch! However, in iTunes (which I like by the way!!), you cannot simply drag and drop albums like my iPod, I can only sync playlists, reading around the accepted method seems to be create a single playlist, drop all music into that and sync that one! IFAF: Takes the shine off - this is crap really, a big part of this gadget for me is that my beloved iPod will be built in...with the major addition of touch!! The fact that others have raised this means I'm not alone...its another big WHY? For the apple bods. It just takes the shine of an otherwise perfect feature.
  5. Camera: The camera i think is only 2MP...which is well below par. IFAF: Tolerate - i dont use it a great deal and accept that a phone wont take great photos.
  6. Radio: I do miss not having a radio, but then again the battery would be flat before I got to work! IFAF: Tolerate - I can happily live with out, I have never used a "phone radio" that was much good anyway!

These few gripes however no way make up for a how silky and smooth to use it is. The keyboard is awesome, the email interface (even with the IzyMail nonsense because I use live mail, not gmail - Izymail is sweet, the fact that Live mail doesn't do POP3 is nonsense) is one of the best I have ever used on mobile device - Blackberry is not even close. The GPS, although not a full blown Sat Nav is pretty mustard.

I also love the fact that custom apps get in on the action!!

I am yet to unlock (or JailBreak!) my iPhone, I haven't looked into it much and as yet have no reason to do so...anyone got reason why? What does it do for me?

I'm sure there are a few more gripes and I will come across as I get into day 3 of usage, but how much of a dent it will put into the weird power of the iPhone!



Check out my new live search component to the right here ->

I came across this on Heather Solomon's blog, thought it was cool so had a play and set one up for my blog.

To start with get yourself over to http://search.live.com/siteowner, select the advanced option.  I think it only works if you have your blog on a custom domain like blog.steveclements.net as www.geekswithblogs.net/steveclements doesn't work.  I also created a live search macro for geekwithblogs.net and used and existing one for msdn sites and blogs.  Creating your own macro is very straight forward, well the basic one is, I didn't actually look at what the advanced offered.

Here you can see the four tabs for different search results.

image

The live.com tool generates the code for you, but I had to make a couple of changes to get it to look right (background-color: White, add a search title) and fit (reduced the width).

I am pretty excited about this, I have used google and live search before just to find content on my own blog so this is definitely going to get lots of use, with geekswithblogs on there makes it even more useful, I often remember a post from the geekswithblogs feed, but cant remember who posted it.  With MSDN and web makes it pretty complete I reckon!

Heres the code.

To get it to show in the blog paste it into admin settings -> options -> configure -> static news/announcement.

<!-- Live Search -->
<meta name="Search.WLSearchBox" content="1.1, en-GB" />
<div id="WLSearchBoxDiv">
<table cellpadding="0" cellspacing="0" style="width: 185px">
<tr>
    <td style="font-weight: bold;padding-right:5px;text-align:left;">Search</td>
</tr>
<tr id="WLSearchBoxPlaceholder" style="background-color:White;">
  <td style="width: 100%; border:solid 2px #4B7B9F;border-right-style: none;">
  
  <input id="WLSearchBoxInput" type="text" 
value="&#x4c;&#x6f;&#x61;&#x64;&#x69;&#x6e;&#x67;&#x2e;&#x2e;&#x2e;"
disabled="disabled"
style="padding:0;background-image: url(http://search.live.com//siteowner/s/siteowner/searchbox_background.png);background-position: right;background-repeat: no-repeat;height: 16px; width: 100%; border:none 0 Transparent" /> </td> <td style="border:solid 2px #4B7B9F;"> <input id="WLSearchBoxButton" type="image"
src=http://search.live.com//siteowner/s/siteowner/searchbutton_normal.png
align="absBottom" style="padding:0;border-style: none" /> </td> </tr> </table> <script type="text/javascript" charset="utf-8"> var WLSearchBoxConfiguration= { "global":{ "serverDNS":"search.live.com", "market":"en-GB" }, "appearance":{ "autoHideTopControl":false, "width":800, "height":550, "theme":"Green" }, "scopes":[ { "type":"web", "caption":"&#x53;&#x74;&#x65;&#x76;&#x65;&#x20;&#x43;&#x6c;&#x65;&#x6d;&#x65;&#x6e;&#x74;&#x73;", "searchParam":"site:blog.steveclements.net" } , { "type":"web", "caption":"&#x47;&#x65;&#x65;&#x6b;&#x73;&#x77;&#x69;&#x74;&#x68;&#x42;&#x6c;&#x6f;&#x67;&#x73;", "searchParam":"macro:steveclements.geekswithblogs" } , { "type":"web", "caption":"&#x4d;&#x53;&#x44;&#x4e;", "searchParam":"macro:livelabs.msdn" } , { "type":"web", "caption":"&#x57;&#x65;&#x62;", "searchParam":"" } ] } </script> <script type="text/javascript" charset="utf-8"
src="http://search.live.com/bootstrap.js?market=en-GB&ServId=SearchBox&ServId=SearchBoxWeb&Callback=WLSearchBoxScriptReady">
</script> </div> <!-- Live Search -->