mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-04 18:26:39 +02:00
* upgrade time! * looks like two got orphaned :/ * Fix Measure Tool window style to remove title bar and borders * Fix spellchecker * was tab :( * Update src/modules/MeasureTool/MeasureToolUI/MeasureToolXAML/MainWindow.xaml.cs Co-authored-by: Dustin L. Howett <duhowett@microsoft.com> * added comment about CsWinRT upgrade to verify on next upgrade --------- Co-authored-by: Jaime Bernardo <jaime@janeasystems.com> Co-authored-by: Dustin L. Howett <duhowett@microsoft.com>
34 lines
1.1 KiB
C#
34 lines
1.1 KiB
C#
// Copyright (c) Microsoft Corporation
|
|
// The Microsoft Corporation licenses this file to you under the MIT license.
|
|
// See the LICENSE file in the project root for more information.
|
|
|
|
using Microsoft.PowerToys.Settings.UI.ViewModels;
|
|
using Microsoft.UI.Xaml;
|
|
using Microsoft.UI.Xaml.Controls;
|
|
|
|
namespace Microsoft.PowerToys.Settings.UI.Converters
|
|
{
|
|
public partial class ModuleItemTemplateSelector : DataTemplateSelector
|
|
{
|
|
public DataTemplate TextTemplate { get; set; }
|
|
|
|
public DataTemplate ButtonTemplate { get; set; }
|
|
|
|
public DataTemplate ShortcutTemplate { get; set; }
|
|
|
|
public DataTemplate KBMTemplate { get; set; }
|
|
|
|
protected override DataTemplate SelectTemplateCore(object item, DependencyObject container)
|
|
{
|
|
switch (item)
|
|
{
|
|
case DashboardModuleButtonItem: return ButtonTemplate;
|
|
case DashboardModuleShortcutItem: return ShortcutTemplate;
|
|
case DashboardModuleTextItem: return TextTemplate;
|
|
case DashboardModuleKBMItem: return KBMTemplate;
|
|
default: return TextTemplate;
|
|
}
|
|
}
|
|
}
|
|
}
|