Pete Brown's Blog (POKE 53280,0)
Pete Brown writes on a variety of topics from XAML with the Windows Runtime (WinRT), .NET programming using C#, WPF, Microcontroller programming with .NET Microframework, .NET Gadgeteer, Windows on Devices, and even plain old C, to raising two children in the suburbs of Maryland, woodworking, CNC and generally "making physical stuff". Oh, and Pete loves retro technology, especially Commodore (C64 and C128). If the content interests you, please subscribe using the subscription link to the right of every page.
Archive for tag:
WPF
-
My WPF talk from Build 2012 is live at
Channel9. Slides are available via that link as well.
I cover a few of the more interesting features in WPF 4.5, as
well as techniques for using Portable Class Libraries (PCL) to
share code with Windows 8 app.
-
Last week, at Tech Ed US, I gave a WPF 4.5 overview to a
completely packed room. The materials and video links are
below.
Downloads and Links
Video and Downloadable Slides
Information on AutoHotKey, the tool I used for
snippets.
Demo Code (for WPF 4.5 RC) attached below.
-
Today we released the Windows 8 Release Preview (RP)! I haven't
been this excited about an operating system since Windows 95 first
came out, when there was no such thing as downloading an OS, and we
had to actually wait in line in a store to get our blue cloud box
full of floppies (or was it a CD? I forget).
Windows 95 was a big deal for users and developers alike. It had
a brand new ...
-
This past Monday (May 14th), I officially started a new role at
Microsoft. I like to be as transparent as possible, so I thought
I'd share with you all the details of this role as well as where I
was before I moved to it.
TL;DR:
XAML. Windows. Developers. 'nuf said.
A little (optional) history
I've been working for Microsoft for a bit over two and a half
years now. In that...
-
IL DASM (The Intermediate Language Disassembly tool) is
something I haven't used in a while. When .NET 1.0 first came out
in beta over a decade ago, a much younger me went and created a
"Hello World" in IL just to see how it's done. I still have it:
//
// Hello World IL Program
// ------------------------------------
// Written by Peter M. Brown
// August 15, 2001
//
// This is ...
-
Recently, a reader asked how they should go about
setting the Typography properties from code-behind.
The original question was about Silverlight, but the approach
works in WPF, Windows 8 and more.
Given the following markup:
<StackPanel>
<TextBlock x:Name="OriginalText"
FontSize="72"
FontFamily="Gabriola"
Text="Hello ...
-
I'm working on a little WPF 4.5 sample app. As part of that, I
needed to create a drop-down list of Font Families. Here's what the
ComboBox currently looks like:
The Data Source
I wanted control over the fonts including sorting and,
potentially, filtering the results. I didn't want to use static
binding from XAML. So, in my viewmodel, I added a collection of
FontFamily objects ...
-
At the South Florida Code Camp last week, I gave an early
morning talk titled "Getting Started with XAML". In this talk, I
covered the basics of XAML, the property system, layout, and other
things you need to know as a XAML developer for WPF, Silverlight,
or Windows 8.
Slides
Attached to this post
Demos
It was all real-time stuff in this talk. No downloadable demos.
I...
-
The Windows Client Developer Roundup aggregates information of
interest to Windows Client Developers, including WinRT XAML, WPF, Silverlight, Visual
C++, XNA, Expression Blend, Surface, Windows
7, Windows
Phone, Visual Studio, WCF RIA Services and
more. Sometimes I even include a little jQuery and HTML5. If you
have something interesting you've done or have run across, or you
blog regu...
Published
Wednesday, February 8, 2012 |
Tagged:
.NET, WPF, Silverlight, XNA, CPP, WindowsClient, WindowsClientRoundup, Kinect, Windows8, XAML |
-
Many developers don't realize that a common source of memory
leaks in .NET applications is the event handler. WPF 4.5 includes
built-in support for weak events to help us do the right thing and
not eat up all the available memory.
The Problem
Events are ubiquitous in .NET. When you add an event handler
using the EventName += <my event handler delegate>
syntax, the event sourc...
-
In my post about WPF 4.5 Observable Collection
Cross-thread Change Notification, I showed the basics of how to
synchronize collection updates in WPF, and how to avoid having to
manually dispatch calls to the UI thread. In the comments, Jonathan
Allen brought up some very good points that I simply didn't know
the answers to (and a lock I was missing in the example). Thanks to
Jonathan fo...
-
WPF 4.5 is available as part of the Visual Studio 11 Developer Preview released at
the Build 2011 conference, and is part of the .NET Framework
version 4.5. WPF 4.5 addresses several important customer requests
including the ability to have cross-thread change notification for
collections - the topic of this post.
Update 1/20/2012: I have
posted a set of updates to this post with add...
-
A reader of my Silverlight 5 book recently reached out to
me about threading and why I create some objects on the UI thread
in the examples. We discussed some of the reasons, but I felt this
would be a good topic to share with everyone. In fact, this is one
area where it would have been fun to go into great detail in my
book, but there simply wasn't the space. Threading and cross-thread
...
-
A couple weekends back, I was giving a talk on the .NET
Gadgeteer, and spoke about the support for Potentiometers. Unlike
some of the other modules, a potentiometer (like the volume knob on
a stereo) varies so much in use that you wouldn't want to raise an
event for every little change. The solution in electronics is
typically to poll the pot to find its current value.
Similar situati...
-
One of the new features in WPF 4.5 is support for binding to
static properties. In addition to the binding syntax itself,
there's new support for static property change notification.
In many cases, it is still advisable to use a Singleton pattern
or another approach for binding. However, there are cases when your
application design requires binding to static properties. In those
cases...
-
The Windows Client Developer Roundup aggregates information of
interest to Windows Client Developers, including WinRT XAML, WPF, Silverlight, Visual
C++, XNA, Expression Blend, Surface, Windows
7, Windows
Phone, Visual Studio, WCF RIA Services and
more. Sometimes I even include a little jQuery and HTML5. If you
have something interesting you've done or have run across, or you
blog regu...
Published
Monday, November 28, 2011 |
Tagged:
.NET, WPF, Silverlight, 3d, XNA, Surface, WindowsClient, WindowsClientRoundup, Kinect, Windows8, XAML |
-
The Windows Client Developer Roundup aggregates information of
interest to Windows Client Developers, including WinRT XAML, WPF, Silverlight, Visual
C++, XNA, Expression Blend, Surface, Windows
7, Windows
Phone, Visual Studio, WCF RIA Services and
more. Sometimes I even include a little jQuery and HTML5. If you
have something interesting you've done or have run across, or you
blog regu...
-
The Windows Client Developer Roundup aggregates information of
interest to Windows Client Developers, including WinRT XAML, WPF, Silverlight, Visual
C++, XNA, Expression Blend, Surface, Windows
7, Windows
Phone, Visual Studio, WCF RIA Services and
more. Sometimes I even include a little jQuery and HTML5. If you
have something interesting you've done or have run across, or you
blog regu...
Published
Monday, October 10, 2011 |
Tagged:
.NET, WPF, Silverlight, XNA, Surface, WindowsClient, WindowsClientRoundup, Kinect, Windows8, XAML |
-
I'm writing a little sample for Silverlight 5 in Action. Part of
it involves a class which integrates with a 3d accelerometer sensor
on Windows. In order to use the accelerometer, I have to check to
see if elevated permissions is enabled before I go about
constructing objects which rely on COM automation. There's also a
fair bit of construction activity after that check to create the
ac...
-
The Windows Client Developer Roundup aggregates information of
interest to Windows Client Developers, including WinRT XAML, WPF, Silverlight, Visual
C++, XNA, Expression Blend, Surface, Windows
7, Windows
Phone, Visual Studio, WCF RIA Services and
more. Sometimes I even include a little jQuery and HTML5. If you
have something interesting you've done or have run across, or you
blog regu...
Published
Monday, September 26, 2011 |
Tagged:
.NET, WPF, Silverlight, XNA, WindowsClient, WindowsClientRoundup, Kinect, Windows8, XAML |
-
Windows 8 and Metro are new to most developers. Luckily, the
//build/ event has a TON of great sessions explaining how to get
productive with the new development stack. Here's my personal list
of Build 2011 videos that XAML developers (Silverlight, WPF, Phone)
should see, roughly in order starting with key Windows 8
sessions.
The video player supports trick play (on IE9, right-click a...
-
The Windows Client Developer Roundup aggregates information of
interest to Windows Client Developers, including WPF, Silverlight, Visual
C++, XNA, Expression Blend, Surface, Windows
7, Windows
Phone, Visual Studio, WCF RIA Services, Netduino and the .NET Micro
Framework and more. Sometimes I even include a little jQuery and
HTML5. If you have something interesting you've done or have ru...
Published
Tuesday, September 6, 2011 |
Tagged:
.NET, WPF, Silverlight, XNA, Surface, WindowsClient, WindowsClientRoundup, Netduino, Micro+Framework, Kinect |