winrt-xaml

Convert SVG to XAML

老子叫甜甜 提交于 2019-12-01 04:46:06
I tried InkScape & XPS method , but it doesn't give me correct XAML. Can anyone please convert this SVG to WinRT compatible XAML ? Tim Heuer Take a look at this and see if it works: https://gist.github.com/timheuer/6443390 Method (yes, superhack): Use Inkscape to save as PDF Rename the Filename extension from PDF to AI Use Expression Design to open AI document Export to Silverlight Canvas Using Inkscape 0.91 it's possible to open an SVG file and directly save as XAML. Select Microsoft XAML file as the file type: Meow I'm not able to comment on the related answer, but I found it even easier to

Close Button on VS11 Apps

与世无争的帅哥 提交于 2019-12-01 04:33:59
问题 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? 回答1: 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() 回答2: You shouldn't

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

落花浮王杯 提交于 2019-12-01 03:36:44
问题 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

Windows Store App Design-time DataContext

点点圈 提交于 2019-12-01 02:34:18
I've been a XAML developer for years now but this one has stumped me. I've been sleeping badly so maybe I'm being dense. Just orientating myself with Windows Store apps, I noticed that the LayoutAwarePage has a DefaultViewModel these days, which is nice but I it gets set only at runtime. Really, we need a DataContext established during design time to see real fake data. So after failing with some more convoluted ViewModel hook-up code, I am down to this and it doesn't work: public sealed partial class TemplatePage : LayoutAwarePage { public TemplatePage() : base() { this.DefaultViewModel = new

Convert SVG to XAML

丶灬走出姿态 提交于 2019-12-01 01:40:25
问题 I tried InkScape & XPS method, but it doesn't give me correct XAML. Can anyone please convert this SVG to WinRT compatible XAML ? 回答1: Take a look at this and see if it works: https://gist.github.com/timheuer/6443390 Method (yes, superhack): Use Inkscape to save as PDF Rename the Filename extension from PDF to AI Use Expression Design to open AI document Export to Silverlight Canvas 回答2: Using Inkscape 0.91 it's possible to open an SVG file and directly save as XAML. Select Microsoft XAML

Programmatically scroll controls into view when virtual keyboard opens

可紊 提交于 2019-12-01 00:49:58
I have a page with a vertical set of textboxes. If one of them is focused, all of them should be visible, even if the onscreen keyboard is displayed. There are just enough of them that all of them fit in the available space above the keyboard. When the bottom textbox is focused, the page gets automatically scrolled up so that all of them are visible, but if the top textbox is focused, the onscreen keyboard covers the bottom one. This is a simplified example of my page: <Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}"> <ItemsControl ItemsSource="{Binding List}" Margin=

Popup windows doesn't move up when Surface keyboard is shown in Windows 8 store app

╄→尐↘猪︶ㄣ 提交于 2019-11-30 23:53:39
I have a windows store application that requires the users to enter data via numerous textboxes. When a textbox near the bottom of the screen has focus the on screen keyboard appears and moves the content of the page up. This is great and what I want. My problem occurs when I have a popup window. When my popup window appears it is practically full screen. The popup window's child is a user control which again has lots of textboxes on it. When one of the textboxes near the bottom of the page is selected, the keyboard appears but the screen doesn't move up so the keyboard is appearing over the

Where is the date picker in WinRT XAML?

笑着哭i 提交于 2019-11-30 23:36:58
问题 I see the date picker control in WinRT JavaScript/HTML5. Where is that control for XAML? 回答1: Note that Win 8.1 includes built-in XAML controls for DatePicker, TimePicker. So if you retarget your project to target Win 8.1 you will now get these controls. retargeting: http://msdn.microsoft.com/en-us/library/windows/apps/dn263114.aspx 回答2: The best one I've found (complete with templating and xaml friendly formatting options) is: https://github.com/jasonmitchell/WinRT-XAML-DatePicker 回答3: There

providing domain/user credentials to webview control

和自甴很熟 提交于 2019-11-30 22:22:20
Does anyone know how to provide credentials to a WebView control (or even better - run a Windows 8 Metro style application / WinRT app in the context of a specific domain user?) I've tried following the HttpClient + WebView approach as listed here (http://social.msdn.microsoft.com/Forums/en-US/winappswithcsharp/thread/05e46a0a-e913-469d-a4a5-4a805dcf158a) but it still prompts the user for credentials, since in the returned content there are links to secured items. I have a NetworkCredential object, and I pretty much want to apply it to every single HTTP call that gets made. Surely someone must

How can I tell which HubSection is selected

久未见 提交于 2019-11-30 21:39:06
I need to change the contents of an AppBar when a user changes the view in a Hub control. The way I did it while using a Pivot control is listening to the SelectionChanged event and responding to the SelectIndex value. The hub, however, only has a SectionsInViewChanged event, which returns a collection of multiple sections. Usually the one user is interacting with and then the adjacent, barely-visible section. So my question is, how can I tell which Section is the one that is currently being prominently displayed to the user (so I can change the AppBar icons accordingly)? In Hub control, We