winrt-xaml

Blurred textblocks when used in animations

吃可爱长大的小学妹 提交于 2020-01-14 14:04:30
问题 I am simulating the semantic zoom effect in a Windows Store app using animations between two canvas'. However when I "zoom out" the TextBlock that appear on the canvas, appear as VERY blurry until the animation completes. This only happens for the first animation, after that the text is clear on all subsequent animations. I suspecting a bitmap caching type issue but either setting the CacheMode to Bitmap or null makes no difference. Are there any settings that can control or change this? The

WinRT: How do I ensure Images are drawn in a pixel-perfect way on a Canvas?

你离开我真会死。 提交于 2020-01-14 09:38:12
问题 I am adding Image instances to a Canvas in Windows Runtime environment and my image keeps getting scaled up when in 140 and 180 scale resolution displays, it looks perfect in scale resolution 100. I tried creating 3 PNG images, one for each scale size: 100, 140, 180 but it still scales them up and they look blurry. I created a test image with 4 black pixels on a cyan background and I took a screenshot from the simulator, see how the image is blurry, my original image has just 4 perfect black

ListPickerFlyout ignores RequestedTheme of parent page in Windows Phone 8.1

落爺英雄遲暮 提交于 2020-01-14 08:48:30
问题 I have a Page in a WinRT Windows Phone 8.1 application. This Page has RequestedTheme set to ElementTheme.Light . The system theme (as set in system settings) is set to dark. When I open a ListPickerFlyout (using Button.Flyout), the result is the following: It seems, that the foreground color appropriately changes to black, but the background stays dark-themed (a very dark gray). There isn't a Background property on the flyout, is there a way to force it to comply with the Page's

programmatic textblock entry with linebreaks

孤街浪徒 提交于 2020-01-14 07:34:12
问题 How do I programmatically add text with line breaks to a textblock? If I insert text like this: helpBlock.Text = "Here is some text. <LineBreak/> Here is <LineBreak/> some <LineBreak/> more."; Then the linebreaks get interpreted as part of the string literal. I want it to be more like what would happen if I had it in the XAML. I can't seem to do it the WPF way either: helpBlock.Inlines.Add("Here is some content."); Since the Add() method wants to accept objects of type "inline". I can't

How do I reference a StaticResource in code-behind?

风流意气都作罢 提交于 2020-01-14 07:12:29
问题 In XAML I do it like this: <Button Style="{StaticResource NavigationBackButtonNormalStyle}" /> How do I do the same thing in code-behind? 回答1: The page-level Resources object has the ability to find local, app-level, static, and theme resources. This means you simply do this: foo2.Style = this.Resources["NavigationBackButtonNormalStyle"] as Style; Best of luck! 回答2: During design-time, it seems that trying to resolve a "system resource" using Resources[key] will fail to find the resource and

How do I reference a StaticResource in code-behind?

此生再无相见时 提交于 2020-01-14 07:12:20
问题 In XAML I do it like this: <Button Style="{StaticResource NavigationBackButtonNormalStyle}" /> How do I do the same thing in code-behind? 回答1: The page-level Resources object has the ability to find local, app-level, static, and theme resources. This means you simply do this: foo2.Style = this.Resources["NavigationBackButtonNormalStyle"] as Style; Best of luck! 回答2: During design-time, it seems that trying to resolve a "system resource" using Resources[key] will fail to find the resource and

Can I have a composite shape as a resource in WinRT XAML?

若如初见. 提交于 2020-01-14 03:13:12
问题 I'm developing a Windows 8 Metro-style application and I want to use vector images. As there seems to be no direct support for svg images, I am trying to use a xaml fragment consisting of multiple shapes (a path and some lines) as an image. I would like to have a resource dictionary entry with the composite shape and be able to include it in different pages. Ideally, I would also like to be able to resolve a specific composite shape from a data bound property. From what I've read, the WPF

Caliburn Micro : passing Object between ViewModel

99封情书 提交于 2020-01-14 02:00:34
问题 I'm developing a simple Crud Application (a windows 8.1 store application) using Caliburn Micro 2.0.0-alpha2 I'm in trouble with navigation between viewmodels, passing object. I read many times the solution proposed by Anders Gustafsson (How to pass parameter to navigated view model with WinRT Caliburn.Micro?) and i tried to adapt it to my scope. But the object is alwais null. I need to pass a single object selected from a listView to my crudPage. The crudPage is composed by an userControl

Caliburn Micro : passing Object between ViewModel

北城以北 提交于 2020-01-14 02:00:34
问题 I'm developing a simple Crud Application (a windows 8.1 store application) using Caliburn Micro 2.0.0-alpha2 I'm in trouble with navigation between viewmodels, passing object. I read many times the solution proposed by Anders Gustafsson (How to pass parameter to navigated view model with WinRT Caliburn.Micro?) and i tried to adapt it to my scope. But the object is alwais null. I need to pass a single object selected from a listView to my crudPage. The crudPage is composed by an userControl

Unknown type 'AppBarButton' in XML namespace - Windows 8 Store App XAML, issues adding app bars

放肆的年华 提交于 2020-01-13 10:56:08
问题 I'm new to developing Windows 8 apps, and am having trouble getting my XAML file to recognise generated code for adding AppBars and CommandBars. I am getting the error "Unknown type [something] in XML namespace" for a number of elements I am trying to add, here is my example below: If I re-open my solution this is temporarily displayed as a warning rather than an error. Also navigating to http://schemas.microsoft.com/winfx/2006/xaml/presentation just produces "The resource you are looking for