diff options
| author | David Spruill <[email protected]> | 2026-01-08 17:51:47 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-01-08 17:51:47 -0500 |
| commit | c5fc3ca1fd0e00a7e085ef48abfeff9c0c39817e (patch) | |
| tree | 0e650a0fee8027816bbea82ca1fd9b8e3e6ee24a /general/WinHEC 2017 Lab/Toaster Support App/SharedContent | |
| parent | f88e4fbbd4d2671e5cd77e4f60be7a235326797e (diff) | |
| parent | ed3dbe56378117a15105099870f2397671ad99ab (diff) | |
Merge branch 'develop' into user/daspr/kmodsamplefix
Diffstat (limited to 'general/WinHEC 2017 Lab/Toaster Support App/SharedContent')
18 files changed, 0 insertions, 1084 deletions
diff --git a/general/WinHEC 2017 Lab/Toaster Support App/SharedContent/cpp/App.xaml.cpp b/general/WinHEC 2017 Lab/Toaster Support App/SharedContent/cpp/App.xaml.cpp deleted file mode 100644 index 1abebcb3..00000000 --- a/general/WinHEC 2017 Lab/Toaster Support App/SharedContent/cpp/App.xaml.cpp +++ /dev/null @@ -1,134 +0,0 @@ -//********************************************************* -// -// Copyright (c) Microsoft. All rights reserved. -// This code is licensed under the MIT License (MIT). -// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF -// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY -// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR -// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT. -// -//********************************************************* - -#include "pch.h" -#include "MainPage.xaml.h" - -using namespace SDKTemplate; - -using namespace Platform; -using namespace Windows::ApplicationModel; -using namespace Windows::ApplicationModel::Activation; -using namespace Windows::Foundation; -using namespace Windows::Foundation::Collections; -using namespace Windows::UI::Xaml; -using namespace Windows::UI::Xaml::Controls; -using namespace Windows::UI::Xaml::Controls::Primitives; -using namespace Windows::UI::Xaml::Data; -using namespace Windows::UI::Xaml::Input; -using namespace Windows::UI::Xaml::Interop; -using namespace Windows::UI::Xaml::Media; -using namespace Windows::UI::Xaml::Navigation; - -// The Blank Application template is documented at http://go.microsoft.com/fwlink/?LinkId=402347&clcid=0x409 - -// These placeholder functions are used if the sample does not -// implement the corresponding methods. This allows us to simulate -// C# partial methods in C++. - -static void Partial_Construct() { } - -/// <summary> -/// Initializes the singleton application object. This is the first line of authored code -/// executed, and as such is the logical equivalent of main() or WinMain(). -/// </summary> -App::App() -{ - InitializeComponent(); - Partial_Construct(); - Suspending += ref new Windows::UI::Xaml::SuspendingEventHandler(this, &SDKTemplate::App::OnSuspending); -} - -/// <summary> -/// Invoked when the application is launched normally by the end user. Other entry points -/// will be used such as when the application is launched to open a specific file. -/// </summary> -/// <param name="e">Details about the launch request and process.</param> -void App::OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs^ e) -{ -#if _DEBUG - // Show graphics profiling information while debugging. - if (IsDebuggerPresent()) - { - // Display the current frame rate counters - DebugSettings->EnableFrameRateCounter = false; - } -#endif - - auto rootFrame = dynamic_cast<Frame^>(Window::Current->Content); - - // Do not repeat app initialization when the Window already has content, - // just ensure that the window is active - if (rootFrame == nullptr) - { - // Create a Frame to act as the navigation context and associate it with - // a SuspensionManager key - rootFrame = ref new Frame(); - - // Set the default language - rootFrame->Language = Windows::Globalization::ApplicationLanguages::Languages->GetAt(0); - - rootFrame->NavigationFailed += ref new Windows::UI::Xaml::Navigation::NavigationFailedEventHandler(this, &App::OnNavigationFailed); - - if (e->PreviousExecutionState == ApplicationExecutionState::Terminated) - { - // TODO: Restore the saved session state only when appropriate, scheduling the - // final launch steps after the restore is complete - } - - if (rootFrame->Content == nullptr) - { - // When the navigation stack isn't restored navigate to the first page, - // configuring the new page by passing required information as a navigation - // parameter - rootFrame->Navigate(TypeName(MainPage::typeid), e->Arguments); - } - // Place the frame in the current Window - Window::Current->Content = rootFrame; - // Ensure the current window is active - Window::Current->Activate(); - } - else - { - if (rootFrame->Content == nullptr) - { - // When the navigation stack isn't restored navigate to the first page, - // configuring the new page by passing required information as a navigation - // parameter - rootFrame->Navigate(TypeName(MainPage::typeid), e->Arguments); - } - // Ensure the current window is active - Window::Current->Activate(); - } -} - -/// <summary> -/// Invoked when application execution is being suspended. Application state is saved -/// without knowing whether the application will be terminated or resumed with the contents -/// of memory still intact. -/// </summary> -/// <param name="sender">The source of the suspend request.</param> -/// <param name="e">Details about the suspend request.</param> -void App::OnSuspending(Object^ /* sender */, SuspendingEventArgs^ /* e */) -{ - //TODO: Save application state and stop any background activity -} - - -/// <summary> -/// Invoked when Navigation to a certain page fails -/// </summary> -/// <param name="sender">The Frame which failed navigation</param> -/// <param name="e">Details about the navigation failure</param> -void App::OnNavigationFailed(Platform::Object ^sender, Windows::UI::Xaml::Navigation::NavigationFailedEventArgs ^e) -{ - throw ref new FailureException("Failed to load Page " + e->SourcePageType.Name); -}
\ No newline at end of file diff --git a/general/WinHEC 2017 Lab/Toaster Support App/SharedContent/cpp/App.xaml.h b/general/WinHEC 2017 Lab/Toaster Support App/SharedContent/cpp/App.xaml.h deleted file mode 100644 index e7bd715a..00000000 --- a/general/WinHEC 2017 Lab/Toaster Support App/SharedContent/cpp/App.xaml.h +++ /dev/null @@ -1,33 +0,0 @@ -//********************************************************* -// -// Copyright (c) Microsoft. All rights reserved. -// This code is licensed under the MIT License (MIT). -// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF -// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY -// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR -// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT. -// -//********************************************************* - -#pragma once - -#include "App.g.h" - -namespace SDKTemplate -{ - /// <summary> - /// Provides application-specific behavior to supplement the default Application class. - /// </summary> - ref class App sealed - { - protected: - virtual void OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs^ e) override; - - internal: - App(); - - private: - void OnSuspending(Platform::Object^ sender, Windows::ApplicationModel::SuspendingEventArgs^ e); - void OnNavigationFailed(Platform::Object ^sender, Windows::UI::Xaml::Navigation::NavigationFailedEventArgs ^e); - }; -} diff --git a/general/WinHEC 2017 Lab/Toaster Support App/SharedContent/cpp/DeviceHelpers.h b/general/WinHEC 2017 Lab/Toaster Support App/SharedContent/cpp/DeviceHelpers.h deleted file mode 100644 index c2fa82b2..00000000 --- a/general/WinHEC 2017 Lab/Toaster Support App/SharedContent/cpp/DeviceHelpers.h +++ /dev/null @@ -1,67 +0,0 @@ -//********************************************************* -// -// Copyright (c) Microsoft. All rights reserved. -// This code is licensed under the MIT License (MIT). -// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF -// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY -// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR -// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT. -// -//********************************************************* - -#pragma once - -namespace SDKTemplate -{ - namespace DeviceHelpers - { - // We use a DeviceWatcher instead of DeviceInformation.FindAllAsync because - // the DeviceWatcher will let us see the devices as they are discovered, - // whereas FindAllAsync returns results only after discovery is complete. - // - // The convertAsync functional is passed a device ID (Platform::String^) and returns a - // Concurrency::task<Something^>. - template<typename Converter> - auto GetFirstDeviceAsync(Platform::String^ selector, Converter convertAsync) - -> decltype(convertAsync(nullptr)) - { - using T = typename decltype(convertAsync(nullptr))::result_type; - Concurrency::task_completion_event<T> completionEvent; - auto pendingTasks = std::make_shared<std::vector<Concurrency::task<void>>>(); - Windows::Devices::Enumeration::DeviceWatcher^ watcher = Windows::Devices::Enumeration::DeviceInformation::CreateWatcher(selector); - - watcher->Added += ref new Windows::Foundation::TypedEventHandler<Windows::Devices::Enumeration::DeviceWatcher^, Windows::Devices::Enumeration::DeviceInformation^>( - [completionEvent, pendingTasks, convertAsync](Windows::Devices::Enumeration::DeviceWatcher^ sender, Windows::Devices::Enumeration::DeviceInformation^ device) - { - auto task = convertAsync(device->Id).then([completionEvent](T t) - { - if (t != nullptr) - { - completionEvent.set(t); - } - }); - pendingTasks->push_back(task); - }); - - watcher->EnumerationCompleted += ref new Windows::Foundation::TypedEventHandler<Windows::Devices::Enumeration::DeviceWatcher^, Platform::Object^>( - [completionEvent, pendingTasks](Windows::Devices::Enumeration::DeviceWatcher^ sender, Platform::Object^ args) - { - // Wait for completion of all the tasks we created in our "Added" event handler. - Concurrency::when_all(pendingTasks->begin(), pendingTasks->end()).then([completionEvent]() - { - // This sets the result to "nullptr" if no task was able to produce a device. - completionEvent.set(nullptr); - }); - }); - - watcher->Start(); - - // Wait for enumeration to complete or for a device to be found, whichever comes first. - return Concurrency::create_task(completionEvent).then([watcher](T result) - { - watcher->Stop(); - return result; - }); - } - } -} diff --git a/general/WinHEC 2017 Lab/Toaster Support App/SharedContent/cpp/MainPage.xaml b/general/WinHEC 2017 Lab/Toaster Support App/SharedContent/cpp/MainPage.xaml deleted file mode 100644 index 5179f520..00000000 --- a/general/WinHEC 2017 Lab/Toaster Support App/SharedContent/cpp/MainPage.xaml +++ /dev/null @@ -1,80 +0,0 @@ -<!-- -//********************************************************* -// -// Copyright (c) Microsoft. All rights reserved. -// This code is licensed under the MIT License (MIT). -// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF -// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY -// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR -// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT. -// -//********************************************************* ---> - -<Page - x:Class="SDKTemplate.MainPage" - xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" - xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:local="using:SDKTemplate" - xmlns:d="http://schemas.microsoft.com/expression/blend/2008" - xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" - mc:Ignorable="d"> - - <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> - <Grid.RowDefinitions> - <RowDefinition Height="Auto"/> - <RowDefinition Height="*"/> - </Grid.RowDefinitions> - <SplitView x:Name="Splitter" IsPaneOpen="True" Grid.Row="1" DisplayMode="Inline"> - <SplitView.Pane> - <RelativePanel Margin="10,0,0,0"> - <TextBlock x:Name="SampleTitle" Text="Sample Title Here" Style="{StaticResource SampleHeaderTextStyle}" TextWrapping="Wrap" Margin="0,10,0,0"/> - <ListBox x:Name="ScenarioControl" SelectionChanged="ScenarioControl_SelectionChanged" - SelectionMode="Single" HorizontalAlignment="Left" Background="Transparent" BorderThickness="0" - VerticalAlignment="Top" RelativePanel.Below="SampleTitle" Margin="0,10,0,0" RelativePanel.Above="FooterPanel"> - <ListBox.ItemTemplate> - <DataTemplate> - <TextBlock Text="{Binding Converter={StaticResource ScenarioConverter}}"/> - </DataTemplate> - </ListBox.ItemTemplate> - </ListBox> - <StackPanel x:Name="FooterPanel" Orientation="Vertical" RelativePanel.AlignBottomWithPanel="True"> - <Image Source="Assets/microsoft-sdk.png" AutomationProperties.Name="Microsoft Logo" Stretch="None" HorizontalAlignment="Left" Margin="10,0,0,0"/> - <TextBlock x:Name="Copyright" Text="© Microsoft Corporation. All rights reserved." Style="{StaticResource CopyrightTextStyle}" - RelativePanel.Above="LinksPanel" Margin="10,10,0,0" - TextWrapping="Wrap"/> - <StackPanel x:Name="LinksPanel" Orientation="Horizontal" Margin="10,10,0,10"> - <HyperlinkButton Content="Trademarks" Tag="http://go.microsoft.com/fwlink/?LinkID=623755" - Click="Footer_Click" FontSize="12" Style="{StaticResource HyperlinkStyle}" /> - <TextBlock Text="|" Style="{StaticResource SeparatorStyle}" VerticalAlignment="Center" /> - <HyperlinkButton x:Name="PrivacyLink" Content="Privacy" Tag="http://privacy.microsoft.com" Click="Footer_Click" FontSize="12" Style="{StaticResource HyperlinkStyle}"/> - </StackPanel> - </StackPanel> - </RelativePanel> - </SplitView.Pane> - <RelativePanel> - <Frame x:Name="ScenarioFrame" Margin="0,5,0,0" RelativePanel.AlignTopWithPanel="True" RelativePanel.Above="StatusPanel" RelativePanel.AlignRightWithPanel="True" RelativePanel.AlignLeftWithPanel="True"/> - <StackPanel x:Name="StatusPanel" Orientation="Vertical" RelativePanel.AlignBottomWithPanel="True" RelativePanel.AlignRightWithPanel="True" RelativePanel.AlignLeftWithPanel="True"> - <TextBlock x:Name="StatusLabel" Margin="0,0,0,10" TextWrapping="Wrap" Text="Status:" /> - <Border x:Name="StatusBorder" Margin="0,0,0,0" Visibility="Visible" > - <ScrollViewer VerticalScrollMode="Auto" VerticalScrollBarVisibility="Auto" MaxHeight="200"> - <TextBlock x:Name="StatusBlock" FontWeight="Bold" - MaxWidth="{Binding ElementName=Splitter, Path=ActualWidth}" Margin="10,10,10,20" TextWrapping="Wrap" /> - </ScrollViewer> - </Border> - </StackPanel> - </RelativePanel> - </SplitView> - <StackPanel x:Name="HeaderPanel" Orientation="Horizontal"> - <Border Background="{ThemeResource SystemControlBackgroundChromeMediumBrush}" Grid.Row="0"> - <ToggleButton Style="{StaticResource SymbolButton}" Click="Button_Click" VerticalAlignment="Top" Foreground="{ThemeResource ApplicationForegroundThemeBrush}"> - <ToggleButton.Content> - <FontIcon x:Name="Hamburger" FontFamily="Segoe MDL2 Assets" Glyph="" Margin="0,10,0,0"/> - </ToggleButton.Content> - </ToggleButton> - </Border> - <Image x:Name="WindowsLogo" Stretch="None" Source="Assets/windows-sdk.png" Margin="0,15,0,0" /> - <TextBlock x:Name="Header" Text="Universal Windows Platform sample" Style="{StaticResource TagLineTextStyle}" Margin="0,15,0,0" /> - </StackPanel> - </Grid> -</Page> diff --git a/general/WinHEC 2017 Lab/Toaster Support App/SharedContent/cpp/MainPage.xaml.cpp b/general/WinHEC 2017 Lab/Toaster Support App/SharedContent/cpp/MainPage.xaml.cpp deleted file mode 100644 index 24c12f68..00000000 --- a/general/WinHEC 2017 Lab/Toaster Support App/SharedContent/cpp/MainPage.xaml.cpp +++ /dev/null @@ -1,154 +0,0 @@ -//********************************************************* -// -// Copyright (c) Microsoft. All rights reserved. -// This code is licensed under the MIT License (MIT). -// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF -// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY -// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR -// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT. -// -//********************************************************* - -#include "pch.h" -#include "MainPage.xaml.h" - -using namespace SDKTemplate; -using namespace Platform; -using namespace Windows::Foundation; -using namespace Windows::Foundation::Collections; -using namespace Windows::UI::Core; -using namespace Windows::UI::Xaml; -using namespace Windows::UI::Xaml::Controls; -using namespace Windows::UI::Xaml::Controls::Primitives; -using namespace Windows::UI::Xaml::Data; -using namespace Windows::UI::Xaml::Input; -using namespace Windows::UI::Xaml::Media; -using namespace Windows::UI::Xaml::Navigation; -using namespace Windows::UI::Xaml::Interop; - -// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409 - -MainPage^ MainPage::Current = nullptr; - -MainPage::MainPage() -{ - InitializeComponent(); - SampleTitle->Text = FEATURE_NAME; - - // This is a static public property that allows downstream pages to get a handle to the MainPage instance - // in order to call methods that are in this class. - MainPage::Current = this; -} - -void MainPage::OnNavigatedTo(NavigationEventArgs^ e) -{ - // Populate the ListBox with the scenarios as defined in SampleConfiguration.cpp. - auto itemCollection = ref new Platform::Collections::Vector<Object^>(); - int i = 1; - for (auto const& s : MainPage::Current->scenarios) - { - // Create a textBlock to hold the content and apply the ListItemTextStyle from Styles.xaml - TextBlock^ textBlock = ref new TextBlock(); - ListBoxItem^ item = ref new ListBoxItem(); - auto style = App::Current->Resources->Lookup("ListItemTextStyle"); - - textBlock->Text = (i++).ToString() + ") " + s.Title; - textBlock->Style = safe_cast<Windows::UI::Xaml::Style ^>(style); - - item->Name = s.ClassName; - item->Content = textBlock; - itemCollection->Append(item); - } - - // Set the newly created itemCollection as the ListBox ItemSource. - ScenarioControl->ItemsSource = itemCollection; - int startingScenarioIndex; - - if (Window::Current->Bounds.Width < 640) - { - startingScenarioIndex = -1; - } - else - { - startingScenarioIndex = 0; - } - - ScenarioControl->SelectedIndex = startingScenarioIndex; - ScenarioControl->ScrollIntoView(ScenarioControl->SelectedItem); -} - - -void MainPage::ScenarioControl_SelectionChanged(Object^ sender, SelectionChangedEventArgs^ e) -{ - ListBox^ scenarioListBox = safe_cast<ListBox^>(sender); //as ListBox; - ListBoxItem^ item = dynamic_cast<ListBoxItem^>(scenarioListBox->SelectedItem); - if (item != nullptr) - { - // Clear the status block when changing scenarios - NotifyUser("", NotifyType::StatusMessage); - - // Navigate to the selected scenario. - TypeName scenarioType = { item->Name, TypeKind::Custom }; - ScenarioFrame->Navigate(scenarioType, this); - - if (Window::Current->Bounds.Width < 640) - { - Splitter->IsPaneOpen = false; - } - } -} - -void MainPage::NotifyUser(String^ strMessage, NotifyType type) -{ - if (Dispatcher->HasThreadAccess) - { - UpdateStatus(strMessage, type); - } - else - { - Dispatcher->RunAsync(CoreDispatcherPriority::Normal, ref new DispatchedHandler([strMessage, type, this]() - { - UpdateStatus(strMessage, type); - })); - } -} - -void MainPage::UpdateStatus(String^ strMessage, NotifyType type) -{ - switch (type) - { - case NotifyType::StatusMessage: - StatusBorder->Background = ref new SolidColorBrush(Windows::UI::Colors::Green); - break; - case NotifyType::ErrorMessage: - StatusBorder->Background = ref new SolidColorBrush(Windows::UI::Colors::Red); - break; - default: - break; - } - - StatusBlock->Text = strMessage; - - // Collapse the StatusBlock if it has no text to conserve real estate. - if (StatusBlock->Text != "") - { - StatusBorder->Visibility = Windows::UI::Xaml::Visibility::Visible; - StatusPanel->Visibility = Windows::UI::Xaml::Visibility::Visible; - } - else - { - StatusBorder->Visibility = Windows::UI::Xaml::Visibility::Collapsed; - StatusPanel->Visibility = Windows::UI::Xaml::Visibility::Collapsed; - } -} - -void MainPage::Footer_Click(Object^ sender, RoutedEventArgs^ e) -{ - auto uri = ref new Uri((String^)((HyperlinkButton^)sender)->Tag); - Windows::System::Launcher::LaunchUriAsync(uri); -} - -void MainPage::Button_Click(Object^ sender, RoutedEventArgs^ e) -{ - Splitter->IsPaneOpen = !Splitter->IsPaneOpen; -}
\ No newline at end of file diff --git a/general/WinHEC 2017 Lab/Toaster Support App/SharedContent/cpp/MainPage.xaml.h b/general/WinHEC 2017 Lab/Toaster Support App/SharedContent/cpp/MainPage.xaml.h deleted file mode 100644 index e87e24f0..00000000 --- a/general/WinHEC 2017 Lab/Toaster Support App/SharedContent/cpp/MainPage.xaml.h +++ /dev/null @@ -1,46 +0,0 @@ -//********************************************************* -// -// Copyright (c) Microsoft. All rights reserved. -// This code is licensed under the MIT License (MIT). -// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF -// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY -// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR -// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT. -// -//********************************************************* - -#pragma once - -#include "MainPage.g.h" -#include "SampleConfiguration.h" - -namespace SDKTemplate -{ - public enum class NotifyType - { - StatusMessage, - ErrorMessage - }; - - /// <summary> - /// An empty page that can be used on its own or navigated to within a Frame. - /// </summary> - public ref class MainPage sealed - { - public: - MainPage(); - - protected: - virtual void OnNavigatedTo(Windows::UI::Xaml::Navigation::NavigationEventArgs^ e) override; - - private: - void ScenarioControl_SelectionChanged(Platform::Object^ sender, Windows::UI::Xaml::Controls::SelectionChangedEventArgs^ e); - void Footer_Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e); - void Button_Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e); - void UpdateStatus(Platform::String^ strMessage, NotifyType type); - - internal: - static MainPage^ Current; - void NotifyUser(Platform::String^ strMessage, NotifyType type); - }; -} diff --git a/general/WinHEC 2017 Lab/Toaster Support App/SharedContent/media/Square310x310Logo.png b/general/WinHEC 2017 Lab/Toaster Support App/SharedContent/media/Square310x310Logo.png Binary files differdeleted file mode 100644 index c96f294a..00000000 --- a/general/WinHEC 2017 Lab/Toaster Support App/SharedContent/media/Square310x310Logo.png +++ /dev/null diff --git a/general/WinHEC 2017 Lab/Toaster Support App/SharedContent/media/microsoft-sdk.png b/general/WinHEC 2017 Lab/Toaster Support App/SharedContent/media/microsoft-sdk.png Binary files differdeleted file mode 100644 index 380a0102..00000000 --- a/general/WinHEC 2017 Lab/Toaster Support App/SharedContent/media/microsoft-sdk.png +++ /dev/null diff --git a/general/WinHEC 2017 Lab/Toaster Support App/SharedContent/media/placeholder-sdk.png b/general/WinHEC 2017 Lab/Toaster Support App/SharedContent/media/placeholder-sdk.png Binary files differdeleted file mode 100644 index 01b3138c..00000000 --- a/general/WinHEC 2017 Lab/Toaster Support App/SharedContent/media/placeholder-sdk.png +++ /dev/null diff --git a/general/WinHEC 2017 Lab/Toaster Support App/SharedContent/media/placeholder.png b/general/WinHEC 2017 Lab/Toaster Support App/SharedContent/media/placeholder.png Binary files differdeleted file mode 100644 index e2d83818..00000000 --- a/general/WinHEC 2017 Lab/Toaster Support App/SharedContent/media/placeholder.png +++ /dev/null diff --git a/general/WinHEC 2017 Lab/Toaster Support App/SharedContent/media/smalltile-sdk.png b/general/WinHEC 2017 Lab/Toaster Support App/SharedContent/media/smalltile-sdk.png Binary files differdeleted file mode 100644 index ba9a0cde..00000000 --- a/general/WinHEC 2017 Lab/Toaster Support App/SharedContent/media/smalltile-sdk.png +++ /dev/null diff --git a/general/WinHEC 2017 Lab/Toaster Support App/SharedContent/media/splash-sdk.png b/general/WinHEC 2017 Lab/Toaster Support App/SharedContent/media/splash-sdk.png Binary files differdeleted file mode 100644 index e00df02c..00000000 --- a/general/WinHEC 2017 Lab/Toaster Support App/SharedContent/media/splash-sdk.png +++ /dev/null diff --git a/general/WinHEC 2017 Lab/Toaster Support App/SharedContent/media/squaretile-sdk.png b/general/WinHEC 2017 Lab/Toaster Support App/SharedContent/media/squaretile-sdk.png Binary files differdeleted file mode 100644 index f97c34a9..00000000 --- a/general/WinHEC 2017 Lab/Toaster Support App/SharedContent/media/squaretile-sdk.png +++ /dev/null diff --git a/general/WinHEC 2017 Lab/Toaster Support App/SharedContent/media/storelogo-sdk.png b/general/WinHEC 2017 Lab/Toaster Support App/SharedContent/media/storelogo-sdk.png Binary files differdeleted file mode 100644 index 5c397dea..00000000 --- a/general/WinHEC 2017 Lab/Toaster Support App/SharedContent/media/storelogo-sdk.png +++ /dev/null diff --git a/general/WinHEC 2017 Lab/Toaster Support App/SharedContent/media/tile-sdk.png b/general/WinHEC 2017 Lab/Toaster Support App/SharedContent/media/tile-sdk.png Binary files differdeleted file mode 100644 index f72683f2..00000000 --- a/general/WinHEC 2017 Lab/Toaster Support App/SharedContent/media/tile-sdk.png +++ /dev/null diff --git a/general/WinHEC 2017 Lab/Toaster Support App/SharedContent/media/windows-sdk.png b/general/WinHEC 2017 Lab/Toaster Support App/SharedContent/media/windows-sdk.png Binary files differdeleted file mode 100644 index 67268021..00000000 --- a/general/WinHEC 2017 Lab/Toaster Support App/SharedContent/media/windows-sdk.png +++ /dev/null diff --git a/general/WinHEC 2017 Lab/Toaster Support App/SharedContent/xaml/App.xaml b/general/WinHEC 2017 Lab/Toaster Support App/SharedContent/xaml/App.xaml deleted file mode 100644 index 63e80b83..00000000 --- a/general/WinHEC 2017 Lab/Toaster Support App/SharedContent/xaml/App.xaml +++ /dev/null @@ -1,34 +0,0 @@ -<!-- -//********************************************************* -// -// Copyright (c) Microsoft. All rights reserved. -// This code is licensed under the MIT License (MIT). -// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF -// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY -// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR -// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT. -// -//********************************************************* ---> -<Application - x:Class="SDKTemplate.App" - xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" - xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:local="using:SDKTemplate" - RequestedTheme="Dark"> - - <Application.Resources> - <!-- Application-specific resources --> - <ResourceDictionary> - <ResourceDictionary.MergedDictionaries> - - <!-- - Styles that define common aspects of the platform look and feel - Required by Visual Studio project and item templates - --> - <ResourceDictionary Source="/Styles/Styles.xaml"/> - </ResourceDictionary.MergedDictionaries> - </ResourceDictionary> - </Application.Resources> - -</Application> diff --git a/general/WinHEC 2017 Lab/Toaster Support App/SharedContent/xaml/Styles.xaml b/general/WinHEC 2017 Lab/Toaster Support App/SharedContent/xaml/Styles.xaml deleted file mode 100644 index 50602ae5..00000000 --- a/general/WinHEC 2017 Lab/Toaster Support App/SharedContent/xaml/Styles.xaml +++ /dev/null @@ -1,536 +0,0 @@ -<!-- -//********************************************************* -// -// Copyright (c) Microsoft. All rights reserved. -// This code is licensed under the MIT License (MIT). -// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF -// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY -// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR -// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT. -// -//********************************************************* ---> -<ResourceDictionary - xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" - xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:local="using:SDKTemplate"> - - <Style x:Key="SymbolButton" TargetType="ToggleButton"> - <Setter Property="FontSize" Value="16" /> - <Setter Property="FontFamily" Value="{StaticResource SymbolThemeFontFamily}" /> - <Setter Property="MinHeight" Value="48" /> - <Setter Property="MinWidth" Value="48" /> - <Setter Property="Margin" Value="0,4,0,0" /> - <Setter Property="Padding" Value="0" /> - <Setter Property="HorizontalAlignment" Value="Left" /> - <Setter Property="VerticalAlignment" Value="Top" /> - <Setter Property="HorizontalContentAlignment" Value="Center" /> - <Setter Property="VerticalContentAlignment" Value="Center" /> - <Setter Property="Background" Value="Transparent" /> - <Setter Property="Foreground" Value="{ThemeResource SystemControlForegroundBaseHighBrush}" /> - <Setter Property="Content" Value="" /> - <Setter Property="AutomationProperties.Name" Value="Menu" /> - <Setter Property="UseSystemFocusVisuals" Value="True" /> - <Setter Property="Template"> - <Setter.Value> - <ControlTemplate TargetType="ToggleButton"> - <Grid x:Name="LayoutRoot" - Background="{TemplateBinding Background}"> - <VisualStateManager.VisualStateGroups> - <VisualStateGroup x:Name="CommonStates"> - <VisualState x:Name="Normal" /> - <VisualState x:Name="PointerOver"> - <Storyboard> - <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="(Grid.Background)"> - <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightListLowBrush}"/> - </ObjectAnimationUsingKeyFrames> - <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground"> - <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightAltBaseHighBrush}"/> - </ObjectAnimationUsingKeyFrames> - </Storyboard> - </VisualState> - <VisualState x:Name="Pressed"> - <Storyboard> - <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="(Grid.Background)"> - <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightListMediumBrush}"/> - </ObjectAnimationUsingKeyFrames> - <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground"> - <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightAltBaseHighBrush}"/> - </ObjectAnimationUsingKeyFrames> - </Storyboard> - </VisualState> - <VisualState x:Name="Disabled"> - <Storyboard> - <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="(TextBlock.Foreground)"> - <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlDisabledBaseLowBrush}"/> - </ObjectAnimationUsingKeyFrames> - </Storyboard> - </VisualState> - <VisualState x:Name="Checked"/> - <VisualState x:Name="CheckedPointerOver"> - <Storyboard> - <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="(Grid.Background)"> - <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightListLowBrush}"/> - </ObjectAnimationUsingKeyFrames> - <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground"> - <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightAltBaseHighBrush}"/> - </ObjectAnimationUsingKeyFrames> - </Storyboard> - </VisualState> - <VisualState x:Name="CheckedPressed"> - <Storyboard> - <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="(Grid.Background)"> - <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightListMediumBrush}"/> - </ObjectAnimationUsingKeyFrames> - <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground"> - <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightAltBaseHighBrush}"/> - </ObjectAnimationUsingKeyFrames> - </Storyboard> - </VisualState> - <VisualState x:Name="CheckedDisabled"> - <Storyboard> - <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="(TextBlock.Foreground)"> - <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlDisabledBaseLowBrush}"/> - </ObjectAnimationUsingKeyFrames> - </Storyboard> - </VisualState> - </VisualStateGroup> - </VisualStateManager.VisualStateGroups> - <ContentPresenter x:Name="ContentPresenter" - Content="{TemplateBinding Content}" - Margin="{TemplateBinding Padding}" - HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" - VerticalAlignment="{TemplateBinding VerticalContentAlignment}" - AutomationProperties.AccessibilityView="Raw" /> - </Grid> - </ControlTemplate> - </Setter.Value> - </Setter> - </Style> - - <Style x:Key="BasicTextStyle" TargetType="TextBlock" BasedOn="{StaticResource BodyTextBlockStyle}"> - <Setter Property="Margin" Value="0,0,0,12"/> - </Style> - - <Style x:Key="TagLineTextStyle" TargetType="TextBlock" BasedOn="{StaticResource BodyTextBlockStyle}"> - </Style> - - <Style x:Key="SampleHeaderTextStyle" TargetType="TextBlock" BasedOn="{StaticResource TitleTextBlockStyle}"> - <Setter Property="FontSize" Value="28"/> - </Style> - - <Style x:Key="ListItemTextStyle" TargetType="TextBlock" BasedOn="{StaticResource SubtitleTextBlockStyle}"> - <Setter Property="FontSize" Value="18"/> - <Setter Property="Margin" Value="10,0,0,0"/> - <Setter Property="Foreground" Value="{StaticResource SystemControlForegroundBaseHighBrush}"/> - </Style> - - <Style x:Key="CopyrightTextStyle" TargetType="TextBlock" BasedOn="{StaticResource BaseTextBlockStyle}"> - <Setter Property="FontWeight" Value="Normal"/> - </Style> - - <Style x:Key="ScenarioHeaderTextStyle" TargetType="TextBlock" BasedOn="{StaticResource TitleTextBlockStyle}"> - </Style> - - <Style x:Key="ScenarioDescriptionTextStyle" TargetType="TextBlock" BasedOn="{StaticResource BodyTextBlockStyle}"> - </Style> - - <Style x:Key="BaseMessageStyle" TargetType="TextBlock" BasedOn="{StaticResource BodyTextBlockStyle}"> - <Setter Property="Margin" Value="0,0,0,5"/> - </Style> - - <Style x:Key="SeparatorStyle" TargetType="TextBlock" BasedOn="{StaticResource BaseTextBlockStyle}"> - <Setter Property="FontSize" Value="9"/> - <Setter Property="Foreground" Value="{ThemeResource SystemControlForegroundBaseMediumBrush}"/> - </Style> - - <Style x:Key="HyperlinkStyle" TargetType="HyperlinkButton"> - <Setter Property="Padding" Value="1"/> - <Setter Property="Foreground" Value="{ThemeResource SystemControlForegroundBaseMediumBrush}"/> - <Setter Property="FontSize" Value="12"/> - </Style> - - <Style x:Key="NavMenuItemContainerStyle" TargetType="ListViewItem"> - <Setter Property="MinWidth" Value="{StaticResource SplitViewCompactPaneThemeLength}"/> - <Setter Property="MinHeight" Value="48"/> - <Setter Property="Padding" Value="0"/> - <Setter Property="UseSystemFocusVisuals" Value="False" /> - <Setter Property="Template"> - <Setter.Value> - <ControlTemplate TargetType="ListViewItem"> - <Grid x:Name="ContentBorder" - HorizontalAlignment="Stretch" - Control.IsTemplateFocusTarget="True" - Background="{TemplateBinding Background}" - BorderBrush="{TemplateBinding BorderBrush}" - BorderThickness="{TemplateBinding BorderThickness}" - RenderTransformOrigin="0.5,0.5"> - <Grid.RenderTransform> - <ScaleTransform x:Name="ContentBorderScale" /> - </Grid.RenderTransform> - <VisualStateManager.VisualStateGroups> - <VisualStateGroup x:Name="CommonStates"> - <VisualState x:Name="Normal"> - <Storyboard> - <PointerUpThemeAnimation Storyboard.TargetName="ContentPresenter" /> - </Storyboard> - </VisualState> - <VisualState x:Name="PointerOver"> - <Storyboard> - <DoubleAnimation Storyboard.TargetName="BorderBackground" - Storyboard.TargetProperty="Opacity" - Duration="0" - To="1"/> - <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderBackground" Storyboard.TargetProperty="Fill"> - <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightListLowBrush}" /> - </ObjectAnimationUsingKeyFrames> - <PointerUpThemeAnimation Storyboard.TargetName="ContentPresenter" /> - </Storyboard> - </VisualState> - <VisualState x:Name="Pressed"> - <Storyboard> - <DoubleAnimation Storyboard.TargetName="BorderBackground" - Storyboard.TargetProperty="Opacity" - Duration="0" - To="1"/> - <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderBackground" Storyboard.TargetProperty="Fill"> - <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightListMediumBrush}" /> - </ObjectAnimationUsingKeyFrames> - <PointerDownThemeAnimation TargetName="ContentPresenter" /> - </Storyboard> - </VisualState> - <VisualState x:Name="Selected"> - <Storyboard> - <DoubleAnimation Storyboard.TargetName="BorderBackground" - Storyboard.TargetProperty="Opacity" - Duration="0" - To="1"/> - <DoubleAnimation Storyboard.TargetName="SelectedPipe" - Storyboard.TargetProperty="Opacity" - Duration="0" - To="1"/> - <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderBackground" Storyboard.TargetProperty="Fill"> - <DiscreteObjectKeyFrame KeyTime="0" Value="Transparent" /> - </ObjectAnimationUsingKeyFrames> - <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground"> - <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlForegroundAccentBrush}" /> - </ObjectAnimationUsingKeyFrames> - <PointerUpThemeAnimation Storyboard.TargetName="ContentPresenter" /> - </Storyboard> - </VisualState> - <VisualState x:Name="PointerOverSelected"> - <Storyboard> - <DoubleAnimation Storyboard.TargetName="BorderBackground" - Storyboard.TargetProperty="Opacity" - Duration="0" - To="1"/> - <DoubleAnimation Storyboard.TargetName="SelectedPipe" - Storyboard.TargetProperty="Opacity" - Duration="0" - To="1"/> - <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderBackground" Storyboard.TargetProperty="Fill"> - <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightListLowBrush}" /> - </ObjectAnimationUsingKeyFrames> - <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground"> - <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlForegroundAccentBrush}" /> - </ObjectAnimationUsingKeyFrames> - <PointerUpThemeAnimation Storyboard.TargetName="ContentPresenter" /> - </Storyboard> - </VisualState> - <VisualState x:Name="PressedSelected"> - <Storyboard> - <DoubleAnimation Storyboard.TargetName="BorderBackground" - Storyboard.TargetProperty="Opacity" - Duration="0" - To="1"/> - <DoubleAnimation Storyboard.TargetName="SelectedPipe" - Storyboard.TargetProperty="Opacity" - Duration="0" - To="1"/> - <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderBackground" Storyboard.TargetProperty="Fill"> - <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightListMediumBrush}" /> - </ObjectAnimationUsingKeyFrames> - <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground"> - <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlForegroundAccentBrush}" /> - </ObjectAnimationUsingKeyFrames> - <PointerDownThemeAnimation TargetName="ContentPresenter" /> - </Storyboard> - </VisualState> - </VisualStateGroup> - <VisualStateGroup x:Name="DisabledStates"> - <VisualState x:Name="Enabled"/> - <VisualState x:Name="Disabled"> - <Storyboard> - <DoubleAnimation Storyboard.TargetName="ContentBorder" - Storyboard.TargetProperty="Opacity" - Duration="0" - To="{ThemeResource ListViewItemDisabledThemeOpacity}"/> - </Storyboard> - </VisualState> - </VisualStateGroup> - <VisualStateGroup x:Name="FocusStates"> - <VisualState x:Name="Unfocused"/> - <VisualState x:Name="Focused"> - <Storyboard> - <ObjectAnimationUsingKeyFrames Storyboard.TargetName="FocusBackground" Storyboard.TargetProperty="Fill"> - <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightListLowBrush}" /> - </ObjectAnimationUsingKeyFrames> - </Storyboard> - </VisualState> - </VisualStateGroup> - </VisualStateManager.VisualStateGroups> - <Rectangle x:Name="BorderBackground" - IsHitTestVisible="False" - Fill="Transparent" - Opacity="1" - Control.IsTemplateFocusTarget="True" /> - <Rectangle x:Name="FocusBackground" - IsHitTestVisible="False" - Fill="Transparent" - Opacity="1" - Control.IsTemplateFocusTarget="True"/> - <Rectangle x:Name="SelectedPipe" - Opacity="0" - Width="4" - Height="24" - Fill="{ThemeResource SystemControlForegroundAccentBrush}" - VerticalAlignment="Center" - HorizontalAlignment="Left"/> - <ContentPresenter x:Name="ContentPresenter" - ContentTransitions="{TemplateBinding ContentTransitions}" - ContentTemplate="{TemplateBinding ContentTemplate}" - Content="{TemplateBinding Content}" - HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" - VerticalAlignment="{TemplateBinding VerticalContentAlignment}" - Margin="16,0,0,0" /> - </Grid> - </ControlTemplate> - </Setter.Value> - </Setter> - </Style> - - <!-- Default style for Windows.UI.Xaml.Controls.ListBoxItem --> - <Style x:Key="ListBoxItemStyle" TargetType="ListBoxItem"> - <Setter Property="Background" Value="Transparent" /> - <Setter Property="TabNavigation" Value="Local" /> - <Setter Property="Padding" Value="8,10" /> - <Setter Property="HorizontalContentAlignment" Value="Left" /> - <Setter Property="Template"> - <Setter.Value> - <ControlTemplate TargetType="ListBoxItem"> - <Border x:Name="LayoutRoot" - Background="{TemplateBinding Background}" - BorderBrush="{TemplateBinding BorderBrush}" - BorderThickness="{TemplateBinding BorderThickness}"> - <VisualStateManager.VisualStateGroups> - <VisualStateGroup x:Name="CommonStates"> - <VisualState x:Name="Normal" /> - <VisualState x:Name="PointerOver"> - <Storyboard> - <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LayoutRoot" - Storyboard.TargetProperty="Background"> - <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ListBoxItemPointerOverBackgroundThemeBrush}" /> - </ObjectAnimationUsingKeyFrames> - <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" - Storyboard.TargetProperty="Foreground"> - <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ListBoxItemPointerOverForegroundThemeBrush}" /> - </ObjectAnimationUsingKeyFrames> - </Storyboard> - </VisualState> - <VisualState x:Name="Disabled"> - <Storyboard> - <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LayoutRoot" - Storyboard.TargetProperty="Background"> - <DiscreteObjectKeyFrame KeyTime="0" Value="Transparent" /> - </ObjectAnimationUsingKeyFrames> - <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" - Storyboard.TargetProperty="Foreground"> - <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ListBoxItemDisabledForegroundThemeBrush}" /> - </ObjectAnimationUsingKeyFrames> - </Storyboard> - </VisualState> - <VisualState x:Name="Pressed"> - <Storyboard> - <DoubleAnimation Storyboard.TargetName="PressedBackground" - Storyboard.TargetProperty="Opacity" - To="1" - Duration="0" /> - <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" - Storyboard.TargetProperty="Foreground"> - <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ListBoxItemPressedForegroundThemeBrush}" /> - </ObjectAnimationUsingKeyFrames> - </Storyboard> - </VisualState> - </VisualStateGroup> - <VisualStateGroup x:Name="SelectionStates"> - <VisualState x:Name="Unselected" /> - <VisualState x:Name="Selected"> - <Storyboard> - <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerGrid" - Storyboard.TargetProperty="Background"> - <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ListBoxItemSelectedBackgroundThemeBrush}" /> - </ObjectAnimationUsingKeyFrames> - <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" - Storyboard.TargetProperty="Foreground"> - <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ListBoxItemSelectedForegroundThemeBrush}" /> - </ObjectAnimationUsingKeyFrames> - </Storyboard> - </VisualState> - <VisualState x:Name="SelectedUnfocused"> - <Storyboard> - <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerGrid" - Storyboard.TargetProperty="Background"> - <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ListBoxItemSelectedBackgroundThemeBrush}" /> - </ObjectAnimationUsingKeyFrames> - <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" - Storyboard.TargetProperty="Foreground"> - <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ListBoxItemSelectedForegroundThemeBrush}" /> - </ObjectAnimationUsingKeyFrames> - </Storyboard> - </VisualState> - <VisualState x:Name="SelectedDisabled"> - <Storyboard> - <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerGrid" - Storyboard.TargetProperty="Background"> - <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ListBoxItemSelectedDisabledBackgroundThemeBrush}" /> - </ObjectAnimationUsingKeyFrames> - <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" - Storyboard.TargetProperty="Foreground"> - <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ListBoxItemSelectedDisabledForegroundThemeBrush}" /> - </ObjectAnimationUsingKeyFrames> - </Storyboard> - </VisualState> - <VisualState x:Name="SelectedPointerOver"> - <Storyboard> - <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerGrid" - Storyboard.TargetProperty="Background"> - <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ListBoxItemSelectedPointerOverBackgroundThemeBrush}" /> - </ObjectAnimationUsingKeyFrames> - <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" - Storyboard.TargetProperty="Foreground"> - <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ListBoxItemSelectedForegroundThemeBrush}" /> - </ObjectAnimationUsingKeyFrames> - </Storyboard> - </VisualState> - <VisualState x:Name="SelectedPressed"> - <Storyboard> - <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InnerGrid" - Storyboard.TargetProperty="Background"> - <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ListBoxItemSelectedBackgroundThemeBrush}" /> - </ObjectAnimationUsingKeyFrames> - <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" - Storyboard.TargetProperty="Foreground"> - <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ListBoxItemSelectedForegroundThemeBrush}" /> - </ObjectAnimationUsingKeyFrames> - </Storyboard> - </VisualState> - </VisualStateGroup> - <VisualStateGroup x:Name="FocusStates"> - <VisualState x:Name="Focused"> - <Storyboard> - <DoubleAnimation Storyboard.TargetName="FocusVisualWhite" - Storyboard.TargetProperty="Opacity" - To="1" - Duration="0" /> - <DoubleAnimation Storyboard.TargetName="FocusVisualBlack" - Storyboard.TargetProperty="Opacity" - To="1" - Duration="0" /> - </Storyboard> - </VisualState> - <VisualState x:Name="Unfocused" /> - <VisualState x:Name="PointerFocused" /> - </VisualStateGroup> - </VisualStateManager.VisualStateGroups> - <Grid x:Name="InnerGrid" - Background="Transparent"> - <Rectangle x:Name="PressedBackground" - Fill="{ThemeResource ListBoxItemPressedBackgroundThemeBrush}" - Opacity="0" /> - <ContentPresenter x:Name="ContentPresenter" - Content="{TemplateBinding Content}" - ContentTransitions="{TemplateBinding ContentTransitions}" - ContentTemplate="{TemplateBinding ContentTemplate}" - HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" - VerticalAlignment="{TemplateBinding VerticalContentAlignment}" - Margin="{TemplateBinding Padding}" /> - <Rectangle x:Name="FocusVisualWhite" - Stroke="{ThemeResource FocusVisualWhiteStrokeThemeBrush}" - StrokeEndLineCap="Square" - StrokeDashArray="1,1" - Opacity="0" - StrokeDashOffset=".5" /> - <Rectangle x:Name="FocusVisualBlack" - Stroke="{ThemeResource FocusVisualBlackStrokeThemeBrush}" - StrokeEndLineCap="Square" - StrokeDashArray="1,1" - Opacity="0" - StrokeDashOffset="1.5" /> - </Grid> - </Border> - </ControlTemplate> - </Setter.Value> - </Setter> - </Style> - - <Style x:Key="ScenarioListBoxStyle" TargetType="ListBox"> - <Setter Property="Foreground" Value="{ThemeResource ListBoxForegroundThemeBrush}"/> - <Setter Property="Background" Value="Transparent"/> - <Setter Property="BorderBrush" Value="Transparent"/> - <Setter Property="BorderThickness" Value="{ThemeResource ListBoxBorderThemeThickness}"/> - <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/> - <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/> - <Setter Property="ScrollViewer.HorizontalScrollMode" Value="Disabled"/> - <Setter Property="ScrollViewer.IsHorizontalRailEnabled" Value="True"/> - <Setter Property="ScrollViewer.VerticalScrollMode" Value="Enabled"/> - <Setter Property="ScrollViewer.IsVerticalRailEnabled" Value="True"/> - <Setter Property="ScrollViewer.ZoomMode" Value="Disabled"/> - <Setter Property="ScrollViewer.IsDeferredScrollingEnabled" Value="False"/> - <Setter Property="ScrollViewer.BringIntoViewOnFocusChange" Value="True"/> - <Setter Property="IsTabStop" Value="False"/> - <Setter Property="TabNavigation" Value="Once"/> - <Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}"/> - <Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}"/> - <Setter Property="ItemsPanel"> - <Setter.Value> - <ItemsPanelTemplate> - <VirtualizingStackPanel Background="Transparent"/> - </ItemsPanelTemplate> - </Setter.Value> - </Setter> - <Setter Property="Template"> - <Setter.Value> - <ControlTemplate TargetType="ListBox"> - <Border x:Name="LayoutRoot" BorderBrush="Transparent" BorderThickness="{TemplateBinding BorderThickness}" Background="Transparent"> - <VisualStateManager.VisualStateGroups> - <VisualStateGroup x:Name="CommonStates"> - <VisualState x:Name="Normal"/> - <VisualState x:Name="Disabled"> - <Storyboard> - <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="LayoutRoot"> - <DiscreteObjectKeyFrame KeyTime="0" Value="Transparent"/> - </ObjectAnimationUsingKeyFrames> - </Storyboard> - </VisualState> - </VisualStateGroup> - <VisualStateGroup x:Name="FocusStates"> - <VisualState x:Name="Focused"> - <Storyboard> - <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="LayoutRoot"> - <DiscreteObjectKeyFrame KeyTime="0" Value="Transparent"/> - </ObjectAnimationUsingKeyFrames> - </Storyboard> - </VisualState> - <VisualState x:Name="Unfocused"/> - </VisualStateGroup> - </VisualStateManager.VisualStateGroups> - <ScrollViewer x:Name="ScrollViewer" AutomationProperties.AccessibilityView="Raw" BringIntoViewOnFocusChange="{TemplateBinding ScrollViewer.BringIntoViewOnFocusChange}" HorizontalScrollMode="{TemplateBinding ScrollViewer.HorizontalScrollMode}" HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}" IsHorizontalRailEnabled="{TemplateBinding ScrollViewer.IsHorizontalRailEnabled}" IsVerticalRailEnabled="{TemplateBinding ScrollViewer.IsVerticalRailEnabled}" IsDeferredScrollingEnabled="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}" Padding="{TemplateBinding Padding}" TabNavigation="{TemplateBinding TabNavigation}" VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}" VerticalScrollMode="{TemplateBinding ScrollViewer.VerticalScrollMode}" ZoomMode="{TemplateBinding ScrollViewer.ZoomMode}"> - <ItemsPresenter/> - </ScrollViewer> - </Border> - </ControlTemplate> - </Setter.Value> - </Setter> - </Style> - -</ResourceDictionary> |
