Adam Kinney on Longhorn

Designing and Developing with WinFX

January 2004 - Posts

  • Longhorn Meetup

    Filed under:

    The time has come.

    " An operating system of the people, by the people, and for the people shall not perish from the earth." - A PDC Attendant

    Join Developers for Longhorn in our grassroots campaign to move computing forward and push Microsoft into the Future.

    longhorn.meetup.com

    PostTypeIcon
    1,866 Views
  • How to change the ImageSource for an ImageBrush in Code

    Filed under:

    I haven't found any examples showing how to change the ImageSource of an ImageBrush dynamically with code, so I thought I'd post what I have found to work.  This works as of version 4051 and is not guaranteed to work in future releases. 

    Notice that the string passed as a parameter is the path to a resource file.  For example, if you have an “Images” folder with a file named “oatmeal.png“ with its build action set to Resources, you would pass “Images/oatmeal.png“.


    private ImageBrush MyNewImage(string resourcePath)

    {

    MSAvalon.Windows.Media.ImageBrush myImageBrush = new MSAvalon.Windows.Media.ImageBrush();

    myImageBrush.Stretch = MSAvalon.Windows.Media.Stretch.None;

    myImageBrush.HorizontalAlignment = MSAvalon.Windows.Media.HorizontalAlignment.Center;

    myImageBrush.VerticalAlignment = MSAvalon.Windows.Media.VerticalAlignment.Top;

    myImageBrush.ImageSource = ((MSAvalon.Windows.Media.ImageSource)(System.ComponentModel.TypeDescriptor.GetConverter(typeof(MSAvalon.Windows.Media.ImageSource)).ConvertFromInvariantString(resourcePath)));

    return myImageBrush;

    }

    PostTypeIcon
    1,705 Views
  • Microsoft Venus in Visual Studio?

    Filed under:

    On startup of Visual Studio Whidbey Tech Preview I noticed tonight, that “Microsoft Venus” was listed as an “Installed Product“.

    The only mention I found of “Microsoft” and “Venus” on the internet was back in '99 when Microsoft expanded its China consumer base with an operating system called “Microsoft Venus”.

    Confused for sure, I'm imagining VS running its own shadow OS just to run everything underneath... :-p

    Anyone have any information on this?

    PostTypeIcon
    5,247 Views
  • How do I change the z-order of a control?

    Filed under:

    How do I change the z-order of a control?

    I have seen this question asked a few times now about a control's z-order in Longhorn.  Here's a compiled answer given on the WinFX newsgroups:

    “In the current bits the z-index within a canvas is determined by the order
    of the elements in the tree with a later element being at a hight z-index
    than an earlier element.“

    Dave Massy
    Longhorn Technical Evangelist

    “As well, in the other panels such as FlowPanel, tree order can also affect
    which elements overlap other elements. Elements added last will be higher in
    the z-index.”

    “Are you using a DockPanel as your top-level layout?  If so, each "docking
    window" will need to be it's own container inside of this DockPanel.  You
    can use a Canvas as the container.  To bring a panel forward or back in the
    z dimension in that container, you need to rearrange the the
    IVisual.Children such that the panel that should be on top is at the end of
    the Children collection.“

    Henry Hahn
    Program Manager

    Thanks Guys!

    PostTypeIcon
    1,676 Views
  • Brent Rector's WinFX (paperbound) book

    Filed under:

    I've been reading Brent Rector's chapters/articles[1] on MSDN, but I was excited to see this entry on Kent Tegel's blog.  He links to Brent Rector's WinFX MS Press book on BookPool.  Discounted price and it comes in tangible paperbound form.  Awesome.

    Now the book might contain the same content as what has been posted on MSDN for free, but I still ordered it.  When I am going to read that much, I like to get out of computer chair and go to a more comfortable reading place, couch, porch, what have you.

    Buy a Tablet PC you might say, hmmm...but then I will still have light shining into my eyes when I am trying to consume a multi-hundred page work of literature, and the fear of spilling my drink on a multi-hundred dollar reusable book.

    [1]Introduction to Longhorn

    PostTypeIcon
    3,376 Views
  • Taper Transformations in Avalon?

    Filed under:

    Well without much luck on the WinFX newsgroups, I thought I'd ask here:

    Is it possible to perform a linear taper transformation with an Avalon Matrix Transform? (see http://www-scf.usc.edu/~akotaobi/gptut13.html for taper transformation)
     
    In a transformation 3x3 matrix only six of the nine elements can be specified, therefore this “non affine” transformation is normally not possible (only scaling, translation, rotation and skewing). Is there a workaround? (Calling all Matrix geniuses) The linear taper transformation is desired to allow for some perspective effects.
     
    If there is no workaround now, will there be something in the future to allow for a taper transformation?  Maybe this is something for the Avalon 3D library?

    PostTypeIcon
    1,581 Views
  • Quarks version 1

    Filed under:

    Ok, so I guess I will just be the guy who endlessly creates “version 1”s of simple little UI things but this was fun.  I am working on a more “Application” like program but its taking awhile, so I do these as a break.

    So here I present Quarks, a sample similiar to Particle Flash movies you have seen before, but this ones done with Avalon.  Its funny, I am still learning how to do layout in Avalon and probably half the time in the sample is just messing around with the control panel on the left.  There are a lot of possiblities with layout, but I am still trying to figure out good patterns.

    Download Quarks

    PostTypeIcon
    3,150 Views
  • Anon Haiku

    Filed under:

    After seeing many comments by Anon, I was actually inspired by this wonderful collection of his.  Thanks Anon, this ones for you...

    Of those who comment
    Anon is my favorite
    A boundless monster

    Trolling the world web
    He can say what he wishes
    Great courage he has

    No power you gain
    Over the one with no name
    Liable he's not

    Many wounds he makes
    But the cuts do heal quickly
    So shallow they are

    One of so many
    Your comments I will forget
    No name, no effect

    When you hit submit
    Your opinion has been lost
    One more to the void

    And now I expect
    To have awakened Anon
    Prepare for the spam

    PostTypeIcon
    1,347 Views
  • 3rd Party software that works in Longhorn

    Filed under:

    I just found this thread started on AcademicLonghorn.com.  Looks like a promising list so far.  It'd be interesting to know what else works on the current build.  Anyone using other software successfully that hasn't been listed?

    Still trying to get my sound card to work...

    PostTypeIcon
    1,386 Views
  • Avalon Anenome - the beginning

    Filed under:

    I've recently been working on some sample applications, but haven't gotten close to finishing anything.  So I thought I'd go back to the simpler UI Samples that I had started with.  This is really nothing to fancy, just an exercise in drawing with pathfigures.  There is some mouse interaction when you hold the left button down.

    This is really a phase one app, as my next step will be to use bezier curves instead of lines and add some randomness to the arms length.  I hope to get it to the point so when you move your mouse around they appear to surround your pointer.

    Here's the download link and a pic:

    Very simple, nothing fancy yet.

    PostTypeIcon
    1,872 Views
  • Non Working Features in Longhorn v4051

    Filed under:

    Non Working Features in Longhorn v4051
    -A listing of features I have found that are not enabled in the PDC Build

    I initially started this list as a blog entry, but I have started adding to it and realized that it will fit better as an “article”.  I will be maintaining the article listing here.

    PostTypeIcon
    1,252 Views
  • HTML revised (verbositized)

    Filed under:

    I found this as a good short example of the new text markup that is used in XAML (posted by Ian Griffiths of DevelopMentor).  If you haven't looked at the markup style yet, you will notice its very similar, you just now have to spell everything out.


    <TextPanel xmlns="http://schemas.microsoft.com/2003/xaml/">

    <Paragraph>This control provides you with a place to input your
    <Bold>Controller Data</Bold>.
    You can input your data in any accepted ISO standard format.</Paragraph>

    <Paragraph Foreground="Blue"><Bold>Note:</Bold> <Underline>When using a data
    format not
    specified please make sure you fill out all the data requirements so as to
    avoid confusion when
    the data is finally parsed.</Underline></Paragraph>

    <Paragraph>Supported <Bold><HyperLink NavigateUri="helpDataFormas1902">Data
    Formats can be found
    here</HyperLink></Bold></Paragraph>

    </TextPanel>

    PostTypeIcon
    1,136 Views