Archives

Archives / 2003 / December
  • XAML and Xamlon.com : Hello World!

    So Im sure most of you have heard about Xamlon.com 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:
    HelloWorld.xaml
    -------------------

    <?Mapping XmlNamespace="events" ClrNamespace="Rob.Events" Assembly="HelloWorld" ?>
    <Border
        xmlns="http://schemas.microsoft.com/2003/xaml"
        xmlns:def="Definition"
        def:Class="Rob.Events.EventHandler"
        Background="White"
        BorderBrush="Black"
        BorderThickness="3"
        >
        <DockPanel>
            <Button Click="OnClick" Width="100" Height="50">Press Me!</Button>
            <TextBox ID="HelloTextBox" Width="400" Dock="Left"></TextBox>
        </DockPanel>

    </Border>

    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?

     

    Read more...

  • 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 MetaBuilders.com 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!

    Read more...

  • 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.
    Thanks.

    Read more...

  • 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.

    Thanks!

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

    Read more...

  • 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.
     

    Read more...

  • 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 />");

    }

    </SCRIPT>

    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.

    Read more...

  • 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.

    PRESENTERS:

    Jeromy Carriere, Architect Evangelist, Microsoft Corporation

     

    Read more...

  • 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..

    http://ineta.org/DesktopDefault.aspx?tabindex=1&tabid=20  (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, VanNetUg.ca 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...

    http://ineta.org/desktopdefault.aspx?tabindex=1&tabid=27&groupid=185

    or

    http://ineta.org/desktopdefault.aspx?tabindex=1&tabid=27&groupid=501

     

    Why has Ineta.org 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

    http://www.netbc.ca/

    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.

     

    Read more...

  • tracert to bell.ca..

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

    Someone pointed me to this...

    http://www.tera-byte.com/cgi-bin/nph-trace?bell.ca

    Output:

    1  cat6509-vlan2.edm.tera-byte.com (216.234.161.1)  0.217 ms  0.190 ms  0.192 ms
    2  ra1ar-ge3-2-12.ed.bigpipeinc.com (66.244.192.41)  0.998 ms  1.080 ms  0.933 ms
    3  rc2ar-ge3-0.ed.shawcable.net (66.163.70.9)  0.895 ms  0.832 ms  1.017 ms
    4  rc1no-pos14-0.cg.shawcable.net (66.163.76.5)  5.260 ms  5.173 ms  5.122 ms
    5  rc1so-pos15-0.cg.shawcable.net (66.163.77.9)  5.646 ms  5.494 ms  5.642 ms
    6  64.230.231.137 (64.230.231.137)  5.837 ms  6.226 ms  6.571 ms
    7  bells-network-has-lots-of-security-holes-to-exploit.bell-nexxia.net (206.108.101.137)  6.163 ms  6.057 ms  5.462 ms
    8  bells-network-has-lots-of-security-holes-to-exploit.bell-nexxia.net (206.108.97.97)  50.033 ms  50.064 ms  50.197 ms
    9  64.230.242.194 (64.230.242.194)  50.264 ms  50.167 ms  50.783 ms
    10  bells-network-has-lots-of-security-holes-to-exploit.bell-nexxia.net (206.108.97.2)  50.470 ms  50.620 ms  50.058 ms
    11  bells-network-has-lots-of-security-holes-to-exploit.bell-nexxia.net (206.108.98.246)  50.252 ms  50.158 ms  50.190 ms
    12  bells-network-has-lots-of-security-holes-to-exploit.bell-nexxia.net (206.108.104.30)  50.135 ms  50.579 ms  50.251 ms

     

    Read more...

  • 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>

    Read more...

  • 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.

    and...

    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. 

    Read more...

  • 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.

    Anyone?

    Read more...