Posts Tagged ‘Microsoft’
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.
Tags:Microsoft, Silverlight, Tips, TV, Video
Posted in Video | Leave a Comment »
March 2, 2011
You can simplify the following VB.NET code snippet by using NOT instead of IIF
Code Snippet
- DeleteButton.IsEnabled = IIf(DeleteButton.IsEnabled = True, False, True)
can be restated in a simplified syntax as
Code Snippet
- DeleteButton.IsEnabled = Not DeleteButton.IsEnabled
Tags:IsEnabled, Microsoft, Not, VB.NET, Visual Studio 2010
Posted in Programming | Leave a Comment »
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
-
- <Window.Resources>
- <ResourceDictionary>
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="pack://application:,,,/MYProjectWPF_GUI;component/Styles/StylesDictionary.xaml" />
- </ResourceDictionary.MergedDictionaries>
- </ResourceDictionary>
- </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”
|
<Resource.Dictionary/>
The Resource.Dictionary looks like the following. Its filename is called StylesDictionary.xaml and is under a directory called Styles.
Code Snippet
- <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
-
- <!– Default Button Style–>
- <Style TargetType="Button">
- <Setter Property="FontWeight" Value="Bold" />
- </Style>
-
- <!– Default ToolTip tyle–>
- <Style x:Key="{x:Type ToolTip}" TargetType="ToolTip">
- <Setter Property="OverridesDefaultStyle" Value="true"/>
- <Setter Property="HasDropShadow" Value="True"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="ToolTip">
- <Border CornerRadius="7" HorizontalAlignment="Center" VerticalAlignment="Top" Padding="5" BorderThickness="3,3,3,3">
- <Border.Background>
- <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
- <GradientStop Color="#CF181818" Offset="0"/>
- <GradientStop Color="#BE1C1C1C" Offset="1"/>
- </LinearGradientBrush>
- </Border.Background>
- <Border.BorderBrush>
- <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
- <GradientStop Color="#80FFFFFF" Offset="0"/>
- <GradientStop Color="#7FFFFFFF" Offset="1"/>
- <GradientStop Color="#FFFFF18D" Offset="0.344"/>
- <GradientStop Color="#FFFFF4AB" Offset="0.647"/>
- </LinearGradientBrush>
- </Border.BorderBrush>
- <StackPanel>
- <TextBlock FontFamily="Tahoma" FontSize="11" Text="{TemplateBinding Content}" Foreground="#FFFFFFFF" />
- </StackPanel>
- </Border>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- </ResourceDictionary>
Good Luck
Tags:Microsoft, Resource.Dictionary, Windows.Resources, WPF, xaml
Posted in Programming | 7 Comments »
February 25, 2011
Code Snippet
- <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
- <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
- <Button IsEnabled="False" ToolTip="Saves the current document" ToolTipService.ShowOnDisabled="True" Content="Save"> </Button>
How to show ToolTips on Disabled Controls
Code Snippet
- <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
- <Button ToolTip="Saves the current document" ToolTipService.ShowDuration="20" Content="Save"> </Button>
Tags:Microsoft, Styles, tooltip, WPF
Posted in HowTo | Leave a Comment »
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
- <loggingConfiguration name="Logging Application Block" tracingEnabled="true"
- defaultCategory="General" logWarningsWhenNoCategoriesMatch="true">
- <listeners>
- <add fileName="c:\logs\FBSubmit\trace.log" header="—————————————-"
- footer="—————————————-" formatter=""
- listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.FlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
- traceOutputOptions="None" filter="All" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
- name="FlatFile TraceListener" />
- <add fileName="c:\logs\FBSubmit\trace.log" footer="—————————————-"
- formatter="" header="—————————————-"
- rollFileExistsBehavior="Overwrite" rollInterval="None" rollSizeKB="0"
- timeStampPattern="yyyy-MM-dd" listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.RollingFlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
- traceOutputOptions="None" filter="All" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.RollingFlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
- name="Rolling Flat File Trace Listener" />
- </listeners>
- <formatters>
- <add template="Timestamp: {timestamp}
Message: {message}
Category: {category}
Priority: {priority}
EventId: {eventid}
Severity: {severity}
Title:{title}
Machine: {machine}
Extended Properties: {dictionary({key} – {value}
)}"
- type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
- name="Text Formatter" />
- </formatters>
- <categorySources>
- <add switchValue="All" name="General" />
- </categorySources>
- <specialSources>
- <allEvents switchValue="All" name="All Events">
- <listeners>
- <add name="FlatFile TraceListener" />
- <add name="Rolling Flat File Trace Listener" />
- </listeners>
- </allEvents>
- <notProcessed switchValue="All" name="Unprocessed Category" />
- <errors switchValue="All" name="Logging Errors & Warnings" />
- </specialSources>
- </loggingConfiguration>
Tags:.NET, Enterprise Library, Logging, Microsoft
Posted in HowTo | 2 Comments »
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!
Tags:Android, Apple, apps, developers, Hewlett-Packard, Microsoft, platform, TouchPad, WebOS, windows, Windows Phone 7, WP7
Posted in Windows Phone 7 News | 1 Comment »
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
Tags:IE, IE9, Microsoft, Whats New
Posted in Whats New | Leave a Comment »
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
Tags:.NET, AppDev, Channel9, DrDobb's TV, FREE, LearnVisualStudio.net, Microsoft, Training, Windows Phone 7, WP7, WPF
Posted in Training | 1 Comment »