Modernization Hub

Modernization and Improvement
Developing for Sets on Windows 10 : Build 2018

Developing for Sets on Windows 10 : Build 2018

>>Good morning. Welcome. I hope that woke you up. We are excited to be here today. My name is jason watson, i’m a Program manager on windows experiences and devices team and Joining me is raymond chen as programmer on the same team. [Applause]>>Yes. So we are excited to be here Today. Yesterday during keynote you saw A glimpse of the value proposition of sets for your Customers and also for you and for me for essentially all users Of windows. Today we wanted to spend a Little bit of time talking about the developer opportunity and Talk about what sets means for your business and for Applications and so that’s what we will focus on today. Sets is essentially a new way for users to be productive on Windows by helping them to group apps and web content together, But most importantly being able to help those customers get back To that content on any of the devices that they own. This will help them to increase productivity, help them to get Work done in most effective way. With this also comes new Re-engagement opportunities for you and for your apps. First with sets introducing new surface in windows called new Tap page. Surface easily discoverable by Users from any window in the system and makes it really ease For your customers to find and launch the applications in Context of set they are working on. Another opportunity that sets Introduces for you is that windows will prompt users to Restore tabs for your app when user opens up a document that’s Related. So with this feature with sets There’s a new re-engagement opportunity that opening Documents can literally lead to re-engagement into your app to Help user get work done effectively. So walk through quick example of the new tab page and saw piece Of this during joe’s keynote yesterday and working on a set And very easily i can click on the plus to get to the new tab page. The new tab page has a lot of content related to office Because i’m an office subscriber and notice on the new tab page There’s information related to the organization. If you’re in it your Organization will have a capability of through google Policy configuring aspects of the new tab page to help your Users to be more effective to get work done. Additionally you will notice under the search box we will recommend on windows frequently Used after users trying to help the user to get to what’s next Or making a guess based off apps they typically engage in and not Limited to the app suggestions. User can get access to any apps Or content on the system they want to from the search box. So from the search box as you aunch The excel application and it could easily be your business application. So with search on new tab page there’s a way for your users to Easily discover and launch applications to help them to get Work done.>>[Off mic]>>I’m sorry. With you re– can you repeat the question?>>[Off mic]>>i see. So the question i was just asked can a user search for any Application that is installed or can a user only search for applications that are part of The set? the goal of the new tab page is To help the user get to what’s next and that’s not necessarily An element that’s already in the set. So from search you can search Through any installed applications on the system to Get to what’s next. It is a good question. Thank you. The other value proposition of Sets is really helping your customers to pick up exactly Where they left up in the app. So this example i have opened up Document that relates to task i need to get done. Windows prompts user would you Like to restore the previous tabs and shows a glimpse of what Are the different tabs that can be restored. These are things that are Previously tabbed with my document and by restoring these Tabs this basically provides me with ability to re-engage in Other related activities to create that document. One of the related activities Could be a line of business app. In this case it is an excel app But also a line of business app that your customer used to get Work done. So sets you can think of it as an early beta today. It is a great way to stay organized. We shipped sets initially to subset of insiders december and Learning a lot from the insiders from feedback and not yet Released to everyone but we are scaling out the sets to more and More insiders everyday. We are super encouraged by what We see and there’s more coming. Based off of feedback that we Are getting from users and from developers. We are going to continue to Iterate on the solution with you to make the solution great. As joe mentioned yesterday we are going to continue sets and Release it to everyone only when it is great, what we feel it is Great at solving the user problems of picking up where Left off and resuming work across all the devices that i Own. Now, for most of you there’s no Work required for your apps to have a basic experience with sets. With some extra work and you will see what that extra work Could be there’s potential for you to unlock much richer Experiences for the customers and increased re-engagement of Discovery of the apps when customers are trying to get work Done with sets. We are going to kind of take you Through a journey throughout the session of updating two apps, Two sample apps from a basic experience with sets to great experience. One of the apps is uwp and 132 And equal low important to the platform and we will walk you Through the journey. The sample apps that will walk Through today are going to be available on get hub and we will Have a link to the get hub repo at the end of this session, so You will be able to access the samples after the session. So let’s start with multi-instancing. It is a feature that’s available To anyone 32 application today. Quite simply it is the ability For user to run multiple instances on application of the pc. There are tons of benefits to support fro productivity standpoint. If user super engaged in the application and they can find Ways to use the application in different parallel work streams, Multi-instance is suited for that and enabled the types of scenarios. With sets there’s even more value in enable multi-instances And let me show you. So in this example i have two Sets open. One of the sets is related to Activity to planning for travel to seattle. Another set is related to activities actually a group of Windows and activities that related to tokyo trip that i’m planning. In each of the sets i have different instances of word open And under different context. In one set word is word document Is open that relates to the seattle trip and other set word Is open with a context that i’m planning for tokyo trip. I also have a trip app open in my seattle trip set but because The other set is related to trip travel as well, Albeit a different trip and makes sense For me to have trip app with second set too. Let’s look at an example where let’s say that the trip’s app Does not support multi-instances and look at user experience. I’m on new tab page and launch the trip app and something Unexpected happens. I as user am taking to the trip App but because the trip app doesn’t support multi-instancing We switch focus to the running instance of trip which has the Sort of jarring instance of taking to a different set, Right? this is accomplished the goal of Taking user to desired activity but as also taking that user out Of context, out of the set that they were working on and into a New set. Let’s look at an example where Ct-we can make the experience Change from basic to actually Really good for the user. So in this case run through the same steps. Run the trips app and this time the trips app supports Multi-instancing so what happens is when i launched a trip’s app In context of set a new instance gets launched and right set of Activities, so this is a very good experience made possible Through multi-instancing. As i sort of led the section With win 32 application support and so wp application and that Feature is available for the mat form today and easy to enable in Application, manifest update and it is optional. We recommended because it has a ton of value for users that are Trying to get productivity done in multi-parallel sets but you Should be careful if your application today writes to Resources on the disk, need to make sure serializing before you Turn on multi-instance. Most of you the work will be Quite simple and simply just updating the manifest to support multi-instancing with that i Will hand over to raymond and how i can do multi-assistancing in your apps.>>Hi, i’m raymond. See here is copy of the trips App that json has been showing off and suppose i’m over here Clicking on my seattle trip and important things i need to do, Pack my suitcase, get own autograph and visit the free mont. And go back in the timeline and see i’m also planning a trip to London but since right now this is a single instance away away Application and took out of seattle trip and transformed Into the london trip and let’s fix this problem. Application manifest trial and zoomed it up so we can all read It and can’t see the top of it. Trust me this is the whole thing. If we drop the new attribute that was added, it is supported In the april update that just went out. You could set supports multiple instances equals true. Five we will rebuild the trip’s app and redeploy it. Of course, this — ability to run multiple instances something You’re already used to do with win 32 apps and bring to uwp applications. Even though the system will launch new instance to universal Windows platform application take advantage of new api we Added to adjust how new instance runs. You might decide the application is very document centric and User opening the document that is already running somewhere Else, you don’t want to open two copies of the document. You want to switch to the existing one. So there are ways for the application to adjust how the Multiple instancing works. So here we have my app again. It is hiding under my remote desktop thing. There it is. I will go into the seattle trip. Isn’t that great? And then i — somebody asked me a question about the london trip And i will go and launch the london trip and oh my goodness, it is another window. How did that happen? that’s just magic. That was a very quick look at it. There’s plenty more to do with Multi-instances and back to jason to wrap things up.>>That was a quick look of multi-instancing and believe That investing with a little bit of investment to multi-instancing in your Ke experience to use erand getting work done from basic to good. Now we will switch to investments you can make in the App to make the experience pop for your users and make the Experience super rich and great. We will start with — we will Start by talking about user activities. And we will started the section Actually by describing a scenario that that will probably Be very common scenario and how you can make the scenario really Rich for users through user activity. This example i had a set open And again, we are back to planning for a seattle trip, but i made progress. I have been engaging in raymond’s trip app and thinking About the things i want to do in seattle. In the trip’s app i’m at the Seattle page and i have also selected an item on the to do List and get interrupted. This happens all the time so i Close the set but i as user have confidence that sets will — With sets i can easily get back to the set of activities at a Later time. We are going to look at two Examples and the first example this is an example sort of basic Restorative sets. This is what happens by default On the system if you don’t enlighten the app with user So i open up a document related to my trip travel and windows Prompts me do i want to restore the previous tabs. In this case i had one previous tab. When i look at the card for that tab, it is basically a trip app And gives me a visual indicater that relaunching this tab will Take me back to the main window of the trip’s app. I click restore tabs and trips app tab comes back and good and Takes me back into the app and brings back the app into my set But it is not as quite as rich as i would like because it Doesn’t take me exactly where i left off in the experience with Trip’s app. The second example and this Example is only possible by investment on your part, i will Again launch the document that’s related to my trip travel and i Get prompted to restore the previous tab, but something is Different here. I look at the card that gets Presented to me. This is the card that windows is Offering to restore as a tab in my set. This example it is clear that From the card i have the option to restore the trip’s app but Specifically into the seattle experience within the app. I click restore tabs and the trip’s app opens but not at the Main page. Opens right back at the seattle Page that i was looking at before i closed the set. Even remembered to highlight the last two items that i checked Off of my list. This from customer perspective This is sort of magical. Right? all i had to do was close the Set and reopen element of the set at later point in time and Everybody came back just the way i left it. The key ingredient to making this magic happen for your Customers is really something called user activities, which You might have heard a ton about last year and you might have Read some of the blog posts about how do user — how to Invest in user activity and timeline and i will do a quick Recap what user activity is. It is object in the system that Essentially conceptually represents an experience or Activity within an app that your user might engage in. It is composed of three elements. One being a deep link which is Basically a deep link into an experience within the app. Metadata that relates to content within the activity that the Activity represents and also adaptive card. The adaptive card is super important. The adaptive card information is Essentially represents visually what it looks like to reenter an Activity within the app. That visual representation of The activity can show up in different windows surfaces, one Of them being timeline. So in this example you could see Different cards presented to the user that represent activities They were engaged in in the past and these are essentially new Entry points for users re-engage into your applications. So it is super important for these adaptive cards to be Inviting for your users, but also useful. The adaptive cards should indicate very clearly visually What activity they will take the user to. The information in these adaptive cards are also used by The system to build cards when we restore Tabs. So i want to walk you through Sort of a recap of what is the way for apps to operate in Timeline for user activities and then we will talk about the Additional incremental investment you could make for Sets with user activity to participate in timeline an Application will essentially publish user activities to the Local activity fee on a device that essentially represents what The user was engaged in in your app. Your app will do this wherever the user context Changes. Simple example would be if i’m In news app and particular article, i might publish a user Activity to the activity feed that it was looking at this article. When user switches to different article or different aspect of The news app, that’s an opportunity for the application To publish a new user activity represented that user context Has changed. These activities get published On to timeline for user and the way they are shown in timeline Is through the adaptive cards that you define as part of the User activity. When user clicks on adaptive Card that points to your activity, we take the associated Deep link to essentially launch the application. But the real magic happens for the user when your application Takes that deep link and deserialallizes the info in the Deep link to take the user exactly the way they were when They were working on the particular activity in the application. That magic is only probable if you do work in your application To enable it. You can go further with sets though. With incremental investment in Sets you can truly amplify the user activity to create Delightful engaging experiences for your customers. You saw earlier how simply the act of opening a document that Was previously tabbed with your application can lead to Re-engagement with activity in the application. That is only possible for your investment from your side in Your app to create rich user activities that can be used to Take users back into the app, contextually with the document. An opportunity for your application to on request from The operating system for user activities so, for example, if a User decides to close a set before the — before the user Decides to close the set, there’s an opportunity for you To hand off rich user activity of the system. That can be then used to take the user back into the Experience when they open the doc or other elements of the Set. Actually i will make one more Point here. The activity is local and if i’m Not connected to machine that’s on the internet i get all the Value of sets and timeline on my device. I can close a set and on the same device at some other point In time reopen the set and get back to where i left off. But the activity fee also gets published into the microsoft Graph and what that enables is for a particular user that’s Logged in with an msa, that user that’s logged in with the same Msa on other devices they own can see the timeline on devices And can also see the sets on other devices. So that makes the investments — your investment and user Activity even more powerful and create opportunities to drive Additional acquisition or attached application on other Devices that your users own. So to recap the goal of timeline is really to help your customers To re-engage in activities in your app. An example of this would be reopening document with an app Or opening music play list with your app. The goal of sets is a little bit more nuance than that. The goal sets about helping your Customers to pick up exactly where they left off within an Activity in your app providing that sort of magical experience Of continuity, being able to exactly and very precisely get To work done and most efficiently as a user. And that is only possible, that customer experience is only Possible with your work and your apps. And with that i’m going to hand It off to raymond and raymond will show you how easy it is to Make the investments in the app to make the delightful rich Experiences.>>Oh my good be, that’s so small. Let me disconnect and reconnect because nobody can see That. You’re looking hint the curtain. You’re looking at all of my vn’s and almost no disk space left on This computer and keel over at any moment. You’re listening to my internal monologue. [Laughing]>>here i’m back on my system And taking notes through the build conference. We open the notes. My vm crashes because it has run Out of disk space. Here we go. How much disk space do i have? i have six meg. That is not going to be enough. Why don’t we move on. We will gets back to the demo in a little bit.>>I could do that. [Laughing]>>All right. So the api that you would see raymond demonstrated are Available today in the windows inside sdk. Here is link for more information. I’m not going to talk to the api’s, i’m going allow raymond To demonstrate on the api’s and api’s are what enables you to Ask windows to request fees or activities from your app and Then that gives you the opportunity to hand off very Rich activities where the system can continue architectually Relate — contextually relate to those in the set and rich pick Up where i left off and customer’s experience Desire.>>What do i tell — i’m doing Activity and it knows (inaudible).>>The question is if i have an Application and rights to user activity to the activity feed, Do i have to do anything extra to correlate the activity with Other activities in a set? the answer is no. The system actually takes care of this for you. As raymond gets set up and we have time for q&a i will provide A little bit more context. So in the examples i share Before, showed basic experience and then i showed the great Experience, which requires a little bit of extra work from Your side to enable that sort of magical experience for the Customer. The basic experience — apps Didn’t have to do anything to participate, right, so somehow The system knew that in the past with the document i had this Application, maybe this page, maybe this other application, That was previously grouped together by the user and for the System this is an implicit signal that hey, this was an Intentional thing from the user to group the things towing. This must be a set. So it is an implicit signal to Say these things are related. The way we sort of define — the Way we sorted of define the elements in the set in the System we basically have user activities for each element and Have construct on top of that where we represent the Collection of activities as a set. For apps that don’t have Explicitly, dope provide rich user activity we will provide Activity on their behalf but the kind of activity we create will Be very basic. We know the application is part Of the set so the deep link aspect of the user activity is Essentially just app launch uri for the app and not as rich as What you can provide and you know what the experiences are — What experiences your users were engaged in in the application And that’s where the real opportunity comes for you to Make the experience much richer for the customers. How we doing, raymond?>>you just keep going. I’m deleting scenarios off the machine right now. All right.>>Can we do the window grouping?>>catastrophic fairly.>>That didn’t sound good. In the keynote or stopped by the Booth you saw demoses where — actually the mail app would be Good example. If i’m in outlook window get Automatically grouped and windows getting automatically Ground and that’s another way of saying the system is by default Sort of helping users to cure ate a set, right? But i’m here to say that your apps have full control over Window grouping behavior for windows you create and for Applications you launch. Why? Because you know your customers the best. You know the intent of your application the best. You know what your customers expectations are the best. So what that means is, for example, if you have a scenario In your app where literally the feature is to create a window And to reposition it side by side, there was an earlier Session today where i believe we talked about platform where you Can now position windows relative to each other. Clearly in that case that’s an example of you wouldn’t want to Automatically group the windows and value to show features side by side. But on the flip side your app might support web indications And if from your application there’s an option for user to Launch a web page and relates to services that you provide that Enhanced the value of your app. These are things that you probably want to group Automatically with the group window, right? So that’s a different example. But the end message is that You’re in control of how windows get grouped when your app Creates new windows and launch apps.>>We will all do this with note Pad because note pad has line feeds now so it is awesome. [Laughing]>>All right. So what was i supposed to be Talking about? i was supposed to be talking About user activities. Remember them? He talked about them 20 slides ago. So this is code in the trips Application that runs when the user navigates — navigates to The application’s home page. User activities were introduced, We announced them back in build last year and they began to be Supported in the fall update from last year, but — so i Don’t blame you if you sort of forgotten and do a quick recap Of this. This is code i should have written in the app but i didn’t So i’m doing a little bit of catch-up. So the first thing we do when User goes to the home page of the application is we generate User activity that says that user is looking at the trip Overview page. We get the user activity Channel, this gets us access to the activity feed. On the channel we get or create user activity with specific name That we called home. Activity id’s are completely up To you and format them anyway you like. System doesn’t pay attention to what they are aside from the Fact that they are — they will produce them again if you ask For them by the same name. In this case i have decided to Call the activity for looking at overview of trips home. We get that activity or create it if necessary. We set up an activation uri and this is where the magic happens. This is where you set the uri system that’s going to invoke in Order to resume the activity. In my case i set the uri to be a Specific protocol that i registered with the application. And then i use the activity id again as the payload. I set some display text for the activity so it shows up nicely, Trips overview but to make it look super nice i can create Adaptive card for this activity. This adaptive card allows me to Generate a rich beautiful, enticing way for user to come Back, recognize what card represents and resume the activity. This particular code uses an adaptive card library available On new get called surprisingly adaptive cards. But really all this is is an object model around underlining json schema. So at the end of the day generate adaptive cards whatever Json library you like. Let’s see if i can find one here here. I have note pad. Look in note pad. Note pad is doing heavy lifting today. This is what adaptive card actually looks like. It is just a bunch of json. Say hey, i have a background Image, i have two lines of text, first line i want to be larger And bolder and cannot see the pointy thing. First line larger bolder and second line of text says i have Two trips and that’s all there is in it. After i set up my activity i save it to the activity feed and Then i start the session. Starting session what tells the System that the user is currently engaged in this activity. This allows the activity to be promoted on timeline. When the user navigates away from the page i dispose the Session and tells the system user no longer on my Application’s home page. So this is a code writing and Shipping today that publishes activity into timeline to allow The use territory the return to what they were doing in more Effective manner. But the next step is to take Advantage of the new functionality that was added in The april update. Hey, that’s my start menu. All right. Let’s to this again. Format. What would be a good font. We will do Consoleus. All right. So the trips page — this is the page that describes a particular Trip and in this case it would talk about the seattle trip, for Example, and when we go on this page, we do pretty much the same Thing as before and generate user activity that says the user Looking at particular trip and in this case activity idi say we Are on a trip, this is the trip id and we do the same as before, We create an activity for it, we set up an url for the system to Invoke to bring us back and fill in adaptive card, set up visual Elements and we save it to the channel and we start a session And lets the system know the user currently looking at the Seattle trip. The new piece here that just Shipped in april is the activity request manager. You can ask for the activity Request manager for this view and register on the user Activity requested event. This event is raised by the System when the system thinks now who can a great time for Application provide detailed information about what the user Is doing right now. So in this sample program in Response to the request for the activity we take a look at the To do list, pull out the item that the user is currently Looking at in to do list and encode that in the activity id And in the uri so that way now when the system restores the Activity in addition to getting the trip id we also told it to Give us the item on the to do list to restore to. We fill out an adaptive card, this is all the same. At the end we finally respond to the request by saying this is The user activity that represents what the user is Doing right now. And so this is the last piece That lights up the sets and restore scenario in sets that Allows the user to restore directly into the application Right where they were. Now, i know a lot of you are win 32 Programmers, so let’s take a look at the win 32 version of this. I’m trying to type and talk. I don’t remember — channel, that would be a good thing to Search for. Win 32 applications can also Consume objects from the window run time and so, in fact, the Code for it — code for generating activities and Publishing them into the activity feed is identical. We do what we did before. We get the channel, we create Activity on it, we fill in information about the activity. We save it and then create a session. There’s a little wrinkle here in that win 32 operates with Windows rather than uwp views and so the method is create session four window rather than Create session and you pass in window handle. Aside from that this code is the same code you had in the Uwp application. Similarly the code for listening to request to generate specific Activities is the same except that instead of saying get User — get the user activity request manager get for current View we say get for window and pass in window handle and event Itself is the same and handle the event the same way in the Book’s app we remember where — how many pages into the book the User has managed to read and remember that position in the Url that we ask to be used to launch us back. And i will take a quick look at the code that actually does the invoke. This code is also pretty much the same between the win 32 and Uwp application. When the application is Launched, looks at command line, parse it is and says oh my Goodness, the command line is uri scheme that i registered. Let me parse it out if the name of the page that i recorded in This uri is book and i’m going to go to a specific book. Go to book viewer. The book viewer Takes url and finds the bookie encoded in the Url and find the score position encoded in the url and windows Ready we find the scroll viewer and scroll right to the Position. So this shows how uwp and win 32 Applications can light up the set’s sent taros by publishing Activities into the activity feed and then publishing Specific activities upon request so that way the set can be Restored with maximum fidelity. I have have jason talk for Awhile while i figure out what’s going On.>>Context you back into Controlling window grouping, so just talked about the benefits Of making sure that you’re in control of your customer Experience and if you have a strong point of view is to Whether specific windows you create are grouped or not, if You have a strong point of view is to whether or not apps that You launch should be grouped or not, based off intended customer Experience then you have the tools available to stay in control. Raymond will do a dem on to show you how easy this is for uwp and Win 32 applications and before we move into the demo i will say A quick trailer. The api’s you will see in the Demo are coming soon, really soon actually in windows inside Rstk so stay tuned. And the other thing –>>I’m sorry. I thought you were throwing to me. We rehearsed this. [Laughing]>>we will go back in time.>>Oh, you’re on my slide. That’s great. On to eight. So i was going to show off my Awesome demo app except the vm doesn’t run and you will just Have to imagine this app is totally awesome. I like wrote it in a week. It has jokes galore. It is just hilarious but can’t tell them now. Sorry. You will have more time for lunch. In the sample application we had Two kinds of links. One of them was when you’re on a Trip that has a link to flight tracking information. This is a sort of information that you would want to be part Of the overall trip planning activity, the overall trip Planning task that the user is engaged in makes sense for the Trip — the flight status web page to be part of the same set. The code that we have to open to launch web page is the function Lunch uia sync and specify we would like the particular web Page to open as part of the same set is that we set a new property that’s available that We are adding called grouping preference and say the grouping Preference is with source and we would like the application being Launched to be part of the same set as the application doing the Launching. On the other hand the trip’s Application also had some advertising in it because modernization is important to The livelihood because otherwise we can’t go trips. In this case we are launching an ad for the microsoft surface Because hey, microsoft surface is the thing. If only had more disk space. In this case again we launched The uri in usual way but we specified grouping preference Separate to indicate that we want this particular window to Open in a new set. So this is a very simple way With setting one new property you can control how things — Other applications you launch from your application either Continuation of the overall task of the user is performing or is Starting a new type of activity. The grouping preference also Added to launch file and sync and whatever type of thing You’re launching from uwp application you can control how It groups. For win 32 applications it is The same but different because win 32 is always the same and Different. In my hilarious sample Application there was a button to launch note bad because note Pad is the star of the show and make sure every app can launch Note pad. Here is function that i use it Had launch note pad. We set up the new thing called Grouping preference site which we will dig into. In win 32 the executed function takes a site which is a way for The application that is calling to execute to provide additional Information to the system to control how the launch takes Place. It looks really strange calling From c# and i manage to do it and only one screen full and That’s because i put all the horrible p invokes over in the Shell enter op name space which i’m not showing you. Don’t worry, you can clone the repo and look at it. It is all in there. All the interfaces are declared, All got the right grids on them and take the code and go. The idea here is that we specify that we have a particular site. This site specifies that it has a particular grouping preference And associated window. There are two kinds of grouping Preferences for win 32. If you want to open it in a new Tab, you can specify a grouping preference with tab associated Window, otherwise if you wanted to open a new window you can say – – You can say that you want your grouping preference to be a New tab group. If you are a group opening with A — in a new tab, then when you set the associated window, i Will jump around again, i’m sorry. You can also set the associated window property to say that this Is the window that’s doing the launching, i want the new window To be part of the same set as this other window. And then right above it here is The grouping preference site itself. You’re perfectly welcome to Steal this. When we constructed it we remember the grouping Preferences at construction. The system asks us, hey, do you Want to be somebody who alters the launch ui context? We say yes, we would certainly like to do that. The system says okay, here you go. So we set the grouping preference to one of the two Values saying i would like — i would like this other guy that I’m launching to be part of my set or to be — or to start a New set. And in the cases where i’m Asking the other one to be part of a set, you have to pass the Associated window which tells which set you want that new Window to be part of. We are win 32 so we like to create windows because that’s What win 32 is all about. Create window out of win 32 Everybody would cry. And so here is the code that we Use to apply grouping behavior to windows that we created Ourselves rather than windows that we are launching because we Handed them off to shell execute. In the case where the Application decides that it doesn’t want to customize the Grouping behavior, you just do nothing and some system Determined default behavior. If you want to force a new Group, you can set a new dwm attribute called tab grouping Preference and you pass the same grouping preference value you See in the previous file. The new tab group specify that You have — you want a new tab group you set the window Attribute to the grouping preference new tab group and Appear as a new set. On the other hand if you want to Join existing group you set your preference to tab with Associated window and then you specify the associated window to Be presumably your own window And system knows on — we are the new window. In this case you set associated window to some other window in Your application that you would like the new window to be joined With as part of a set. It is important that you set the Properties before you show your window because it is the time You show the window the system decides where — which set the Window goes into, so if you’re a win 32 person you can do this And say nc creator or wm create. Just get it in before the show Window happens. So that’s a quick look at Controlling grouping preferences both for uwp launching other Things or in win 32 either launching other things through Shell execute or creating new windows on your own and Customizing the grouping with dwm attributes. I’m going to throwback to jason to pick up wherever he left off.>>Going to be recurring theme. So raymond just showed you how You can take full control over how windows that you create gets Grouped with your application. You might already be asking Yourself, what happens to my application today in terms of grouping? Today and tomorrow users will have the ability to control the Default preference for whether windows that are created by apps Apget grouped or not. Users can express a preference In settings and default behavior assuming that applications don’t Do something special to say i have the specific grouping Preference and walk you through couple quick camps and let’s say User preference settings to not group windows by default. So in this case i have launched the mail app and mail app is Unified, it does not express explicit preferences that Windows creates and i decide to pop open a mail and mail pops Open in new separate window and mail still has tab so if i want As user i can’t explicitly drag and drop them together to Explicitly express this is the set, these things belong Together and by default the system doesn’t do that Automatically and when i click on attachment in the mail and Basically causes another application launch, note pad, And that attachment is open in separate window and because user Expressed preference by default, don’t want to group windows Automatically and they are created separate from each other And just as they are created today. Your customers might also express a different preference, Which is to automatically group windows together. In this case i run through the Same steps and experience a little bit different. When i try to pop open the mail window that won’t gets grouped With the source window because the customer or the user has Expressed preference to automatically group things. If i launch the attachment with note pad, the note pad window Gets automatically grouped. This behavior happens if the Setting showed you earlier is set to automatically group windows. So the user can express a preference but again you’re in Control and so depending upon what the user expectations are For your app wherever you create windows you can override the System default preference. So now i’m going to switch to App visuals because i’m certain many of you are wondering — so In sets world what is what does this mean in terms of visuals For the application? i start talking about the tab visuals. The tab icon is probably the first thing to ask in term of What does sets mean for my app in terms of visuals. The tab icon something you already provide today. It is essentially icon you provide that shows up in other Windows surfaces like task bar and essentially take the icon And resurface it for the tab as well. Here is an car. The — example and icon in the Tab matches icon used in the task bar. Tab collars are also important and we provide apps with ability To control the foreground and background colors in their tab When their window is in focus by the user. When the window is not in focus by the user, then refer to theme Collars and this is intentional and help the customers, your Users to be able to easily distinguish between tabs, ie Windows in focus versus windows and tabs that are not in focus. Actually i will make one more point. Controlling tab colors is really Interesting for two primary reasons for you. One being branding. Right. So if you have a brand, the Ability to express that brand in the tab can help sort of differentiate that tab from Other tabs in the system. And it is just sort of Reinforces the brand and an opportunity if you have a brand Collar to reflect that and make the tab feel more connected and Native to your app, so being able to visually connect tab to Do the app is soup he were important to deliver a Delightful experience for the users when they engage with the App from a polished perspective. So in this example i’m going to Look at the one note app and in the one note app you can see the Tab is branded purple and also feels visually connected with The app. One noted window is currently in Focus and click on the trips aphigh pressure and bring the Trips apinto focus you can see the one note tab no longer Branded and colors are controlled by the system and Help user to visually understand the one note window is no longer In focus. And here is an example where i Switched the system theme to dark theme and see all the Inactive tabs doesn’t matter whether the tab is selected or Not, reflects the system theme, but when i click on the one note Window, now the one note window is back in the foreground, back In focus by the user so now the app is back in control in terms Of collars and tab. And with that i’m going to hand It back to rimond who will walk through an example of Customizing tab colors.>>So i have no awesome apps to Run and just going to be running note pad all day. So this is the code in the trips app that sets the lovely Soothing teal color in the title code that’s running in the application today running on there in market. This is the way you set your title bar colors and uwp and get The title bar for the current view. We calculate some of our very carefully chosen by marketing Branding colors. We set those colors into our Title bar to adjust all the colors that appear in the title Bar so that way it is coherent with the rest of the colors in Our application. The changes that you need to Make to get this to light up the colors in your tab is absolutely Nothing. This code also works at Colorizing the tab. Similarly as json noted you Don’t have to do anything to get the application to appear in the Tab, we will pick it up automatically in the task bar. Task bar picked it up from application manifest and have to Put icon in application manifest or the store gets mad at you. For win 32 applications, win 32 Doesn’t really have an existing way to declare to the system What your title bar colors are, so we need a little Help. In the sample app hiding in the Comment are — commented on name space is method called get title Bar for window and does a little comment about magic to go fish Out an application of title bar object that corresponds to the win 32 window. You can then customize the colors of that title bar as if It were uwp title bar and set background and foreground colors According to the beautiful bold assertive blue color of the Book’s app that you can’t see on the screen. So that’s basically all you need to do is customize the Appearance of your tab. We have the colors, the colors Uwp application for the color you have to customize title bar For win 32 application and the do work to get access to windows Run time title bar and customize the colors. And the icon for the tab for your win 32 app is again just Comes from the icon for your window it is the same icon we Show on the task bar and with that since that’s my last demo i Will curl up under this table into a fetal position. [Laughing]>>It is okay, raymond. That was pretty impressive Recovery. [Applause]>>so as raymond showed to you If you have a uwp app customizing the tab colors for The app is simple as using the existing title bar customization api. If you already customize title bar today your tab will already Reflect the colors today on a build with sets turned on. For wynn 32 apps we provide new api, raymond walked through it And have access to the sample code at the end of the session From the links and resources slide and that api will also be Coming soon probably this summer and stay tuned. So the last that i have for visuals is back button. We have new guidance for integrating buck button into the App and essentially to use an in app back button and different From guidance that we have provided in the past. But that guidance has evolved to really help developers to create A more consistent back experience across different Modalities and desktop and running tablet mode, running Window with tab on it, running won’t without a tab on it and Back experience should be consistent across all of those And across devices and i will take a moment to acknowledge That most of you probably already do this today. Most of you probably already implement in app back but theon And what we have heard from you is for the customers it is Important to have consistent back experience across all the Devices that your customers care about, including windows and Android and ios and having that experience be consistent across All is important, so for most of you it my not be applicable but For some of you i will have two additional points to make. One being if you use system back today it will continue to work With sets or without sets. And then the second is please Consider looking at at guidance. We think that from a user point Of view following the new guidance will actually help set You up and customers up better for success in the future as we Think about back experiences across other devices and Potentially new devices that ship in the future. And i will close on that topic with just a quick screen shot, So all the in box apps and windows moving to the new Guidance and integrating in app back button in the apps and this Example you can see the photo’s app has integrated back button So looking forward. We had it for awhile and getting A ton of feedback for the customers, both normal users developers. And one of the pieces of feedback that we have heard is From developers can i have more control over my tabs and just One example of that is let’s say my app has other experiences That my user might frequently engage in. Help me to provision those as Tabs but help me provision those as background tabs to sort of Get ready and make it easy for customer to switch to the Experiences but don’t switch focus away from the main window And get the tabs set up for when easy to engage in other Activities and one of the pieces of feedback we heard and Something that we are exploring for sets. Another question that i have Been asked is can i make the new tab page more contextual to my app? I will give you a couple examples. If i’m coming from console. We heard it from the console Crowd, click on plus, can new page reflect what intent is Because i just left from console so is there an opportunity to do Something more contextual on new tab page to get to what’s next Using as signal that i just came from console. The same question applies to essentially any line of business app. Line of business app focused on finances and click on the plus, Is there an opportunity for the developer to influence content On the new tab page to help the user to get to what’s next in The context of i just came from a finance app. So that’s something that we are investigating and hooking into As future new opportunities that we unlock for developers Customers. Can i customize my tabs more? great. So we just showed you how to colorize the tab and just showed You how easy it is to get an icon because we use the icon Already provided to us. Can i do more with the tabs? Examples would be like interactive badges, sort of an obvious one. In the browser today i can see badge for when audio is playing And can i have something similar for apps because might be a Media player app. That’s one example and heard Another example too and that’s an area of we are investigating To what’s possibly next for sets. Then finally can i participate without having to remove any of Mire title bar customizations. There’s a reason in the past and Path to participate to remove the customization and push back Into the client area of the app? mainly because that is less Friction for me to participate and i want to participate Because i want to have access to re-engagement opportunities that Apps participate and sets have access to. That’s another area we are definitely looking into and Exploring as possible future for sets. So these are examples of things That we are exploring based off the feedback we have heard from Developers and since december but i’m sure we are confident that there are opportunities we Haven’t thought of that you are — you might already be Thinking of right now or might think about maybe next week or The week after as you digest all the information that you have Heard from build. We want to hear that feedback. One of the ways you can give us feedback is actually quite Literally built into windows, so there’s an app called feedback Hub app and that’s a really great way to give us feedback. If you have other channels, please use that, social is Another channel, but however you provide that feedback to us, Definitely want to hear it because we know and we Acknowledge hope the message comes across from this session That the best user experiences, the magical user experiences are Only possible if you invest. We can provide basic user value Which is still user value and still important but the best User value and the best magical experiences are only possible Through the work that you do in your apps. You know your customers the best and know the app the best. So quick recap, what is the opportunity for you assess? Basic level it is about increasing the light and Engagement with the customers by helping to solve the problem of Just picking up very easily picking up on work within Activities in your app. So helping to pick up where they Left off. Traditionally we have thought About windows as really tied to a pc, so when i say ten, 15 Years ago we think about how does a user get work done and There’s typically pc that the might be on the site, sort of Dedicated to get work done and when i’m done with my work, i Will go here and do different things. That is not how people work Today typically a user — a normal Person, say a human person, will start work on one device, one Device that they own and might be tablet, might be a phone, Might be a pc, a device but that work doesn’t necessarily end There. User will typically move to Another advice spacial analytics Want to get work done in different context. Moving between devices basically get the work done is modern workflow. So we see windows as evolving as really helping to integrate Users experiences across all the devices that they own. And therefore we also see sets as an opportunity for you to Inject the apps into the modern workflow. So the calls to action are really today take advantage of Multi-instances, super charge your apps with user activities And validate the window grouping behavior in the apps and tab Visuals in the apps and if necessary create small fixes to Make them the best for your customers. And finally if it is applicable to you to adopt the in app but Button guidance and give us feedback and keep us honest and Path of delivering a version of sets that’s great, great for Users, shared users and also great for you. Got a slide here with a bunch of resources. I will just highlight all sample Code that raymond walked through in noet pad today are available On get hub and — github and excited to get feedback on that Too. Finally i will close with we have a few more fluent sessions That are still available today so i would invited you to attend One or even more of the sessions after this session and so with That i’m going to leave the slide up and kind of open it up for questions. Thank you. [Applause]>>I’ve got a question for you guys. I got a multi-window win 32 app So i’m project manager, i’m not a developer.>>Actually having a little bit of trouble hearing from the Stage, so maybe if you could speak louder?>>win 32 app?>>Win 32 app and it has multiple windows already.>>But all in the same process?>>All in the same process t makes it hard to share. Is there a way of opening — it opening its own windows into a Set deliberately and when — giving a uri as user activity Where it could say yes, you want me to be open and yes, you know, App originally opened might be in one particular set but might Have a window that’s been dragged into another set, Although opened in another set. Is that possible?>>I’m still trying to understand — understand the scenario. You have an application, it creates multiple windows but only one process.>>Yes.>>You created an activity.>>Yes.>>Then user launched that activity, the system is going to Run your application with create process probably. You can then recognize oh my Goodness, i have already got a copy of me running, and you can Hand the activation to the previous –>>I know which window you’re asking for because each of my Windows have reason for existing.>>Right. So the activity presumably you have encoded in the url Parameter of the activity what this activity represents, like I’m going back to document three.>>I happen to know that that –>>Opened that window over there.>>Can set focus to the window and i just did it.>>Will that work?>>sure.>>Okay, cool.>>Just works, man. [Laughing]>>hi.>>Hi. First question i have is about the task bar. I was using the insider preview and i found it a little jarring That the sets don’t correlate well to where the things are on The task bar. Is that something you’re Thinking about? yes. So i got a slide previously talked about feedback questions We are getting from developers. From users that is certainly at The top. It is just — it is clear that There’s investments we are making in terms of being able to Switch between activities with sets that aren’t necessarily — I won’t say necessarily. That aren’t reflected in the Task bar well today, so it is our point of View that should be more consistent experience and User interact with sets and definitely an area that we are Invest think. Say that how do we start Addressing this as around the out tab investments. Remember from the keynote but helping to switch between Activities and sets without tab, now set between individual web Tabs and that was informed by like — that was sort of an Effort to help address a little bit of that problem but clearly We aren’t all the way there. So the short answer is yes, we Have heard customer feedback loud and clear, that’s Absolutely a place we plan to invest. It is more than expiration.>>Second question is what exactly is the state of set Support for win 32? every win 32 app can get it or Opt into it? there’s a lot of customization.>>We invite all win 32 apps to participate. I will say where it makes sense, So constraints we have which aren’t specific to win 32 we Will say for any application is there’s certain things you must Support in order to be able to participate, one of them being You should be able to minimize, maximize, resize because when You’re part of a set and let’s say your window is not in focus But some other window is, when somebody maxnizes or resizes the Window, all the other windows supported that too, so sort of Base requirement. Then going specifically to win 32 Beyond sort of base requirement of supporting these Sort of window management operations the — the Requirement right now is really — if win 32 application, Don’t customize the title bar to participate. I will bring up a specific example because we have a very Prominent example that does customize the title bar. Win 32 today if you’re an office insider and running office Insider builds on a windows inside build with sets enabled You will see tabs in office, how do they do that? Run the same code on other machine there’s no tabs and Customize huddle bar. It is essentially check via new Api that we have available if we go to the dog links to see it. Check to see if sets is enabled on the system and if it is and If you want to participate in those re-engagement Opportunities that sets offers, then basically move the custom Content from title bar into the client area of the app and that Will enable the system to basically throw tab and grouped With other windows. That’s guidance. Particular line of business apps, don’t customize the title Bar, as mentioned before, you already participate with a basic Experience but then now they are sort of richer opportunity for You to enhance the experience for your customers.>>You don’t have to actively do anything and system can detect –>>Basic experience you can get a tab and grouped and system can Relaunch you to basically regroup you with previous tabs, Don’t have to do anything if you don’t customize the title bar And support things like window resize, maximize, minimize.>>Thank you.>>Thank you.>>Hi. Very cool, thank you. A lot of questions and i will go With the top two. You said right at the beginning Not all insiders are getting the bets. Is there a way of opting into that so i can get started on This?>>we are thinking through — Answer will be twofold. Thinking through now that sets Of insiders and also educating you how you can basically make Investments to make your apps shine with sets. How do we make this easier in Particular for developers and oem’s to get earlier access. So that i will say don’t have an answer right now but expect an Answer soon from team on what the story is. In general we do want to have like segmented population using Sets and not so we can make sure that in terms of like the goals That we have driving up user engagement, making sure we solve The problem set up to solve and make sure not introducing other Problems and the important to us to experiment with that and make Sure that we are on the right path. But that being said, i think our Point of view there should be exception for developers and Oem’s because they are also developers.>>That’s exactly my point. The second question again coming from win 32 environment and c++ Bindings for a lot api’s that you have shown us today. Everything you shown –>>defer to raymond.>>What you can do is sdk comes out and supports new windows That has the grouping preference, for example, you Could take the win mdment from sdk and run through the program That converts win md into cpp header files and they will come Out and they will work.>>Cool. Thank you very much.>>Thank you.>>The grouping preferences work for pwa apps as well?>>i don’t know. I just learned about the letters pwa yesterday.>>So, yes, that’s correct. Focus 132 application when we look at sort of the existing i Will say — existing opportunity of apps already exist today and Vast majority will be uwp or — actually vast majority win 32 And where we prioritize the focus. Pwa’s are super important and i think if you attend other Sessions at the conference you will understand that we Acknowledge it is super important and it is a big part Of the future. So i will say trailer would be We will definitely have answer for pwa’s And actually — there are some pwa’s we have had in House and actually get the tab because package dwp and one Definite path you can have and package it through the store get The tab and actually testing this internally and broader Question if i’m not in the store, get the tab and think the More clear-cut answer will come later after build –>>New api’s and go through javascript and pwa and a lot Of — universal apps are available, api’s are available Through javascript through them and want to know if they are Planning to be available through javascript.>>All the windows run time Functions are available in all languages. So you will certainly be able to Set the property. We are just not sure if it will work. I think the answer is we need to make it work.>>Thank you. Good question.>>Thank you.>>I guess my curiosity is semi related in that the tabs look Similar to edges tabs and so one of the obvious user questions is If also support the tab previews and expanded tabs.>>That is something we are definitely exploring. So if you have strong like feedback or point of view, Please feedback it is something we are discussing.>>Does each new tab create a new instance? If i have an app and try to create new tab of app will it Create a new instance?>>first of all, depends what Kind of app.>>If i have a uwp app and Activated and multi-instance and open the app again and first Tab, would it create two instances?>>set yourself up as Multi-instance app and way you — like you have a button in App called open a new tab, yeah, if the way you create the new Tab is to call sync on yourself, then that will create new Instance of the app.>>How do i do it without Creating and how does edge do it –>>So question was how does edge do it because edge manages it All in one process. That’s because prior to the Introduction of multi-instance there’s still preexisting Support in windows run time for application to create multiple windows. It is rather complicated and we took a look at apps submitted to Do the store and approximately zero apps took advantage of it, But there’s — you could call create new view and show stand Alone to create multiple windows within a single process in uwp. But the fact that the uptick of the particular functionality is Extremely low led us to say okay, what is the problem Because problem clearly not nobody likes multiple windows. Problem was more clearly creating multiple windows sitoo Hard and one of the pieces of impetus to do multiple Instancing to get it easier.>>Creating a tab control with Frame with navigation states and search tabs and load in new State into that frame. Now, you’re kind of screwing me Up here. So i — if my process — if my App is pretty heavy and take up, you know, gig of ram and Instance two gigs and three gigs of ram and still be able to have Tab experienced and using one process and be able to look back Up project set and wondering if there’s plan to allow me within The one grouping single instance and still use it.>>I understand the question. The answer is api’s for that Shipped back at windows 10rtm and it is just very few people Discovered them and atp creating what you would do is create a New view for the app and each of those views would show up as tab In set and put content in each of the views and have them represent tabs.>>In the mail app you saw popped out mail window wasn’t New instance — in the mail app and heard from you that for a Lot of apps in the store for uwp, really only reason i would Create another view is create sort of instance the same window And it is a lot of work, so i don’t do it and multi-instance If that’s what you’re trying to do, provides super cheap way to Provide multiple instances of the same window and happen to be On separate processes.>>Got it. Great.>>Thank you.>>Hi, so my first question is from user side of view. When multitask i’m working on something and i have three Monitors and i obviously want my windows to be side by side to See all of them. Is it possible to make separate Windows part of the same set so it could be opened at the same time?

3 comments on “Developing for Sets on Windows 10 : Build 2018

  1. My problem with the idea of sets is that I may want to have windows side by side and still a part of the set. I like the idea of desktops more than sets and would rather have desktops saved. Multi-monitor desktops are even better but windows has a problem now in that I cannot move a window from one desktop to another desktop on a different monitor.

Leave a Reply

Your email address will not be published. Required fields are marked *