xaml,windows-phone-8,windows-runtime,windows-store-apps , Error APPX1706: creating winrt dll with xaml


Error APPX1706: creating winrt dll with xaml

Question:

Tag: xaml,windows-phone-8,windows-runtime,windows-store-apps

I built a WinRT(Windows phone 8.1) dll with Page.xaml and App.xaml files. Next, I add reference to this winmd in wp8.1 application project.

And I get following error:

error APPX1706: The .winmd file 'project.winmd' contains type 
'?A0x32772d97.project_XamlTypeInfo.XamlMetaDataProvider' outside its root namespace
'project'. Make sure that all public types appear under a common root namespace
that matches the output file name.

Answer:

A WinMD library is basically a regular library (DLL) with some metadata information. These metadata information will allow it to be used from different languages. You can for example, create a WinMD library in C# and use it from a C++ or JS application.

Since the WinMD Library can be used by different languages, they are all conforming to the Windows Runtime rules.

Your specific problem is that one of the rules for the WinMD files states that all the classes must belong to the same root namespace. It means that if you have the following code:

A.cs
namespace Foo { class A { ... } }

B.cs
namespace Foo.Sub { class B { ... } }

C.cs
namespace Bar { class C { ... } }

D.cs
namespace Bar.Sub { class D { ... } }

The WinMD linker will return the error you are seeing. To solve it, you will have to declare all your classes in the same root namespace :

 A.cs
namespace Foo { class A { ... } }

B.cs
namespace Foo.Sub { class B { ... } }

C.cs
namespace Foo { class C { ... } }

D.cs
namespace Foo.Sub { class D { ... } }

I've replaced all the "Bar" namespace by "Foo"


Related:


Gracefully handling expected BindingExpression errors


wpf,xaml,data-binding,wpf-controls
I have a ComboBox bound to an ObservableCollection where the DisplayMemberPath references an object property Url. My CompositeCollection contains a null item, allowing the user to have an optional selection: <ComboBox Grid.Row="7" Grid.Column="1" Height="24" VerticalAlignment="Top" IsSynchronizedWithCurrentItem="True" SelectedItem="{Binding SelectedNotificationServer, Mode=TwoWay}" DisplayMemberPath="Url"> <ComboBox.Resources> <CollectionViewSource x:Key="comboBoxSource" Source="{Binding Path=NotificationServers}" />...

How to hide app bar button in different hub sections windows phone?


c#,xaml,windows-phone-8.1
i am new to c#. as i move on subsection the app bars stays the same only on the 3rd subsection that one button is hidden. please help... HubPage.xaml <CommandBar x:Name="mybar" ClosedDisplayMode="Minimal" > <CommandBar.SecondaryCommands> <AppBarButton Label="setting" Click="AppBarButton_Click"/> </CommandBar.SecondaryCommands> <AppBarButton x:Uid="CALENDAR" Label="calendar" Click="AppBarButton_Click"> <AppBarButton.Icon> <SymbolIcon x:Name="btnCalendar" Symbol="Calendar"/> </AppBarButton.Icon>...

Enable drag/drop and reordering after long click on GridView control (XAML)


c#,xaml,windows-store-apps
I'm using the Items Page template from the Windows 8.1 Windows Store Apps templates in XAML. The page features a large GridView control with multiple item elements. I would like to enable the dragging and reordering of items, but only after a user long clicks one of the items (similar...

Change the Location of DefaultPage in Universal App


c#,xaml,win-universal-app
How can I change the location of the default MainPage.xaml in an Universal Windows App? I want to have in the Windows and WindowsPhone Project a subfolder named "View" where I save the MainPage.xaml file like this example.  - Windows Project  -- View  --- MainPage.xaml  - WindowsPhone Project  -- View...

Caching Views in XAML changes appearance?


xaml,caching,windows-store-apps
I'm caching Views in XAML in order to improve performance (don't need to load the controls again). Does this make sense / improve performance of loading controls? Problem is, although I'm caching / loading the same thing, it seems when I use the Cached View, it has a different appearance....

Error x064 while registering a windows phone 8 for applications testing


windows-phone-8
I just finished a phonegap app ready to be deployed in a nokia lumia 520, I purchased a dev account, but everytime that I try to register the phone with the registration tool I get this: Status: Error communicating with the Windows Phone Dev Center. Please set the correct date...

Custom WPF DataGrid with optional button column


c#,wpf,xaml,datagrid,custom-controls
I am creating a custom DataGrid control which has a property, ShowCloneColumn. If you set this property to true the DataGrid should add another column with a Button. The class I've created derives from DataGrid and implemented a Dependency Property, ShowCloneColumn. public static readonly DependencyProperty ShowCloneColumnProperty = DependencyProperty.Register("ShowCloneColumn", typeof(bool), typeof(CloneRowDataGrid),...

Adding table header to Listview with DataTemplate in XAML


c#,wpf,xaml,listview,windows-runtime
In my Xaml I'm binding some data from a wcf. I don't know how to add some table headers to the columns. Also the data in the columns is not well aligned, I'm thinking it's because of the ColumnDefinition Width="auto". I want the columns to be aligned like in the...

Is there a way to implement a wcf service connected to a database without paying for azure?


database,wcf,azure,windows-phone-8
It seems like everything that I read is saying that for Windows Phone 8 Development, in order to create a database that connects to my WCF Service, I need to pay for it (Azure). Is that the truth? I want to create a database that my mobile app can access...

Aligning StackPanel to top-center in Canvas


c#,wpf,xaml,canvas
I'm trying to create an application which is supposed to measure quick reaction performance of it's user. The application starts up in full-screen mode and resizes it's elements accordingly to the screen resolution. The project was strongly inspired by training_aim_csgo2 map. It's mostly done, but here is the problem: I...

ItemsSource bind to collection stays empty


c#,wpf,xaml,mvvm
I have a class YouTubeVideo which contains some variables, which I would like to show on the UI. Therefore I created a custom control which shows all the data of the class. There are more than one instances of the class, so I would like to use an ItemsControl to...

Can we customize the default style of hub or panorama app


windows-phone-8,panorama-control
I am trying to customize the hub or panorama style in WP8. Can I make Screen 1 by customizing the default hub or panorama style? I am having trouble in changing the default Screen 2 style. Is it possible, and how?...

Setting binding on usercontrol to mainwindow's ViewModel


.net,wpf,xaml,mvvm,data-binding
I have following user control <UserControl x:Class="Station.Controls.FilterTraceDataControl" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" mc:Ignorable="d"> <TextBox x:Name="PartNumbTextBox" Width="120" VerticalAlignment="Bottom" HorizontalAlignment="Left" Margin="5,0,0,0" Height="25"/>...

Checkbox checked event not firing in wpf


c#,wpf,xaml
hi in my form(adminentitylist.xaml) file contains the code is below <ResourceDictionary xmlns:local="clr-namespace:iWatch.Administration" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" mc:Ignorable="d" xmlns:my="clr-namespace:iWatch.UILibrary;assembly=UILibrary"...

WrapPanel grabs focus from its children


c#,xaml,silverlight
I have some (homemade) controls in a wrappanel in a scrollviewer and I want my controls to get focus when I click on them or Tab through them. But the wrappanel grabs the focus and hands it to Children[0]. <ScrollViewer IsTabStop="False" > <toolkit:WrapPanel> <!-- children, filled in from code. IsTabStop="True"...

How to get data from combobox from datagrid in WPF?


c#,wpf,xaml
I have been looking for a way to get data out from this datagrid combobox that i made. Specifically the selected value of every combobox from columns. I am new to WPF and would be really grateful if someone would help. Thanks XAML: <DataGrid x:Name="tb" Margin="5,51,5,5" ItemsSource="{Binding}" AutoGenerateColumns="False"> <DataGrid.Columns> <DataGridTextColumn...

ViewModel Called on Navigation Back Prism MVVM Windows Phone 8.1 C#


c#,xaml,mvvm,windows-phone-8.1,prism
I'm working on an application and everything works fine but when I go back to the previous page the View Model is called so it will not maintain the old data. I use this line to call My View Model in XAML. prismmvvm:ViewModelLocator.AutoWireViewModel="true" So my question is: How do I...

Setting App.xaml-resources' value from codebehind


c#,wpf,xaml
I implemented a theme system for my program, and I read the theme from a file at startup. Basically in my App.xaml I have a bunch of <Colors/> with specific keys which I set the value of in code-behind when starting the program in App.xaml.cs.Main(); Here's what it looks like:...

How to change mediaelement to scale in portrait and fullscreen in landscape mode on Windows Phone 8.1?


c#,.net,xaml,windows-phone-8.1
I am having difficulty trying to change the <mediaelement /> to fullscreen automatically when the phone is rotated in landscape mode. Right now, the video will play fullscreen when I tap the lower right button that scales to full screen when I tap on it, but I don't want that....

How to Add Click event in Stack Layout or Frame


android,ios,xaml,xamarin,xamarin.forms
I am new in xamarin.forms please help me out how i can add click event in Stack Layout or Frame <Frame Grid.Column="0" BackgroundColor="#ffffff" Grid.Row="0" HasShadow="true" OutlineColor = "Black"> </Frame> <StackLayout Grid.Column="0" BackgroundColor="#313FA0" Grid.Row="0"> </StackLayout> ...

WPF bindings do not pick up any changes


c#,wpf,xaml,mvvm,inotifypropertychanged
In my WPF application, I have some properties which I have bound to the XAML counterpart, but for some reason do not get set whenever their values change. I have implemented the INotifyPropertyChanged interface as well as set my DataContext for this View too, and it is still not picking...

Items inside custom panel not getting arranged properly


c#,wpf,xaml
Hello I need a view with multiple columns and variable height rows. I have written a custom WrapPanel which is working properly if its children are explicitly given. The problem arises when I provide an ItemsControl with UserControl in the DataTemplate as the WrapPanel's child. My CustomWrapPanel: public class NewsFeedPanel...

Html5 input type number formatting


android,iphone,html5,windows-phone-8,input
I have this page where i use the input type number. so that it will show the numeric keyboard on wp, android and ios device . But my problem is that if the user use a culture info on the device for. lets say Denmark. the numeric keyboard shown use...

WPF Rotate an Image and align it


wpf,xaml,rotation,rendertransform
I've an Image component where I want to rotate the source : <Image Name="ImageTarget" HorizontalAlignment="Left" VerticalAlignment="Top" Stretch="Uniform" RenderTransformOrigin=".5,.5"> <Image.RenderTransform> <TransformGroup> <ScaleTransform ScaleX="{Binding Main.BindedViewMode, Converter={StaticResource ImageSizeConverter}}" /> <ScaleTransform ScaleY="{Binding Main.BindedViewMode, Converter={StaticResource ImageSizeConverter}}" /> <RotateTransform Angle="-90" /> </TransformGroup>...

WPF expander not expanded above buttons make buttons unclickable


wpf,xaml,clickable,expander
In a WPF form, I have an expander that expands above other controls, such as buttons : <Expander Grid.Row="0" Panel.ZIndex="99" Name="searchMenuExpander" Header="Search menu" FontWeight="Bold" HorizontalAlignment="Stretch" Margin="10,10,0,0" MinWidth="510" MinHeight="200" VerticalAlignment="Top" Foreground="MidnightBlue" Cursor="Arrow"> <Grid Background="White"> <Border HorizontalAlignment="Stretch" VerticalAlignment="Stretch" /> <TextBlock Text="Name" HorizontalAlignment="Left" VerticalAlignment="Top"...

C# XAML - How to add a combobox to some datagrid ROWS but not others?


c#,wpf,xaml,datagrid,combobox
I'm using a key/value observable collection to hold data which is represented in the view by a two column datagrid. Some key values contain a list of items and other key values contain a single string value. Using the below code snippet I'm able to display those key values with...

Change default bitmap in CheckBox


c#,wpf,xaml
I find solution Setter.TargetName does not work against an element from the BasedOn setting. But I do not understand how prement him to me. I have a class: public class MyCheckBox: CheckBox { public bool DefaultValue { get { return (bool)GetValue(DefaultValueProperty); } set { SetValue(DefaultValueProperty, value); } } public static...

Is it possible to concactenate a DataBound value with a constant string in XAML DataBinding?


c#,xaml,windows-phone
To bind a value to a TextBlock we use the following syntax to display an <ItemName> property of a bounded object. <TextBlock Text="{Binding Path=ItemName}" /> But is there a syntax to use the above tag to concatenate the constant string 'Item' with the databounded property, in order display something like:...

change SystemTray Color in whole application - windows phone


windows-phone-8,windows-phone,system-tray
I want to change the SystemTray Background and Foreground color in whole application but I don't define a base page and now I can't change the color for each page. is there a way for changing the background and foreground color of SystemTray in whole application through App.xaml.cs

Filtering ObservableCollection with ICollectionView


c#,wpf,xaml,mvvm,data-binding
I have ObservableCollection binded to dataGrid and now I want to filter the presented data I see that I need to use ICollectionView but I am not sure how to add ICollectionView with my MVVM pattern. My code simplified looks following: public class MainViewModel : ViewModelBase , IBarcodeHandler { public...

WPF/XAML ResourceDictionary with blank space


c#,wpf,xaml
I am using af ResourceDictionary for translating <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:System="clr-namespace:System;assembly=mscorlib"> <System:String x:Key="NumStartsTotal">Total: </System:String> </ResourceDictionary> I access it like this: <TextBlock Text="{DynamicResource NumStartsTotal}" /> I would like the output to be "Total: " (with the blank space), but it comes out "Total:" (without the blank...

Back button closing app instead of going back on Windows Phone 8.1


vb.net,xaml,windows-phone-8.1
I've created a simple Windows Phone 8.1 app in Visual Studio 2013 and added 2 Basic Pages, along with some code to navigate to the second screen when a button on the first screen is clicked. Going to the second screen works fine, but when the hardware Back button is...

Get rid of Visual Studio Namespace error message


c#,.net,wpf,xaml,namespaces
this is unfortunately a very beginner question: I am doing the very simple WPF tutorials and I am stuck on a namespace problem. I want to do a simple hierarchical treeview binding on a custom object according to the tutorial. I put the object into a custom namespace "MyNameSpace" and...

windows phone 8.1: Hide stackpanel if textblock is empty


c#,xaml,windows-phone-8,windows-phone-8.1,visualstatemanager
my xaml code is given below my whole xaml <Page x:Class="App13.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:App13" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" xmlns:converter="using:App13" Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> <Page.Resources>...

Datagrid inside a Custom control is not updating


c#,wpf,xaml,datagrid
In my Custom Control that have a DataGrid and two buttons, one for add rows in this DataGrid and other button to remove elements. (because of my reputation I can not post an image here, sorry!) :-( My Custom Control code behind: /// <summary> /// Interaction logic for UserControl1.xaml ///...

Add image to the radio button


c#,wpf,xaml
<StackPanel Name="StpAddDel" Orientation="Horizontal" HorizontalAlignment="Right" Margin="5"> <RadioButton Name="rdbactive" Content="Active" GroupName="actinact" VerticalAlignment="Center" Margin="5,0" Width="50" Height="15" Foreground="Blue"/> <RadioButton Name="rdbinactive" Content="InActive" GroupName="actinact" VerticalAlignment="Center" Margin="5,0" Width="60" Height="15" Foreground="Blue"/> <Button Name="BtnAdd" Height="20" Width="20" Margin="5,0" Template="{StaticResource AddImgBtnTemplate}" />...

Style vs inline property setting in silverlight with a custom control


c#,wpf,xaml,silverlight
I have a custom silverlight control that is pretty much a glorified text box. I have some properties in it I need to be able to set from the XAML in silverlight, so for each property I have created something like this: public bool UseCustomTooltips { get { return _useCustomTooltips;...

Backbutton press navigates to two page backward in Windows Phone App


c#,xaml,windows-phone-8
In my windows phone app sometimes it takes me two page backward although I pressed hardware back button just once. To handle the back button I used following code snippet: private void HardwareButtons_BackPressed(object sender, BackPressedEventArgs e) { e.Handled = true; if (Frame.CanGoBack) Frame.GoBack(); } And in OnNavigatedTo() method I added...

while Inherit style in WPF it affect parent style


c#,xaml,styles,wpf-controls
In WPF i have a style for the control like below, <Style TargetType="local:CustomControl"> <Setter Property="Background" Value="Transparent" /> <Setter Property="BorderBrush" Value="Gray" /> <Setter Property="BorderThickness" Value="0,0,0,1" /> <Setter Property="Padding" Value="3,0,3,0" /> <Setter Property="IsTabStop" Value="False" /> <Setter Property="VerticalContentAlignment" Value="Center" /> </Style> Now i need to override customcontrol border for some other place like...

How can i make this CommandParameter work?


c#,wpf,xaml,binding,commandparameter
I've been learning WPF in college this semester but there are still some things I do not fully understand. I have the following code: <UserControl x:Class="Reversi.SquareControl" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" mc:Ignorable="d" d:DesignHeight="48" d:DesignWidth="48"> <Button Command="{Binding Place}"...

HorizontalContentAlignment does not appear


wpf,xaml
I have the following code in my .xaml: <StackPanel Orientation="Horizontal" DockPanel.Dock="Top" Background="Yellow" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,2,2,0" Name="MainButtonsPanel" Width="100" > <Button Name="ButtonSaveChanges" Background="LightGray" Width="100" Height="{Binding RelativeSource={RelativeSource Self}, Path=ActualWidth}" Command="{Binding MyCommand}" CommandParameter="{Binding}" Visibility="Visible" /> <Button Name="ButtonEdit" Background="Gray" Width="100"...

windows phone: deserialise and store both json key and value to modal


c#,windows-phone-8,windows-7,windows-phone-8.1,json-deserialization
Hello guyzzzz i want to store both key and value in modal class...below is my json.. { "Example": [ { "Invoice": { "TFDGFF": " 200", "BF": " 200", "MD": "10", "EFM": " 12", "ATT": "4" }, "TF": "200" }, { "Invoice": { "DF": " 49", "DR": " 49", "KJ": "4",...

Zoom into ListView contents without also scaling scroll bars


c#,wpf,xaml,scaletransform
I have a GridView in a ListView. I want to add a Ctrl+MWheelUp zoom to the contents. I've achieved the zoom part using a ScaleTransform with the below code, however, as this is applied to the ListView as a whole, it also scales the scroll bars. Ideally, I'd like scrollbars...

BooleanToVisibilityConverter works on Textblock and not on UserControl


wpf,xaml,binding,windows-phone-8.1
I'm working on a windows phone project. There is something i don't really understand about my xaml. Here it is: <Page x:Class="CitiBox.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:converters="using:CitiBox.Converters" xmlns:views="using:CitiBox.Views" mc:Ignorable="d" Background="{ThemeResource...

Slider progress bar with MediaElement Windows Phone 8.1


c#,xaml,slider,windows-phone-8.1,mediaelement
I am working within a Windows Phone 8.1 (non SilverLight) application. I have a MediaElement AudioPlayer that plays audio files. I also have a Slider AudioPlayerSeek that I want 'hooked' to the MediaElement, so that it moves as the audio is playing. I have gone through this tutorial word for...

Multiple screen support Windows Phone 8


c#,button,windows-phone-8,background-image
I used to develop for Android and iOS, and for multiple screen support we use to use mdpi, hdpi, xhdpi. Now I want to develop for Windows Phone, I want to set a background to a button and I don't know how to define image size to support all screen...

Overlapping Items in WPF ItemsControl


c#,wpf,xaml,user-interface,datatemplate
I am having a problem with DataTemplates used in a WPF ItemsControl. I want to be able to "bring forward" any of the items in the list so that they are on top of everything else in the list, but haven't had any luck. Here's a simple example that illustrates...

Why has my Windows Phone Dev Centre Dashboard stopped reporting downloads?


windows-phone-8,windows-phone
All of my applications report in as published and up, however, I've gone from 60+ daily downloads to absolutely zero across all applications for several days straight. This seems very odd and more like an error in MS reporting on dev.windowsphone.com. Does anyone know why this may have happened? Is...