winrt-xaml

C# XAML Metro Image dynamic Source

半城伤御伤魂 提交于 2019-12-12 20:20:35
问题 I like to do simple animation using one Image control in XAML and swaping Source of Image to other in interval 1 second. But when I do that, the image is flickering. I using this code (at Tick event handler of Timer ): Uri uri = new Uri("ms-appx:/Sprites/Running/" + y++ + ".png", UriKind.RelativeOrAbsolute); BitmapImage textureBitmap = new BitmapImage(uri); this.ImageHolder.Source = textureBitmap; Where can the problem be ? Should I cache BitmapImages? Thank you for your help. 回答1: Try to

How to determine when the scrollviewer has ended scrolling?

纵然是瞬间 提交于 2019-12-12 19:17:26
问题 I need to adjust the scrollviewer to some point after the users has completed scrolling. For that i need to get to listen to when the scrolling has ended. iOS's UIScrollView has some similar methods - (void)scrollViewDidEndScrollingAnimation:(UIScrollView *)scrollView that is called when the scrollview - (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView - (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate I tried ViewChanging and ViewChanged

Pushpin resize binding zoomlevel

与世无争的帅哥 提交于 2019-12-12 18:46:54
问题 I'm using WinRT with bing maps and i'm trying to set (programmatically) the RenderTransform value of my pushpin when zooming on map. I tried this Solution but seems that the Windows 8 controls do not support binding to the ZoomLevel property. does anyone have any either workaround or working example ? Thankyou in advance 回答1: I post here an example that can be used from others if needed. Exploiting your suggestion of using the "ViewChanged" event I wrote this code snippet: private double

How to change the item template of list box depending upon the Current Orientation in metro app?

不打扰是莪最后的温柔 提交于 2019-12-12 17:09:57
问题 Hi I am developing an metro app , my app works perfectly fine in landscape mode but now i want to make it compatible to Portrait mode also. This is how i have defined students listbox :- <ListBox x:Name="lstbxbStudents" Background="Transparent" Height="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto" SelectionChanged="lstbxbStudents_SelectionChanged_1" HorizontalAlignment="Left" Width="Auto" Margin="4,50,0,122" Style="{StaticResource ListBoxStyle1}"> <ListBox.ItemTemplate> <DataTemplate>

Boolean to Visibility Converter in Win RT XAML not working first time

你离开我真会死。 提交于 2019-12-12 16:42:51
问题 Strange one when working in XAML for Windows RT (windows store app) today, when IsValid=true is set from my view model my boolean to visibility converter does not work the first time (my path remains hidden), but then does display correctly visibility subsequent times after that. Is this a bug, or what could be going on? I want to show my tick on IsValid=true including initial time: <Path x:Name="MyTick" Data="F1 M 45.12,5.49L 21.255,40.8L 20.4525,40.8L 0,23.2875L 5.775,15.7875L 19.2525,27.3L

XamlParseException when consuming a Page from a library

我们两清 提交于 2019-12-12 16:33:16
问题 I've recently started work on a project that is supposed to target Windows RT (C#) Having some background in Silverlight & WPF I've created an assembly (library) that is supposed to hold some of my UserControls, Pages etc. for later re-use. I've added an empty Page to that assemly. Whenever I navigate to that page (using navigation mechanisms), the contructor is called correctly, however there's a non-descriptive XamlParseException during the InitializeComponent() call. Message: XAML parsing

Animate dependency properties

浪尽此生 提交于 2019-12-12 16:08:10
问题 I have a custom user control that registrates a dependency property HoverHeight : public sealed partial class VirtualPointer : UserControl { public static readonly DependencyProperty HoverHeightProperty = DependencyProperty.Register("HoverHeight", typeof(double), typeof(VirtualPointer), new PropertyMetadata(1.0,OnHoverHeightChanged)); public double HoverHeight { get { return (double)GetValue(HoverHeightProperty); } set { SetValue(HoverHeightProperty, value); } } ... I use this property to

PointerDownThemeAnimation application stops WP8

白昼怎懂夜的黑 提交于 2019-12-12 15:52:16
问题 I'm confused why my app is closing, I have added the PointerDownThemeAnimation and it works fine but only one time, when I try to click it again the aplication stops. Why? Here is my code: private void staryrynek1(object sender, PointerRoutedEventArgs e) { pointerDownStoryboard.Begin(); } private void staryrynek(object sender, PointerRoutedEventArgs e) { pointerUpStoryboard.Begin(); this.Frame.Navigate(typeof(StaryRynek)); } and <Grid x:Name="staryrynek_grid" Margin="10,92,10,0"

The DataTemplate in HubSection doesn't get full height

北城以北 提交于 2019-12-12 15:48:37
问题 I have the following code: <HubSection x:Name="modules_section" ...> <DataTemplate> <StackPanel Orientation="Vertical"> .................................. How can I get the StackPanel to take the full height of the HubSection? VerticalAlignment="Stretch" doesn't do the job. I also tried to use binding via <StackPanel Height={Binding ElementName=modules_section, Path=ActualHeight}" ...> but the Actualheight of the hub section seems to be 0 (I also tried to set it in code-behind and debugged to

Send Email and Attachment

雨燕双飞 提交于 2019-12-12 15:45:58
问题 I used below code to send email. But when I run it in Simulator in VS, the email client can not be launched. What I did wrong? But the Email Client launched in Localmachine mode. var mailto = new Uri("mailto:?to=recipient@example.com&subject=Win8 Email&body=n Hi."); await Windows.System.Launcher.LaunchUriAsync(mailto); 回答1: This is the answer. Using WinRT in Windows 8.0 you cannot attach an attachment at this time. Sorry if that is not the answer you wanted to hear. You can always use a