windows-8

Unknown type 'AppBarButton' in XML namespace - Windows 8 Store App XAML, issues adding app bars

放肆的年华 提交于 2020-01-13 10:56:08
问题 I'm new to developing Windows 8 apps, and am having trouble getting my XAML file to recognise generated code for adding AppBars and CommandBars. I am getting the error "Unknown type [something] in XML namespace" for a number of elements I am trying to add, here is my example below: If I re-open my solution this is temporarily displayed as a warning rather than an error. Also navigating to http://schemas.microsoft.com/winfx/2006/xaml/presentation just produces "The resource you are looking for

Unable to get property of undefined or null reference - Windows 8 JS/CSS app

为君一笑 提交于 2020-01-13 09:55:34
问题 Below is a snippet of my code. The error I am getting is that when I perform a search and call the method _searchData , it successfully calls the method _lookUpSuccess , however then returns the following error: JavaScript runtime error: Unable to get property '_displayResult' of undefined or null reference when it tries to call the _displayResult method. Why this may be? (function () { // make this an object property/method eventually var displayResult = function (queryResult) { for (var i =

How to P/Invoke to a native dll from Metro?

别来无恙 提交于 2020-01-13 09:36:26
问题 I've got a library consisting of two parts - One .net assembly that P/Invokes to a native 3rd party dll. In desktop mode this works just fine: However, when referencing the assembly from a Metro style app and running it, it throws a System.DllNotFoundException on the P/Invoke complaining that "Unable to load DLL 'library': The specified module could not be found." The native dll does not do anything special but only creates out-going TCP/IP connections to a server. The system cannot know this

How to print Formatted Page which contain ListBox or GridView

别等时光非礼了梦想. 提交于 2020-01-13 03:44:25
问题 Printing Document using WinRT : 1) To Keep tracking if there are more data Or text data to print in a formatted page. This can be done using RichTextBlock and RichTextBlockOverflow like below: <RichTextBlock Foreground="Black" x:Name="textContent" FontSize="18" Grid.Row="1" Grid.ColumnSpan="2" OverflowContentTarget="{Binding ElementName=firstLinkedContainer}" IsTextSelectionEnabled="True" TextAlignment="Left" FontFamily="Segoe UI" VerticalAlignment="Top" HorizontalAlignment="Left"> <

ShowWindow Function Doesn't Work When Target Application Is Run As Administrator

妖精的绣舞 提交于 2020-01-12 08:51:31
问题 I am writing a program that shows/hides the window of some target application. I was testing it out earlier and noticed something strange. If I run the target application as Administrator (right-click->Properties, "Compatability" tab, "Run this program as administrator") it doesn't work. To demonstrate I wrote a simple GUI app called "TargetApplication" and then I wrote the following code to test showing/hiding this application: class Program { static void Main(string[] args) { IntPtr

Windows 8 - IE cannot reach sites listed in hosts file

≡放荡痞女 提交于 2020-01-12 07:29:08
问题 I have many local websites set up in IIS and have entries in my hosts file to make the websites available locally. I've come from a Windows 7 machine where everything was working correctly in all browsers. The move to Windows 8, using the same hosts file and the same websites in IIS seems to be causing issues with Internet Explorer (11). I can access the website: mywebsite.local in Firefox and Chrome but am unable to access the same website in Internet Explorer. I've made sure that I'm not

Change FontSize to fit TextBlock

允我心安 提交于 2020-01-12 03:28:27
问题 I'm developing Windows 8 Store Application, we know that display sizes are very different, so all the elements have stretchable settings, so that if display is small elements (pictures, charts etc. ) are smaller, if display is big - bigger. All works perfectly except TextBlocks (labels): TextBlock element itself also is being stretched, but the FontSize remains the same, how i noticed there is no property to change font size to fit TextBlock. Is there a way to change FontSize of the TextBlock

How to set axis margin in WinRT XAML Toolkit line chart?

与世无争的帅哥 提交于 2020-01-11 14:26:08
问题 Answer Finally I solved my answer with this. ((LineSeries)MyChart.Series[0]).IndependentAxis = new LinearAxis { Minimum = 1, Maximum = 5, Orientation = AxisOrientation.X, Interval = 1, Margin = new Thickness(10, 0, 10, 0) }; ((LineSeries)MyChart.Series[0]).Clip = null; ((LineSeries)MyChart.Series[0]).Margin = new Thickness(10, 0, 10, 0); I am drawing line chart with help of WinRT XAML Toolkit. I am setting X axis manually, but when I set I am getting wierd start & end point. I tried to set

Convert byte Array or File Storage to Bitmap Image

烂漫一生 提交于 2020-01-11 12:51:48
问题 After I pick file to storage file , How can I convert this file to be שn image in order to display it like profile picture? I converted the file to byte array but don't know what to do next or there is an other way? Here is my code : var openPicker = new Windows.Storage.Pickers.FileOpenPicker(); openPicker.ViewMode = Windows.Storage.Pickers.PickerViewMode.Thumbnail; openPicker.SuggestedStartLocation = Windows.Storage.Pickers.PickerLocationId.DocumentsLibrary; openPicker.FileTypeFilter.Add("

Convert byte Array or File Storage to Bitmap Image

China☆狼群 提交于 2020-01-11 12:51:28
问题 After I pick file to storage file , How can I convert this file to be שn image in order to display it like profile picture? I converted the file to byte array but don't know what to do next or there is an other way? Here is my code : var openPicker = new Windows.Storage.Pickers.FileOpenPicker(); openPicker.ViewMode = Windows.Storage.Pickers.PickerViewMode.Thumbnail; openPicker.SuggestedStartLocation = Windows.Storage.Pickers.PickerLocationId.DocumentsLibrary; openPicker.FileTypeFilter.Add("