Skip to content

Commit 543b6af

Browse files
committed
Windows 10 RTM Release - March 2016 Update 3
2 parents e13cf5d + a31928c commit 543b6af

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+2379
-1252
lines changed

Samples/BasicSuspension/cs/BasicSuspension.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<AssemblyName>BasicSuspension</AssemblyName>
1212
<DefaultLanguage>en-US</DefaultLanguage>
1313
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
14-
<TargetPlatformVersion>10.0.10240.0</TargetPlatformVersion>
14+
<TargetPlatformVersion>10.0.10586.0</TargetPlatformVersion>
1515
<TargetPlatformMinVersion>10.0.10240.0</TargetPlatformMinVersion>
1616
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
1717
<EnableDotNetNativeCompatibleProfile>true</EnableDotNetNativeCompatibleProfile>

Samples/BasicSuspension/cs/Package.appxmanifest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<Logo>Assets\StoreLogo-sdk.png</Logo>
1414
</Properties>
1515
<Dependencies>
16-
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.10240.0" MaxVersionTested="10.0.10240.0"/>
16+
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.10240.0" MaxVersionTested="10.0.10586.0"/>
1717
</Dependencies>
1818
<Resources>
1919
<Resource Language="x-generate"/>

Samples/FileAccess/cpp/SampleConfiguration.cpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,13 @@ void MainPage::Initialize()
3434

3535
void MainPage::ValidateFile()
3636
{
37-
3837
create_task(KnownFolders::GetFolderForUserAsync(nullptr /* current user */, KnownFolderId::PicturesLibrary)).then([this](StorageFolder^ picturesFolder)
3938
{
40-
return picturesFolder->GetFileAsync(Filename);
41-
}).then([this](task<StorageFile^> getFileTask)
39+
return picturesFolder->TryGetItemAsync(Filename);
40+
}).then([this](IStorageItem^ item)
4241
{
43-
try
44-
{
45-
sampleFile = getFileTask.get();
46-
}
47-
catch (Exception^)
42+
sampleFile = safe_cast<StorageFile^>(item);
43+
if (item == nullptr)
4844
{
4945
// If file doesn't exist, indicate users to use scenario 1
5046
NotifyUserFileNotExist();

Samples/FileAccess/cs/SampleConfiguration.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,9 @@ public partial class MainPage : Page
4646
/// </summary>
4747
internal async void ValidateFile()
4848
{
49-
try
50-
{
51-
StorageFolder picturesLibrary = await KnownFolders.GetFolderForUserAsync(null /* current user */, KnownFolderId.PicturesLibrary);
52-
sampleFile = await picturesLibrary.GetFileAsync(filename);
53-
}
54-
catch (FileNotFoundException)
49+
StorageFolder picturesLibrary = await KnownFolders.GetFolderForUserAsync(null /* current user */, KnownFolderId.PicturesLibrary);
50+
sampleFile = (StorageFile)await picturesLibrary.TryGetItemAsync(filename);
51+
if (sampleFile == null)
5552
{
5653
// If file doesn't exist, indicate users to use scenario 1
5754
NotifyUserFileNotExist();

Samples/FileAccess/js/js/sample-configuration.js

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,14 @@
2424

2525
function validateFileExistence() {
2626
Windows.Storage.KnownFolders.getFolderForUserAsync(null /* current user */, Windows.Storage.KnownFolderId.picturesLibrary).then(function (picturesLibrary) {
27-
return picturesLibrary.getFileAsync("sample.dat");
28-
}).done(
29-
function (file) {
30-
// If file exists.
31-
SdkSample.sampleFile = file;
32-
},
33-
function (err) {
27+
return picturesLibrary.tryGetItemAsync("sample.dat");
28+
}).done(function (item) {
29+
SdkSample.sampleFile = item;
30+
if (!item) {
3431
// If file doesn't exist, indicate users to use scenario 1.
35-
SdkSample.sampleFile = null;
3632
WinJS.log && WinJS.log("The file 'sample.dat' does not exist. Use scenario one to create this file.", "sample", "error");
3733
}
38-
);
34+
});
3935
};
4036

4137
WinJS.Namespace.define("SdkSample", {

Samples/XamlNavigation/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Specifically, this sample shows how to:
1111

1212
- **Utilize a SplitView control:** The SplitView is a control with two content areas: the Pane and the Content. The Pane can be opened or closed. Using the DisplayMode property the app can switch the Pane to Overlay the Content or appear Inline. When the available space is constrained the Pane can be put into a CompactOverlay or CompactInline mode where it provides a visual hint to the user.
1313
- **Customize a ListView to present menu items with a single-selection experience:** This uses a ListView to present the default visuals for the menu items and customizes the keyboarding behavior to provide a single selection model where up/down/tab/shift+tab moves through each item and 'Enter' and 'Space' select the item.
14+
- **Position the CommandBar based on the screen size:** This sample moves the CommandBar to the bottom on screens less than seven inches diagonal.
1415

1516
**Note** The Windows universal samples require Visual Studio 2015 to build and Windows 10 to execute.
1617

@@ -34,11 +35,11 @@ To obtain information about Microsoft Visual Studio 2015 and the tools for devel
3435

3536
## System requirements
3637

37-
**Client:** Windows 10
38+
**Client:** Windows 10 Version 1511
3839

3940
**Server:** Windows Server 2016 Technical Preview
4041

41-
**Phone:** Windows 10
42+
**Phone:** Windows 10 Version 1511
4243

4344
## Build the sample
4445

Samples/XamlNavigation/cpp/App.xaml.cpp

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ using namespace Windows::ApplicationModel;
1414
using namespace Windows::ApplicationModel::Activation;
1515
using namespace Windows::Foundation;
1616
using namespace Windows::Foundation::Collections;
17+
using namespace Windows::UI;
18+
using namespace Windows::UI::ViewManagement;
1719
using namespace Windows::UI::Xaml;
1820
using namespace Windows::UI::Xaml::Controls;
1921
using namespace Windows::UI::Xaml::Controls::Primitives;
@@ -50,6 +52,18 @@ void App::OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEvent
5052
}
5153
#endif
5254

55+
// Change minimum window size
56+
ApplicationView::GetForCurrentView()->SetPreferredMinSize(Size(320, 200));
57+
58+
// Darken the window title bar using a color value to match app theme
59+
ApplicationViewTitleBar^ titleBar = ApplicationView::GetForCurrentView()->TitleBar;
60+
if (titleBar != nullptr)
61+
{
62+
Color color = safe_cast<Color>(this->Resources->Lookup(L"SystemChromeMediumColor"));
63+
titleBar->BackgroundColor = color;
64+
titleBar->ButtonBackgroundColor = color;
65+
}
66+
5367
auto shell = dynamic_cast<AppShell^>(Window::Current->Content);
5468

5569
// Do not repeat app initialization when the Window already has content,
@@ -75,7 +89,7 @@ void App::OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEvent
7589
if (shell->AppFrame->Content == nullptr)
7690
{
7791
// When the navigation stack isn't restored navigate to the first page,
78-
// suppressing the initial entrance animation and configuring the new
92+
// suppressing the initial entrance animation and configuring the new
7993
// page by passing required information as a navigation parameter
8094
shell->AppFrame->Navigate(TypeName(Views::LandingPage::typeid), e->Arguments, ref new Windows::UI::Xaml::Media::Animation::SuppressNavigationTransitionInfo());
8195
}

Samples/XamlNavigation/cpp/AppShell.xaml.cpp

Lines changed: 45 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ namespace NavigationMenuSample
191191
auto container = (ListViewItem^)NavMenuList->ContainerFromItem(item);
192192

193193
// While updating the selection state of the item prevent it from taking keyboard focus. If a
194-
// user is invoking the back button via the keyboard causing the selected nav menu item to change
194+
// user is invoking the back button via the keyboard causing the selected nav menu item to change
195195
// then focus will remain on the back button.
196196
if (container != nullptr) container->IsTabStop = false;
197197
NavMenuList->SetSelectedItem(container);
@@ -209,11 +209,9 @@ namespace NavigationMenuSample
209209
control->Loaded += ref new RoutedEventHandler(this, &AppShell::Page_Loaded);
210210
}
211211

212-
// Update the Back button depending on whether we can go Back.
212+
// Show the Back button
213213
SystemNavigationManager::GetForCurrentView()->AppViewBackButtonVisibility =
214-
AppFrame->CanGoBack ?
215-
Windows::UI::Core::AppViewBackButtonVisibility::Visible :
216-
Windows::UI::Core::AppViewBackButtonVisibility::Collapsed;
214+
Windows::UI::Core::AppViewBackButtonVisibility::Visible;
217215
}
218216

219217
void AppShell::Page_Loaded(Object^ sender, RoutedEventArgs^ e)
@@ -223,24 +221,56 @@ namespace NavigationMenuSample
223221
}
224222

225223
/// <summary>
226-
/// Callback when the SplitView's Pane is toggled open or close. When the Pane is not visible
227-
/// then the floating hamburger may be occluding other content in the app unless it is aware.
224+
/// Public method to allow pages to open SplitView's pane.
225+
/// Used for custom app shortcuts like navigating left from page's left-most item
226+
/// </summary>
227+
void AppShell::OpenNavePane()
228+
{
229+
TogglePaneButton->IsChecked = true;
230+
NavPaneDivider->Visibility = Windows::UI::Xaml::Visibility::Visible;
231+
}
232+
233+
// <summary>
234+
/// Hide divider when nav pane is closed.
235+
/// </summary>
236+
/// <param name="sender"></param>
237+
/// <param name="args"></param>
238+
void AppShell::RootSplitView_PaneClosed(SplitView^ sender, Object^ args)
239+
{
240+
NavPaneDivider->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
241+
}
242+
243+
/// <summary>
244+
/// Callback when the SplitView's Pane is toggled opened.
245+
/// Restores divider's visibility and ensures that margins around the floating hamburger are correctly set.
228246
/// </summary>
229247
/// <param name="sender"></param>
230248
/// <param name="e"></param>
231249
void AppShell::TogglePaneButton_Checked(Object^ sender, RoutedEventArgs^ e)
250+
{
251+
NavPaneDivider->Visibility = Windows::UI::Xaml::Visibility::Visible;
252+
CheckTogglePaneButtonSizeChanged();
253+
}
254+
255+
/// <summary>
256+
/// Callback when the SplitView's Pane is toggled closed. When the Pane is not visible
257+
/// then the floating hamburger may be occluding other content in the app unless it is aware.
258+
/// </summary>
259+
/// <param name="sender"></param>
260+
/// <param name="e"></param>
261+
void AppShell::TogglePaneButton_Unchecked(Object^ sender, RoutedEventArgs^ e)
232262
{
233263
CheckTogglePaneButtonSizeChanged();
234264
}
235265

236-
/// <summary>
237-
/// Ensure that we update the reported size of the TogglePaneButton when the SplitView's
238-
/// DisplayMode changes.
239-
/// </summary>
240-
void AppShell::RootSplitViewDisplayModeChangedCallback(DependencyObject^ sender, DependencyProperty^ dp)
241-
{
242-
CheckTogglePaneButtonSizeChanged();
243-
}
266+
/// <summary>
267+
/// Ensure that we update the reported size of the TogglePaneButton when the SplitView's
268+
/// DisplayMode changes.
269+
/// </summary>
270+
void AppShell::RootSplitViewDisplayModeChangedCallback(DependencyObject^ sender, DependencyProperty^ dp)
271+
{
272+
CheckTogglePaneButtonSizeChanged();
273+
}
244274

245275
/// <summary>
246276
/// Check for the conditions where the navigation pane does not occupy the space under the floating

Samples/XamlNavigation/cpp/AppShell.xaml.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ namespace NavigationMenuSample
3232
{
3333
Windows::UI::Xaml::Controls::Frame^ get();
3434
}
35+
void OpenNavePane();
3536

3637
internal:
3738
/// <summary>
@@ -62,9 +63,11 @@ namespace NavigationMenuSample
6263
void OnNavigatingToPage(Object^ sender, NavigatingCancelEventArgs^ e);
6364
void OnNavigatedToPage(Object^ sender, NavigationEventArgs^ e);
6465
void Page_Loaded(Object^ sender, RoutedEventArgs^ e);
66+
void RootSplitView_PaneClosed(SplitView^ sender, Object^ args);
6567
void TogglePaneButton_Checked(Object^ sender, RoutedEventArgs^ e);
68+
void TogglePaneButton_Unchecked(Object^ sender, RoutedEventArgs^ e);
6669
void CheckTogglePaneButtonSizeChanged();
67-
void RootSplitViewDisplayModeChangedCallback(DependencyObject^ sender, DependencyProperty^ dp);
70+
void RootSplitViewDisplayModeChangedCallback(DependencyObject^ sender, DependencyProperty^ dp);
6871
void NavMenuItemContainerContentChanging(ListViewBase^ sender, ContainerContentChangingEventArgs^ args);
6972

7073
Vector<NavMenuItem^>^ navlist;

Samples/XamlNavigation/cpp/BasicPage.xaml

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)