winrt-xaml

Windows 8 Metro App - Render PNGs

喜你入骨 提交于 2019-12-01 21:38:15
I am needing to render some custom PNGs in a Windows 8 app. Basically I need to create a custom live tile by putting some drawings made in my app on top of an image for a live tile, and the only way to do this is render a PNG to disk, see here . What library should I use to do this? My first thought was to use a Xaml UserControl and RenderTargetBitmap , but it is not available in a Metro app. WinRT XAML Toolkit has some extension methods for WriteableBitmap that you could use too. You could probably use WriteableBitmapLoadExtensions for loading and WriteableBitmapSaveExtensions for saving. It

Flyout behind Appbar

帅比萌擦擦* 提交于 2019-12-01 20:52:25
When you want your app to expand to the full screen (including status bar and appbar), you have to do : var applicationView = Windows.UI.ViewManagement.ApplicationView.GetForCurrentView(); applicationView.SetDesiredBoundsMode(Windows.UI.ViewManagement.ApplicationViewBoundsMode.UseCoreWindow); Then if you want to have a flyout in your appbar or anywhere in your app, they will be displayed behind the appbar : <Page.BottomAppBar> <CommandBar> <AppBarButton Icon="Preview" Label="Preview"> <AppBarButton.Flyout> <MenuFlyout> <MenuFlyoutItem Text="Fit width" /> <MenuFlyoutItem Text="Fit height" />

How to change windows 8 live tile text color?

只愿长相守 提交于 2019-12-01 20:19:11
I am creating a windows 8 application in which I want to change foreground of live tile. I Have found a set of templates but didn't find any way to change live tile's text color. I have written following template code in my application. <tile> <visual> <binding template=""TileWidePeekImage01""> <image id=""1"" src=""{0}"" alt=""alt text""/> <text id=""1"">ActySystem</text> <text id=""2"">{1} Updated: {2} {3}</text> </binding> </visual> </tile> Please Help me! You have only two choice for live tile text color, white & black. Have you ever seen any live tile text with red or blue foreground,

How to draw string to a bitmap image in WinRT

此生再无相见时 提交于 2019-12-01 19:26:19
How do you draw a string to an image in winRT ? In WinForms that could be done using drawstring() method inside the system.drawing namespace but i couldn't find its equivalent in WinRT API. Direct2D is a replacement for GDI in WinRT. So you'll have to use C++/CX with DirectX for drawing text. I don't have any examples for you, but maybe this link (and the links included) can help you on your way. In Windows 8.1 they finally support rendering of XAML controls to bitmap. Now you can use var renderTargetBitmap = new RenderTargetBitmap(); await renderTargetBitmap.RenderAsync(uiElement, width,

How to disable ListView's Hover and Tile effects?

时光怂恿深爱的人放手 提交于 2019-12-01 18:21:23
问题 I want to disable Tile effect that is some kind of pushed effect and hover background color effect of ListView control, how can i do that? Thanks 回答1: Look at this question: Disable cross-slide selection for a listview You can also make changes to the template to remove any visual states and adornments - go to the designer and right click your ListView/Edit Additional Templates/Edit Generated Item Container (ItemContainerStyle)/Edit a Copy... - that will extract the template you can modify

Disable cross-slide selection for a listview

大兔子大兔子 提交于 2019-12-01 18:19:01
I'm designing an app that has a vertically panning one-dimensional list in the centre and the user is able to flip between lists horizontally due to a flipview. When a user drags horizontally within the listview, it selects that row because of cross-slide . This isn't the behaviour I want. Preferably I would want the flipview to start panning left and right. I think it's something to do with rails because when the user pans diagonally, they can pan the flipview. Cross-slide even happens when selectionmode is set to None How do I disable cross-slide, or how do I ensure that when a user pans

Disable cross-slide selection for a listview

一世执手 提交于 2019-12-01 18:13:03
问题 I'm designing an app that has a vertically panning one-dimensional list in the centre and the user is able to flip between lists horizontally due to a flipview. When a user drags horizontally within the listview, it selects that row because of cross-slide. This isn't the behaviour I want. Preferably I would want the flipview to start panning left and right. I think it's something to do with rails because when the user pans diagonally, they can pan the flipview. Cross-slide even happens when

Windows 8 Metro: Implementing Validation

孤街浪徒 提交于 2019-12-01 18:09:46
问题 I just googled for about 2 hours and didn't find anything. Given the following scenario: public class Person { [Required] public string Name { get; set; } } XAML: <TextBox Text="{Binding Name, Mode=TwoWay}" /> How would you go about automatically get feedback of the validation on the UI like there is in MVC3? (Oh, and I really don't care at the moment if I would be able to use the integrated DataAnnotations like [Required] or not) Any help is much appreciated! 回答1: I added something to the

How to disable ListView's Hover and Tile effects?

倾然丶 夕夏残阳落幕 提交于 2019-12-01 18:07:33
I want to disable Tile effect that is some kind of pushed effect and hover background color effect of ListView control, how can i do that? Thanks Filip Skakun Look at this question: Disable cross-slide selection for a listview You can also make changes to the template to remove any visual states and adornments - go to the designer and right click your ListView/Edit Additional Templates/Edit Generated Item Container (ItemContainerStyle)/Edit a Copy... - that will extract the template you can modify using your preferred method. Hanzalah Adalan After some googling I found that the highlighting

How to databind control height to another control's height?

放肆的年华 提交于 2019-12-01 17:37:36
I'm trying to have 2 controls have the same height. Can I do it with XAML only? If I did something like <Canvas Height="{Binding Height, ElementName=AnotherControl}" /> it doesn't actually do anything and the height goes to zero. The Output panel doesn't complain about any binding errors so AnotherControl.Height really exists. I tried binding to ActualHeight but it doesn't do anything either. Anything else I missed? My guess is that you AnotherControl is not explicitly given a Height . Unfortunately, in WinRT (unlike WPF, but the same as Silverlight), ActualWidth and ActualHeight are what are