winrt-xaml

How to get gridview with variable sized gridview items?

假装没事ソ 提交于 2019-12-01 10:43:35
问题 I want to show images in grouped gridview. Now all the images will have various height & width So I want to show images in it's original height width. I tried WrapGrid , VariableSizedWrapGrid & VirtualizingStackPanel but didn't get the output. Please note my model class contains image name (path), height & width. So how can I show images like given below ? 回答1: No, I doubt you tried a WrapPanel. There's not one in WinRT. Using VariableSizedWrapGrid you get a result something like this: Using

Where is the Flyout control in WinRT XAML?

折月煮酒 提交于 2019-12-01 09:10:20
The Flyout control in JavaScript is handy for the Settings pane and for button Flyout extensions. But where is the Flyout control for WinRT XAML? The control you are looking for is called Popup in XAML. Unlike the JavaScript implementation of Flyout, it is up to you location the subject button and position the Popup near it. Look: http://blog.jerrynixon.com/2012/08/how-to-create-windows-8-settings-pane.html use Callisto control toolkit, it has flyout control 来源: https://stackoverflow.com/questions/10965886/where-is-the-flyout-control-in-winrt-xaml

Behaviors are not working properly inside Style Setter

不羁的心 提交于 2019-12-01 08:44:15
In my Windows-Runtime app, I have a theme with a style that has a Behavior defined for the DoubleTapped action: These are the XML Namespaces: xmlns:i="using:Microsoft.Xaml.Interactivity" xmlns:core="using:Microsoft.Xaml.Interactions.Core" And this is the style: <Style x:Name="DisplayImage" TargetType="ScrollViewer"> <Setter Property="VerticalScrollBarVisibility" Value="Hidden" /> <Setter Property="HorizontalAlignment" Value="Left" /> <Setter Property="ZoomMode" Value="Disabled" /> <Setter Property="i:Interaction.Behaviors"> <Setter.Value> <i:BehaviorCollection> <core:EventTriggerBehavior

Method to serialize a class which contain BitmapImage : using 2 inherited class?

别来无恙 提交于 2019-12-01 08:06:02
问题 When my application closes, I want to serialize some data to make it persistent for the next use of the application. I choose to serialize these data with Newtonsoft.JsonConverter. But, I have a BitmapImage in my class, and it can't be serialized. I'm bit stuck on this because I don't find a solution to keep my BitmapImage into my class (I need to keep it here) and being able to serialize this class. I tried to create a inherited class which contains the BitmapImage, but I'm not allowed to

Windows Phone 8.1 AppBarButton icon with 2 rows of text

左心房为你撑大大i 提交于 2019-12-01 07:19:54
问题 I would like to know how to make AppBarButton Icon to has 2 rows of text. I want to make it like in Windows Calendar: 回答1: The AppBarButton doesn't display text or arbitrary Xaml in its Icon. It needs to be a symbol from a font, bitmap, or path. For a calendar display like that you'll be best off with a bitmap. Since you probably don't want to pregenerate 366 icons you can use RenderTargetBitmap to create them on the fly. Assuming "ButtonImageMaster" is a Xaml snippet with the day and month

Where is the Flyout control in WinRT XAML?

拈花ヽ惹草 提交于 2019-12-01 06:59:58
问题 The Flyout control in JavaScript is handy for the Settings pane and for button Flyout extensions. But where is the Flyout control for WinRT XAML? 回答1: The control you are looking for is called Popup in XAML. Unlike the JavaScript implementation of Flyout, it is up to you location the subject button and position the Popup near it. Look: http://blog.jerrynixon.com/2012/08/how-to-create-windows-8-settings-pane.html 回答2: use Callisto control toolkit, it has flyout control 来源: https:/

Close Button on VS11 Apps

心已入冬 提交于 2019-12-01 06:50:48
I try to create an Application on Windows 8 with VS 11 with C#, And I need to a Button in my App that when people Click on this button , my App going to Close. But I can't find any Exit or Close function to add, to my Click Event. how can I make this button? or what is your proposal to solving this Problem? If you don't care about certification - e.g. you want a close button in your own debug build to help you with testing - you can call Application.Current.Exit() You shouldn't close your app. This is one of the concepts of Metro apps.The user switches to a different task and the Process

windows phone 8.1 textbox character virtualKey validation

☆樱花仙子☆ 提交于 2019-12-01 06:39:33
im develeoping windows phone 8.1 app. In a textbox I want to prevent the user from inputting any non-digital letter only [0-9]. So here is my code: private void NumKeyDown(object sender, KeyRoutedEventArgs e) { bool isNumber = (e.Key == Windows.System.VirtualKey.Number0 || e.Key == VirtualKey.Number1 || e.Key == VirtualKey.Number2 || e.Key == VirtualKey.Number3 || e.Key == VirtualKey.Number4 || e.Key == VirtualKey.Number5 || e.Key == VirtualKey.Number6 || e.Key == VirtualKey.Number7 || e.Key == VirtualKey.Number8 || e.Key == VirtualKey.Number9 || e.Key == VirtualKey.Back); CoreVirtualKeyStates

XAML Image Quality (interpolation) in a Metro-Style App

笑着哭i 提交于 2019-12-01 06:35:10
Given the following Image object (it's in the DataTemplate of a ListView object): <Image Source="{Binding ImgSource}" ImageOpened="img_ImageOpened" /> how am I supposed to get an high-quality bicubic-interpolated image? (on screen, the size of this Image is smaller than the source PNG, but the default resizing appears to be performed with the poor-quality "nearest neighbor" interpolation). Since I would like to rely on data binding alone (whenever the ImgSource of the associated data item changes, the Image content should change), I've tried to set an ImageOpened handler and change the just

ListView.ContainerFromItem returns null after a new item is added in windows 8.1 store XAML

折月煮酒 提交于 2019-12-01 06:34:46
问题 I have a simple ListView with no item template and the SelectionChanged event setup: <ListView x:Name="list1" HorizontalAlignment="Left" Height="556" Margin="209,93,0,0" VerticalAlignment="Top" Width="1033" SelectionChanged="list1_SelectionChanged" /> private void list1_SelectionChanged(object sender, SelectionChangedEventArgs e) { var container = (sender as ListView).ContainerFromItem(e.AddedItems.First()); var presenter = VisualTreeHelper.GetChild(container, 0); } I also have a test class