Entries:
Comments:
Posts:

Loading User Information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading User Information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

WPF 3.5 SP1 App Model with Jennifer Lee

Download

Right click “Save as…”

  • MP4 (iPhone, Android)
  • High Quality MP4 (iPad, PC, Xbox)
  • Mid Quality MP4 (Windows Phone, HTML5, iPhone)
  • Mid Quality WMV (Lo-band, Mobile)
  • MP3 (Audio only)
  • WMV (WMV Video)
I spoke with Jennifer Lee about what's new in the Application Model realm for WPF 3.5 SP1.  Topics include the improved cold start, splash screen and a demonstration of HTML and XBAPs using the new WebBrowser control.

Looking for more than application model? Check out the WPF 3.5 SP1 Overview video

Tags:

Follow the Discussion

  • CKurtCKurt while( ( !​succeed=try​() ) ) { }
    Hi, nice video !

    Still can't help but wonder why they just didn't call it "WPF 3.6" it would be allot more clearer for developpers, because some things just don't run on 3.5 , most things are not updates/bug fixes but new features.
  • PLEASE - enough with starting every sentence with 'So...'.

    I know this seems to be the Microsoft way, but in this video almost every sentence Jennifer says begins so it.
    Normally I don't notice these kind of things, but it was really off putting for me!
    Sorry to rant - interesting information, but the delivery just grated on me.
  • I know this is off-topic, but she's hot!.
  • John Melville-- MDJohn Melville-- MD Equality Through Technology
    DukeNukem wrote:
    Hi, nice video !

    Still can't help but wonder why they just didn't call it "WPF 3.6" it would be allot more clearer for developpers, because some things just don't run on 3.5 , most things are not updates/bug fixes but new features.


    Agreed -- or even just drop the whole SP and call it .Net 3.51

    As hard as it may be to covince developers that its "a service pack with features" convincing users is even harder.


    BTW I like the agility of the wpf team to come out with three really solid (looking) releases in such a short time frame.  I just think that there is no reason to conflate a service pack with a release.
  • Why can't you guys remember to post a link to the LOW-RES file on every video that you do? Mad

    It's very irritating when downloading with BITS to have to wait on 600Mb files.

    ---dup---dup---

  • shatterstar6457 wrote:
    I know this is off-topic, but she's hot!.


    Beavis has spoken!
  • OrigamiCar wrote:
    PLEASE - enough with starting every sentence with 'So...'.

    I know this seems to be the Microsoft way, but in this video almost every sentence Jennifer says begins so it.
    Normally I don't notice these kind of things, but it was really off putting for me!
    Sorry to rant - interesting information, but the delivery just grated on me.


    I've heard its a northwestern thing.
  • Will the WPF WebBrowser control be a DependencyObject and therefore bindable? Could I, for example, do this:

    <WebBrowser DocumentText="{Binding MyHtmlProperty}" />

    ??

    ps. You're right about the "so", guys - both Adam and Jennifer started almost every sentence with it! Expressionless

  • Soooo... (point taken) Wink

    I'm taking this to mean you want to be able to bind an HTML string to some property on the WebBrowser and cause the WebBrowser to navigate when the data bound to the property is updated.


    A few things here -

    Yes, the WebBrowser control is a DependencyObject. However, we would have to expose navigating to an HTML string as a property (specifically, a DependencyProperty) for the databinding to work, and for it to work in XAML, which we do not. The functionality of navigating to an HTML string is achieved by calling the WebBrowser.NavigateToString() method. You will need to implement your scenario in code by calling the NavigateToString() method. 

    Therefore, the answer is NO, you could not do this:
    <WebBrowser DocumentText="{Binding MyHtmlProperty}" />


    I can see how the above would be useful and convenient. The change would mean you could 'get' the html string loaded as well as 'set' it (which is what the method achieves). We may look into adding it for a future release. As always, your feedback and specific affected scenarios certainly help in these matters, so please keep it coming!

    Thanks!
    Jennifer
  • Thanks Jennifer.

    For my purposes I would only need to set the HTML string (a "OneWay" binding) since the browser control itself wouldn't be doing any updating. Perhaps I could define an attached property or something that called NavigateToString() when it was set?

    I think the old example you often see of a WPF app that reads RSS feeds would be well-served by a simple property on WebBrowser that lets you bind directly to a string - that way the browser could be bound to the selected item in the feed and simply display it as the user navigates through the list of items.

    Matt
  • Hi Matt,

    Yes, that sounds like the right thing to do. You might also try writing a custom control that has a child WebBrowser, if you want encapsulation.

    We are working on putting together some WebBrowser samples, and I think the RSS scenario would be a good one, as well.

    Thanks!
    Jennifer
  • i think jen lee is one of the best women billiards player..
  • I am using the new wpf webbrowser control in .net 3.5 sp1 and I need some help trying to use the virtualearth control. Each time i try to load a map the internet explorer information bar appears with the message "To help protect your security, your web browser has restricted this file from showing active content that could access your computer". Any ideas how I can prevent this from occuring?
  • need more wpf controls~~ anyway, nice video~

  • This works when using the browser normally (sans the embedded WPF behavior)

    -----------------------------------

    • To resolve this, the following XP SP2 setting must be checked.

    ·      Open Internet Explorer

    ·      Go to Tools > Internet Options

    ·      Click the Advanced tab

    ·      Scroll down to the Security options

    ·            Check the option that reads:
    Allow active content to run in files on My Computer

  • Frames are bad; they were never good. Please don't ever, ever think otherwise.
  • Adam KinneyAdamKinney Agent of Change
    : )
  • Hello Jennile.

    Does the new webbrowser sp1 can be inside visualbrush ?

    http://forums.msdn.microsoft.com/en-US/wpf/thread/9e89a10d-8d39-4f36-945b-f8777a6ef422  ?

  • RE: Binding to thenew  WebBrowser control

    A poor man's workaround for this problem is to create a user control that wraps the WebBrowser and offers the needed dependency properties. Here is a quick example:

    XAML Defenition (MyWebBrowser.xaml):

    <UserControl x:Class="RSSTest.MyWebBrowser"

        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

        Height="Auto" Width="Auto">

        <WebBrowser Name="mWebBrowser">

        </WebBrowser>

    </UserControl>

    C# code (MyWebBrowser.cs):

    public partial class MyWebBrowser

    {

        public MyWebBrowser()

        {

            InitializeComponent();

        }

     

        public WebBrowser WebBrowser { get { return mWebBrowser; } }

     

        public static readonly DependencyProperty StringHtmlProperty =

            DependencyProperty.Register("StringHtml", typeof(string), typeof(MyWebBrowser),

            new PropertyMetadata(new PropertyChangedCallback(OnStringHtmlChanged)));

        public string StringHtml

        {

            get { return (string)GetValue(StringHtmlProperty); }

            set { SetValue(StringHtmlProperty, value); }

        }

     

        private static void OnStringHtmlChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)

        {

            MyWebBrowser me = (MyWebBrowser)d;

            me.WebBrowser.NavigateToString(me.StringHtml);

        }

     

        public static readonly DependencyProperty UriProperty =

            DependencyProperty.Register("Uri", typeof(Uri), typeof(MyWebBrowser),

            new PropertyMetadata(new PropertyChangedCallback(OnUriChanged)));

        public Uri Uri

        {

            get { return (Uri)GetValue(UriProperty); }

            set { SetValue(UriProperty, value); }

        }

     

        private static void OnUriChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)

        {

            MyWebBrowser me = (MyWebBrowser)d;

            me.WebBrowser.Navigate(me.Uri);

        }

    }

     

    Binding Examples:

    <local:MyWebBrowser Uri="{Binding Path=Link}"/>

    <local:MyWebBrowser StringHtml ="{Binding Path=HtmlString}"/>

    <local:MyWebBrowser StringHtml="{Binding Path=Description, StringFormat={}&lt;HTML>&lt;BODY\>\{0\}\&lt;BODY\>\&lt;HTML\>}"/>

     

  • medyummedyum

    Very nice sharing.thanks
    <a href="http://www.medyum.info ">www.medyum.info</a></div>

  • medyummedyum

    nice share. thank you 

  • dizi izledizi izle

    Bedava dizi izle - http://www.dizikral.net

  • ChatChat

    Thank you for sharing your article I would always follow.
    <a href="http://www.askimchat.net" title="chat" target="_blank">chat siteleri</a>

Remove this comment

Remove this thread

close

Comments Closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.