Archives / 2003 / December
  • XAML and : Hello World!

    So Im sure most of you have heard about now, and the fact that they have a XAML runtime library which targets the .NET Framework 1.1. I decided to put together a "Hello World" app like many have done before me.

    My Code:

    <?Mapping XmlNamespace="events" ClrNamespace="Rob.Events" Assembly="HelloWorld" ?>
            <Button Click="OnClick" Width="100" Height="50">Press Me!</Button>
            <TextBox ID="HelloTextBox" Width="400" Dock="Left"></TextBox>


    and now the HelloWorld.cs:

    using System;
    using System.Windows.Forms;
    using Xamlon.Windows;
    using Xamlon.Windows.Controls;
    namespace Rob.Events{
     public class EventHandler {
      public void OnClick(object sender, EventArgs e)  {
       // Get a reference to the Controls
       Xamlon.Windows.ControlDictionary controls = 
        Xamlon.Windows.Application.Current.Resources["Id"] as Xamlon.Windows.ControlDictionary;
       // Get a ref to the browser control
       Control HelloTextBox = controls["HelloTextBox"];
       HelloTextBox.Text="Hello World";

    And finally lets compile it:

    csc /t:library /r:..\lib\Xamlon.dll HelloWorld.cs

    (notice the reference made to their DLL)

    And then double click the HelloWorld.xaml file, and viola, the app loads.

    My firts XAML App, inst she cute?



  • Shout out to Andy Smith..

    At the current place I'm working at these days we needed a quick and not so dirty solution for javascript style popup confirmation buttons. You know, the typical "Are you Sure?" message just after the user hits the big bad "Delete" button.
    My mind went first to "How would I roll this out on my own?", then after about 1.5 seconds of thought I decided to see what good old Andy Smith over at has baked up for us, and to see if he already rolled out a solution for it.
    Yes! His "ConfirmedButtons" control was right on the mark.
    Thanks again Andy!


  • RSS Reading based on Language...

    I love the fact that this community has such a broad user base. We have people from all over the world.
    One thing that could be considered "bad" about this, is that all of these people also want to post in their own language. Why cant the main feed be more language aware for each item?
    Thats the first step. Next we would need to push the tools (sharpreader, etc..) into this language aware world, and allow the end user to do things like "Exclude all languages, except english". "Only allow English and German", etc..
    Lets not force the people to publish in the "common" language, but force our tools to be come more intelligent.
    Speaking of multiple languages, does anyone know of a free Web Service (yes, thats SOAP) translation service? The one listed on XMethods is dead.


  • CurrencyManager

    I need to investigate the CurrencyManager. Tomorrow, or maybe this weekend.

    Here, here, here, here, and finally here.

    Post more links in the feedback if you can find something important that ive missed.


    ps. This is also my first post with w.bloggar. fun.


  • Adaptive Rendering followup...

    For some reason there is a bug with the feedback form for the previous post regarding adaptive rendering.  I gotten a few responses already...

    Feel free to respond to this thread (if it works) instead of the other.


    Drew Marsh Says:

    Well, why use a Page at all in that scenario? Why not register a custom HttpHandler for a specific URL? Page has a bunch of unecessary overhead if you're not using Page features.


    Jesse Ezell Says:

    This is what custom http handlers (IHttpHandler) are for. Just implement the ProcessRequest member. ASPX files are for rendering web pages, not xml content.
    I agree with both. Obviously an HttpHandler would do the job.


  • Whidbey: Adaptive Rendering : Sometimes you dont want it...

    As some of you may know V2 of .NET will actually allow the Web Controls to adaptively render based on the browser capabilities on the client.  You hit with IE, it will render some IE stuff, you hit with a WAP browser, it will render only WAP stuff.  Very very handy when you want to support all these platforms.  Heck you can even choose specific master pages to target specific devices. 

    Well, what about when you DONT want to do the adaptive rendering?  You see, when you want too use this cool feature the old <FORM runat="server"> tag MUST be present.  For most situations this is good and acceptable, but for many situations you dont want the form tag to be emitted.  Say you wish to pump out XML directly to the client, including changing the content type on the response...etc... We've all did this I'm sure.  You dont want the silly <FORM> tags to be emitted, thus messing up the actual content.  Oh yeah, and you DO want to hit this with a wireless device.  Lets say your emitting binary data (wbmp) or whatever for the wireless device right within an ASPX page... 

    The solution (my wild guess, that worked), in order to handle this situation is to simply stop the adpative rendering from working its magic.  To do this, do something like:

    <script runat="server" language="c#">

    void Page_Load (object sender, System.EventArgs e) {

    Page.Visible = false;

    Response.ContentType = "text/xml";

    Response.Write ("<SOME_XML_STUFF_HERE />");



    Notice the:

    Page.Visible = false;

    Now you can hit the page, with a normal browser (IE), or an alternative browser (WAP) and you will get the same results, no adpative rendering error.


  • Architect Webcast: Architecture Evaluation: Methods and Experiences

    Starting right now...

    This webcast will present the principles of evaluating and analyzing architectures as mechanisms for determining the quality attributes of a software system based on its architecture. It will also discuss real-world experiences of applying these techniques for architectural decision-making.


    Jeromy Carriere, Architect Evangelist, Microsoft Corporation



  • Local User Group Confusion...

    Im currently hoping to begin contributing to my local community more so I decided to search around and find out more information about the local .NET community...

    It would appear that my local community has numerous (5 ?) Microsoft and .NET User groups in the area..  (Choose BC)

    .netBC  Vancouver .NET users group.

    Simon Fraser Microsoft User Group Our events are focused on .NET technologies such as C# and Visual Studio .NET. We are promoting the use of Microsoft technologies at SFU among its students ....

    Vancouver .NET User Group In August 2003, and dotNetBC merged to form the .NET BC users group. The new group was formed ...

    Vancouver Microsoft .NET User Group Monthly meetings discussing .NET related topics. Network ...

    VANTUG Vancouver Technology User Group (Microsoft User Group). Supports all aspects of Microsoft related systems and services.

    It would seem that a few merged into the dotNetBC users group.  Now my one problem is to determine which record is actually the correct one...



    Why has not cleaned up this mess? (Or whomever is responsible for this content).

    Ive been in contact with Medhat Elmasry and the one time he did respond to my requests it seem that, that group was some what active -about 1 or 2 events per month.  After looking on their site

    It appears they are having a meeting tonight, with a presentation on Delphi.  Im a C# whore true and true, so I cant imagine that I will get much out of the presentation...but I think I will go anyways; try to see if I can find Medhat around and get to the bottom of all this UG nonsense.

    Hope to see you there.



  • tracert to

    Nothing to do with .NET, but fun either way...

    Someone pointed me to this...


    1 (  0.217 ms  0.190 ms  0.192 ms
    2 (  0.998 ms  1.080 ms  0.933 ms
    3 (  0.895 ms  0.832 ms  1.017 ms
    4 (  5.260 ms  5.173 ms  5.122 ms
    5 (  5.646 ms  5.494 ms  5.642 ms
    6 (  5.837 ms  6.226 ms  6.571 ms
    7 (  6.163 ms  6.057 ms  5.462 ms
    8 (  50.033 ms  50.064 ms  50.197 ms
    9 (  50.264 ms  50.167 ms  50.783 ms
    10 (  50.470 ms  50.620 ms  50.058 ms
    11 (  50.252 ms  50.158 ms  50.190 ms
    12 (  50.135 ms  50.579 ms  50.251 ms



  • Top court hears pitch for tariff on web use...

    CBC Reports:

    “The Society of Composers, Authors and Music Publishers of Canada (SOCAN) is in court on Wednesday arguing that internet providers should hand over millions of dollars toward royalties for pirated music.”

    This pisses me off.  I dont pirate music, so why should I have pay for others doing this?  Maybe they should consider improving the quality of the music, packaging, inserts, dvd's, and concerts so that people will buy instead of steal.  Who the hell listens to the POP/Radio Play music these days?

    I know that for every band that I listen too, I buy their CD.  Show support.

    <Final_Rant>The Metallica Corporation (tm) can suck my **** if the think they are getting a single dime from me.  They starting this crap just for publicity.  Consider improving your music before bitching that people steal your lame crap.</Final_Rant>


  • Windows ATMs raise security concerns...

    Interesting read on XP being deployed to ATM machines...

    Two things:

    “sneaker net“.  I havnt heard that term since my days pulling cable around my old College.  Fun.


    I agree with the fact that every box is only as secure as the admin makes it.  The OS is not the problem, its the person attempting to secure it. 


  • A useful idea, for me anyways...

    Why does my blog world have to be so seperate from my day-to-day calendar?   Why cant Scott or any other blog provider actually integrate these things?

    Oh yeah, also make it accessible via a wireless interface, have it tie into an address book, and email (a slick spam filter mechanism) via IMAP, SMTP, POP3; maybe an RSS reader too; keep track of my RSS subscriptions, what Ive read, what Ive saved, etc.. allow me to import/export via OPML.  Allow me to import RSS directly into my calendar also..Oh, what about weather/sports/holidays/other calendar data too, that would be nifty.

    Cant forget about my Palm (or any other offline device).  Allow me to synch (both ways) it all.

    Oh yeah, make it damn extensible.  So if I want to plug my own stuff into it I could. 

    Lastly, make the UI actually useable.  No damn Start menu.