Posts Tagged ‘Microsoft’

Silverlight TV by Channel 9

March 3, 2011

http://channel9.msdn.com/shows/silverlighttv

 

As the website says:

Go behind the scenes at Microsoft with John Papa and learn what the Silverlight product team is dreaming up next. See exclusive interviews with the Silverlight product team, watch how community leaders are using Silverlight to solve real problems, and keep up with the latest happenings with Silverlight. Catch the inside scoop on Silverlight with Silverlight TV every Thursday at 9am PT! Follow us on Twitter @SilverlightTV where you can send us questions and requests for future shows.

Microsoft Design .ToolBox Website

March 3, 2011

This is a training website for Designers and Developers of Silverlight and Expression Blend for the .NET environment.

You use you Windows Login account to sign in and create a profile.  After that you use the Courses and Tutorials as needed.  It does track the courses and tells you how you are advancing.  You start off as a “Rookie” and advance to “Captain”.

 

The site is located at:  http://www.microsoft.com/design/toolbox/school/default.aspx

 

Good Luck.

How To: Turning On or Off a Control with IsEnable and the “Not” Command

March 2, 2011

You can simplify the following VB.NET code snippet by using NOT instead of IIF

Code Snippet
  1.        DeleteButton.IsEnabled = IIf(DeleteButton.IsEnabled = True, False, True)

can be restated in a simplified syntax as

Code Snippet
  1. DeleteButton.IsEnabled = Not DeleteButton.IsEnabled

How To: Use Windows.Resources and Resource.Dictionary for Setting Default Styles for ToolTip and Button Controls

February 28, 2011

 

<Window.Resources/>

In the XAML file you are working on add the following code if the Resource.Dictionary is named StylesDictionary.xaml and is located in a root directory called Styles.  The Project name is called MyProjectWPF_GUI.

Code Snippet
  1.  
  2. <Window.Resources>
  3.     <ResourceDictionary>
  4.         <ResourceDictionary.MergedDictionaries>
  5.             <ResourceDictionary Source="pack://application:,,,/MYProjectWPF_GUI;component/Styles/StylesDictionary.xaml" />
  6.         </ResourceDictionary.MergedDictionaries>
  7.     </ResourceDictionary>
  8. </Window.Resources>

 

Note:

The Source  = pack://application:,,,/MyProjectWPF_GUI;component/Styles/StylesDictionary.xaml”

needs to have this “pack” syntax if you have a namespace declaration for “UserControls” like is used in this Window.

xmlns:local="clr-namespace:MyProjectWPF_GUI" 

The error at runtime will be: “Set property ‘System.Windows.ResourceDictionary.Source’ threw an exception.”

 

Otherwise if you do not declare a namespace for a “UserControl” then you can call it by

Source=”/Styles/StylesDictionary.xaml”

Code Snippet
  1. <Window x:Class="MobiusWindow"
  2.     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;
  3.     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml&quot;
  4.     WindowStartupLocation="CenterOwner"
  5.     ResizeMode="NoResize"
  6.     Title="Submit to Mobius" Height="480" Width="647"
  7.       xmlns:local="clr-namespace:MYProjectWPF_GUI"  
  8.     Name="MobiusWin">

 

<Resource.Dictionary/>

The Resource.Dictionary looks like the following.  Its filename is called StylesDictionary.xaml and is under a directory called Styles.

Code Snippet
  1. <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;
  2.     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"&gt;
  3.  
  4.     <!– Default Button Style–>
  5.           <Style TargetType="Button">
  6.             <Setter Property="FontWeight" Value="Bold" />
  7.         </Style>
  8.     
  9.     <!– Default ToolTip tyle–>
  10.         <Style x:Key="{x:Type ToolTip}" TargetType="ToolTip">
  11.             <Setter Property="OverridesDefaultStyle" Value="true"/>
  12.             <Setter Property="HasDropShadow" Value="True"/>
  13.             <Setter Property="Template">
  14.                 <Setter.Value>
  15.                     <ControlTemplate TargetType="ToolTip">
  16.                         <Border CornerRadius="7" HorizontalAlignment="Center" VerticalAlignment="Top" Padding="5" BorderThickness="3,3,3,3">
  17.                             <Border.Background>
  18.                                 <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
  19.                                     <GradientStop Color="#CF181818" Offset="0"/>
  20.                                     <GradientStop Color="#BE1C1C1C" Offset="1"/>
  21.                                 </LinearGradientBrush>
  22.                             </Border.Background>
  23.                             <Border.BorderBrush>
  24.                                 <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
  25.                                     <GradientStop Color="#80FFFFFF" Offset="0"/>
  26.                                     <GradientStop Color="#7FFFFFFF" Offset="1"/>
  27.                                     <GradientStop Color="#FFFFF18D" Offset="0.344"/>
  28.                                     <GradientStop Color="#FFFFF4AB" Offset="0.647"/>
  29.                                 </LinearGradientBrush>
  30.                             </Border.BorderBrush>
  31.                             <StackPanel>
  32.                                 <TextBlock FontFamily="Tahoma" FontSize="11" Text="{TemplateBinding Content}" Foreground="#FFFFFFFF" />
  33.                             </StackPanel>
  34.                         </Border>
  35.                     </ControlTemplate>
  36.                 </Setter.Value>
  37.             </Setter>
  38.         </Style>
  39. </ResourceDictionary>

 

Good Luck

WPF ToolTips

February 25, 2011

Code Snippet
  1. <Button Content="Submit"> <Button.ToolTip> <ToolTip> <StackPanel> <TextBlock FontWeight="Bold">Submit Request</TextBlock> <TextBlock>Submits the request to the server.</TextBlock> </StackPanel> </ToolTip> </Button.ToolTip> </Button>

Creating a ToolTip for a Button

Code Snippet
  1. <Button Content="Submit"> <Button.ToolTip> <ToolTip> <StackPanel> <TextBlock FontWeight="Bold">Submit Request</TextBlock> <TextBlock>Submits the request to the server.</TextBlock> </StackPanel> </ToolTip> </Button.ToolTip> </Button>

Code Snippet
  1. <Button IsEnabled="False" ToolTip="Saves the current document" ToolTipService.ShowOnDisabled="True" Content="Save"> </Button>

How to show ToolTips on Disabled Controls

Code Snippet
  1. <Button IsEnabled="False" ToolTip="Saves the current document" ToolTipService.ShowOnDisabled="True" Content="Save"> </Button>

 

How to Change the Show Duration of a ToolTip

Code Snippet
  1. <Button ToolTip="Saves the current document" ToolTipService.ShowDuration="20" Content="Save"> </Button>

How to Setup Logging using Enterprise Library in .NET

February 25, 2011

 

Here is the lines of code you put into the app.config file for the Services and GUI to get logging working using Enterprise Library.  This code is using the Enterprise Library 4.0

I used this in NADP, FBSubmit, and FBEdTrack

 

 

Code Snippet
  1.  <loggingConfiguration name="Logging Application Block" tracingEnabled="true"
  2. defaultCategory="General" logWarningsWhenNoCategoriesMatch="true">
  3.      <listeners>
  4.          <add fileName="c:\logs\FBSubmit\trace.log" header="—————————————-"
  5.   footer="—————————————-" formatter=""
  6.   listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.FlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
  7.   traceOutputOptions="None" filter="All" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
  8.   name="FlatFile TraceListener" />
  9.          <add fileName="c:\logs\FBSubmit\trace.log" footer="—————————————-"
  10.   formatter="" header="—————————————-"
  11.   rollFileExistsBehavior="Overwrite" rollInterval="None" rollSizeKB="0"
  12.   timeStampPattern="yyyy-MM-dd" listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.RollingFlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
  13.   traceOutputOptions="None" filter="All" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.RollingFlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
  14.   name="Rolling Flat File Trace Listener" />
  15.      </listeners>
  16.      <formatters>
  17.          <add template="Timestamp: {timestamp} Message: {message} Category: {category} Priority: {priority} EventId: {eventid} Severity: {severity} Title:{title} Machine: {machine} Extended Properties: {dictionary({key} – {value} )}"
  18.   type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
  19.   name="Text Formatter" />
  20.      </formatters>
  21.      <categorySources>
  22.          <add switchValue="All" name="General" />
  23.      </categorySources>
  24.      <specialSources>
  25.          <allEvents switchValue="All" name="All Events">
  26.              <listeners>
  27.                  <add name="FlatFile TraceListener" />
  28.                  <add name="Rolling Flat File Trace Listener" />
  29.              </listeners>
  30.          </allEvents>
  31.          <notProcessed switchValue="All" name="Unprocessed Category" />
  32.          <errors switchValue="All" name="Logging Errors &amp; Warnings" />
  33.      </specialSources>
  34.  </loggingConfiguration>

Microsoft Windows Phone 7 Status

February 13, 2011

Introduction

I was reading some articles this weekend regarding the new TouchPad by Hewlett-Packard due out this summer, and I got some statistics regarding how many apps Apple and Android have.

Here is the breakdown…

Apple has over 300,000 apps that can be played on the iPhone or iPad.

Android has over 100,000 apps that are for the Android phone.

Hewlett-Packard is trying to get developers for their WebOS platform which runs on their phones and soon to be released TouchPad.

But, the most interesting news is that Microsoft has over 150,000 registered developers for the Windows Phone 7 (WP7).  Which means that If each of the developers wrote one program, they would surpass the Hewlett-Packard and Android market for available apps.  

Get ready everyone, the Windows Phone 7 wave of apps are coming!

image

New Features of Internet Explorer 9 (IE9)

February 11, 2011

Below is a breakdown of a video that Microsoft released on the web… http://channel9.msdn.com/posts/First-look-at-5-features-of-IE9-RC

There has been a release candidate (RC) of IE9 this week.  We thought you might want to know some of them.

1. Pin Sites with multiple web pages.  Now you can have a pin site for Social Media, one for Finance, one for Hobbies, etc…

2. Tab placement.  With 2 clicks you can put your tabs on its own line in the browser, reducing clutter.

3. Close tab by clicking on the X(close).  You do not have to navigate to the page by picking the tab first.

4.  Highlight some words in your browser and copy them then by pressing ctrl-shift-L to have the browser search for that text.

5.  More browser space and less header space.  This allows the browser to be thought more as an application.  Less is best.

 

Over 25 million downloads have been for IE9(RC). 

It works on Windows 7.

It core is HTML 5.

Very fast graphics.

 

To get the latest version of Internet Explorer 9, visit: http://ie.microsoft.com/testdrive/

 

Enjoy… SKJ

Video Training Sites (Steven K James’s recommendations)

December 22, 2010

Here are the sites that I use for Training and Certification.  Some are Free and some cost a Subscription price.  Please contact me if you are interested in the subscription site purchases.  I am a reseller of them.

 

FREE Training Sites

Dr Dobb’s TV

 

Channel 9 Videos about the people building Microsoft Products & Services

 

Subscription Training Sites (Contact me for pricing.  I am a vendor and user of these sites.)

.NET Tutorial Videos from Beginner to Expert  LearnVisualStudio.NET

 

Microsoft Training at AppDev IT Training, Developer Training, Microsoft Certification Training,

 

Contact Information:  Steven.James@1800thenerd.com

Or call: 1-800-The-Nerd

ASP.NET Interview with Scott Guthrie

December 22, 2010

Scott Guthrie: The Man Who Created ASP.NET


A Bytes by MSDN interview with ASP.NET creator Scott Guthrie who talks about what’s new in Silverlight 4. Click on video to learn about it on Dr. Dobb’s Microsoft Resource Center.