Tag: win universal app

使用DX Compositor的UWP App实时模糊背景

所以UWP Composition支持已经出现了一段时间我正在寻找一种方法来实时模糊元素(移动或加载时的实时模糊,而不是静态快照)。 到目前为止,我一直在看stackoverflow上的一些答案,谷歌导致我使用Lumia Imaging SDK Sample和Win2D。 它们都不足以支持实时模糊。 我知道在组合中可以实时模糊,因为我已经看过模糊video的演示,并且有一个过时的项目XAMLFx ,它允许你在8.1 Apps上使用DX模糊几乎任何东西。 我不想使用RenderTargetBitmap (希望保持我的UI线程免费)。 如何仅使用组合API来执行此操作: ContainerVisual rootVisual = GetVisual(this.Content); Compositor compositor = rootVisual.Compositor; // what next? 任何帮助是极大的赞赏 :)

AdaptiveTrigger和DataTemplate

AdaptiveTrigger是否可以在DataTemplate中工作? 这是我用来自定义我的ShellNavigation的代码,除了视觉状态之外它工作得很好。 它们不会触发任何东西。

如何在Windows 10 Creators Update中使用Acrylic Accent?

我找不到任何使用Acrylic Accent( CreateBackdropBrush )的详细文档。 我在StackOverflow中发现了一个有用的post但它没有帮助入门。 所以请为这篇文章创建一个详细的答案,以便每个人都可以学习。 更新: 微软发布了官方的丙烯酸材料文件 注意: 如果有人不知道丙烯酸口音。 Acrylic Accent是Windows 10 Creators Update中的新function,允许应用程序背景模糊和透明。

如何使用通用Windows平台(UWP)应用程序执行流程命令(或类似)?

我正在创建自定义Cortana命令。 使用通用Windows平台应用程序注册和执行命令。 (GitHub的) 例如,我已经注册了以下命令 Shut down 在UWP应用程序中运行此function static async void ShutDown() { var dialog = new MessageDialog(“This is where I would shut the computer down.”); await dialog.ShowAsync(); //System.Diagnostics.Process.Start(“Shutdown”, “-s -t 10”); } 但是在设置之后我学会了UWP中不支持System.Diagnostics.Process 。 我想运行的自定义命令涉及某种执行,例如启动外部程序,运行其他脚本或打开网站。 有意义的是,UWP不支持它们,因为它是通用的,而XBox或手机可能无法做到这些,但我希望在Windows 10 PC上有一些替代或黑客的方法来实现这一点。 有没有办法让我在UWP应用程序中执行Process命令或其他具有类似function的东西? 似乎即使我可以让Cortana执行我的C#代码,UWP也不支持在这种情况下有用的东西。 提前致谢。

Windows 10通用应用程序文件/目录访问

我正在开发一个从文件系统上的可配置位置读取jpeg和pdf文件的应用程序。 目前有一个在WPF中实现的运行版本,现在我正在尝试迁移到新的Windows Universal应用程序。 以下代码适用于WPF: public IList GetFilesByNumber(string path, string number) { if (string.IsNullOrWhiteSpace(path)) throw new ArgumentNullException(nameof(path)); if (string.IsNullOrWhiteSpace(number)) throw new ArgumentNullException(nameof(number)); if (!Directory.Exists(path)) throw new DirectoryNotFoundException(path); var files = Directory.GetFiles(path, “*” + number + “*”, SearchOption.AllDirectories); if (files == null || files.Length == 0) return null; return files; } 使用通用应用程序我遇到了一些问题: Directory.Exists不可用 如何从应用程序存储区外的目录中读取? 要从应用程序存储区外的其他目录中读取,我尝试了以下操作: StorageFolder folder […]

XAML GridView ItemTemplate无法绑定到控件

我有一个带有ItemTemplate的GridView ,它包含一个Custom控件: 这是我的自定义用户控件: 它的代码背后: public sealed partial class HabitacionControl : UserControl { public HabitacionControl() { this.InitializeComponent(); } public MyClass Ubicacion { get { return (MyClass)GetValue(UbicacionProperty); } set { SetValue(UbicacionProperty, value); } } // Using a DependencyProperty as the backing store for Ubicacion. This enables animation, styling, binding, etc… public static readonly DependencyProperty UbicacionProperty = DependencyProperty.Register(“Ubicacion”, […]

Windows Phone 8.1 Universal App在从第二页导航时终止?

我的Windows Phone 8.1通用应用程序中有2页。 我使用带有click事件代码的按钮从Page1 .xaml导航到Page2 .xaml: this.Frame.Navigate(typeof(Page2)); 当我在Page2上时,我使用硬件后退按钮,应用程序关闭,没有例外或任何事情。 它只是返回到开始屏幕。 我已经在第2页尝试了以下内容: public Page2() { this.InitializeComponent(); Windows.Phone.UI.Input.HardwareButtons.BackPressed += HardwareButtons_BackPressed; } void HardwareButtons_BackPressed(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e) { Frame.GoBack(); } 据我所知,我不清楚后面的堆栈。 发生了什么,我该如何解决这个问题? 亲切的问候,尼尔斯