windows-8

How to create ControlTemplate from code behind in Windows Store App?

只谈情不闲聊 提交于 2019-12-13 04:14:38
问题 UPDATE 1 If ControlTemplate has binding, will XamlReader.Load(...) work ? <ControlTemplate TargetType="charting:LineDataPoint"> <Grid> <ToolTipService.ToolTip> <ContentControl Content="{Binding Value,Converter={StaticResource DateToString},ConverterParameter=TEST}"/> </ToolTipService.ToolTip> <Ellipse Fill="Lime" Stroke="Lime" StrokeThickness="3" /> </Grid> </ControlTemplate> I want to achieve this from code behind. <ControlTemplate> <Ellipse Fill="Green" Stroke="Red" StrokeThickness="3" /> <

Create custom Windows 8 Start Tile for non Window 8 application

跟風遠走 提交于 2019-12-13 03:52:59
问题 After installing the Google Chrome Browser on my Win8 machine I was a bit supprised to see a customized tile on the Windows 8 Start menu. Unlike any other "standart" application Chrome has a dark gray tile with a little bit bigger icon. Still it seems to be no Windows 8 application. If I start Chrome I will find myself back on the desktop and everything works like it did in the last few years. How can I add this kind of customization to my own application? I have a .NET 3.51 WPF application

windows 8 Supported API test FAILED

谁说我不能喝 提交于 2019-12-13 03:24:12
问题 i'm working on windows 8 pdf reader i used MUPDF source sample it's working fine but when i tried for certification it giveing following errors. can any one please tell me how to rectify it ◦API GetModuleFileNameW in kernel32.dll is not supported for this application type. MuPDFWinRT.dll calls this API. ◦API GetModuleHandleW in kernel32.dll is not supported for this application type. MuPDFWinRT.dll calls this API. ◦API LoadLibraryExW in kernel32.dll is not supported for this application type.

Are there any class in WinRT as MarketPlaceReviewTask in WP?

蹲街弑〆低调 提交于 2019-12-13 02:47:53
问题 Are there any class in WinRT as MarketPlaceReview or MarketPlaceSearch Tasks in WP? Thanks. 回答1: You can use Windows Store's protocol with specific arguments to launch several tasks related to Store like If you want to open review page for any app then, you can open with this line. await Windows.System.Launcher.LaunchUriAsync(new Uri("ms-windows-store:REVIEW?PFN=MY_PACKAGE_FAMILY_NAME")); If you open the page of particular app in Store app then you can open with this line. await Windows

How to create a file from System.IO.Stream in metro apps?

喜你入骨 提交于 2019-12-13 02:23:02
问题 Stream stream = await new HttpClient().GetStreamAsync( url ); How can i create a file in app's local folder having data downloaded through this stream as file content? 回答1: You could probably do some kind of stream to stream copy. However, I happen to just use the response object in my code: var client = new HttpClient(); var response = await client.GetAsync(uri); if (response.IsSuccessStatusCode) { Stream stream = null; StorageFolder localFolder = ApplicationData.Current.TemporaryFolder;

Windows 8 Powershell Enable-WindowsOptionalFeature bat file

三世轮回 提交于 2019-12-13 02:13:20
问题 I have a .bat file that runs a powershell script. This is it powershell -Command "& {Enable-WindowsOptionalFeature -Online -FeatureName IIS-WebServerRole}" I have done this before and if I wanted to add another command I would put a semicolon before the closing brace and continue the script. This command however after completed requires that I choose wheter or not to restart the computer with a Y or N. Does anyone know how to pass this in an argument or avoid this step all together? Thanks in

how to programatically open and close bottomappbar using a eventhandler that exist in a usercontrol back code?

拈花ヽ惹草 提交于 2019-12-13 01:47:57
问题 I have a Windows 8 application (Xaml and C#): I have a userControl that is included in a MainPage. In this MainPage i have included a BottomAppBar that is fully functioning on RightClick and Windows+Z. What i need to do is to open the BottomAppBar from an event handler (in the usercontrol back code) on an image that exists in the userControl. i need to access the BottomAppBar in order to use the property IsOpen, but i am not being able to do so. Any hint? am i missing anything? 回答1: I am

Waiting for XAML layout to complete

好久不见. 提交于 2019-12-13 01:18:06
问题 I am making some changes to a page (by adding/removing controls) and I want to continue with my code only when the layout is settled (all elements measured and arranged etc). How do I do this? Is there some Task I can await on that will fire when layout is complete? (Right now using Yields and other tricks, but they all make me feel dirty) 回答1: You can build a Task around any event by using TaskCompletionSource<T> . In your case, it sounds like UIElement.LayoutUpdated may be the event you

XamlParseException when using UserControl from class library dll

我们两清 提交于 2019-12-13 01:04:01
问题 I have created a library which has a Popup UserControl similar to the one here. When I create a fresh Universal Windows App and create the same UserControl inside an app and open the popup, it opens. But if I create a Class Library and create the same UserControl inside it and try to use it (by opening the popup) inside an app, I get a XamlParseException. It is as follows - Windows.UI.Xaml.Markup.XamlParseException occurred HResult=-2144665590 Message=XAML parsing failed. Source=Windows

Removing the BackStack Entry in MetroStyle Application

三世轮回 提交于 2019-12-13 00:29:16
问题 How can I implement removing the backStack Entry in Metro style applications? 回答1: frame.SetNavigationState("1,0"); will clear the navigation history for you. 回答2: I found this answer useful: How to clear Backstack of the frame and start afresh Write your own NavigationService and store the navigationstate in the constructor. string state; public NavigationService(Frame mainFrame) { state = mainFrame.GetNavigationState(); _mainFrame = mainFrame; _mainFrame.Navigating += _mainFrame_Navigating;