Where can I find Generic.xaml for universal apps - xaml

I'm looking for the complete Generic.xaml for Universal apps.
Currently I've located these two on my PC for Windows Phone 8.1 and Windows Store 8.1:
C:\Program Files (x86)\Windows Phone Kits\8.1\Include\abi\Xaml\Design\Generic.xaml
C:\Program Files (x86)\Windows Kits\8.1\Include\winrt\xaml\design\Generic.xaml
Can someone point me in the right direction with where to find the shared generic.xaml and maybe even some documentation on MSDN on this?

Answer:
The files referred above is actually the ones used by Universal apps for standard styling. However it's important to note that these can't be overwritten by using a modified version of the file included in the project in a folder named themes, nor by creating a normal resourcedictionary and here in create resources using the same key.

Related

Interop dll referencing other dll

I am using bPAC SDK provided by Brother for their label printer. I downloaded their SDK, took a bpac.dll file and put it inside my projects folder then referenced it. Everything works fine until I deploy my app to IIS server because, as it turns out, that bpac.dll is referencing another .dll in C:\Program Files\Common Files\Brother folder and IIS does not have required permissions to access that file. This is VERY strange, and strange is that the bpac.dll in my Visual Studio is marked as Interop, whatever it means. How to solve this? How impot all the .dlls to my project so it doesn't need to access files in system folders?

Copy to AppX output directory with Visual Studio 2013 (WinRT app)?

I have a WinRT app built with VS2013 using C#. It uses SQLite so it needs the sqlite3.dll included in the project to be in the output directory. I included that DLL in my project and set it to always copy to the output directory. The problem is VS2013 copies it to the Debug directory, but not the AppX directory underneath Debug, which appears to be the WinRT output directory. Because of the the app fails because it can't find sqlite3.dll, which is up in the parent Debug directory instead of the AppX directory.
For now I'm just hand-copying the DLL into the AppX directory. What's the best way to fix this problem so that the DLL is copied to the correct directory?
In your project's Properties window choose Build Events tab. On Post-build window include similar string (please, mind to change the path to sqlite3.dll):
xcopy /Y $(ProjectDir)3DParties\sqlite3\$(PlatformName)\sqlite3.dll $(TargetDir)AppX\
Or even better option. This page https://www.sqlite.org/download.html contains section named "Precompiled Binaries for Windows Runtime" where you can download VSIX package. When you install this package into your system, you can simply reference sqlite3.dll for all target platforms (ARM, x86, x64) including all necessities automatically like this: Add Reference -> Windows 8.1 -> Extensions -> SQLite for Windows Runtime (Windows 8.1)
I can't be sure this is the "right" solution, but I set the file's property to Content/Copy-if-newer.
THEN what I've found is that if the AppX directory is already there, VS doesn't update it, just as you describe above, BUT if you delete the Appx directory then VS will create it from scratch and add the necessary files.
Not as good as having everything automated, but beats hand-copying.

StandardStyles.xaml for WindowsPhone

When creating a Windows Store App from VS templates there is the Common/StandardStyles.xaml, including predefined styles, e.g. for buttons that look like the ones in the app bar. (see here)
Does anything like that exist for windows phone 7/8? For instance where do all those static resources like PhoneTextExtraLargeStyle come from?
On my system they're installed in C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v8.0\Design (and in the Dark and Light subfolders)
If you're looking for documentation on the builtin styles, Microsoft has a good list here.

How are the XAP files structured?

Questions:
Are XAP files self-contained?
Do they link in all DLLs I have referenced in the project?
If I need to distribute my app, is all I have to do is hand someone the XAP file?
By default, yes. For alternatives, see answer 3.
By default, all except the core DLLs installed by the runtime; it will contain anything from the SDK, Toolkit, 3rd party controls, or your own libraries.
By default, yes. However, there is an option as of Silverlight 3 to package certain assemblies (for example anything from the SDK) into separate ZIP files, which are downloaded separately. In Visual Studio, look in the project properties for a checkbox called "Reduce XAP size by using application library caching." This option toggles whether to create/use the ZIP files or not. Enabling the ZIP option allows multiple Silverlight apps to share the dependency on the ZIP files, so that instead of packaging everything into the XAP every time, you just download the ZIP for one app, and it's saved in the browser cache for other apps.
As for the general contents of the XAP file, there are 2 important bits:
Foo.dll - your project's main assembly (renamed as appropriate)
AppManifest.xaml - describes the requirements for you app, e.g minimum runtime version required, the entry point into Foo.dll, and other settings, including Out-of-browser settings, or whether to use the Library caching feature mentioned above.
Anything else is just content used by your app.
Silverlight XAP files can be tricky if you're using anything other the the core silverlight assemblies (eg. SilverlightToolkit).
XAP files are just zip files - open one up and take a look. They are self contained to the extent that any custom/extra dlls are included - the standard Silverlight assemblies will be installed when a user installs Silverlight.
References to dlls are required in the .proj files for every assembly that will be used. Ie. unlike other project types, if one project references another project, both projects need to reference all dlls used by either project.
You should be able to just hand someone the XAP file if you want - but Silverlight was designed to be used in browsers, so you will need to include the generated test page at least. The best, and most useful, is to provide a publicly accessible web page that hosts your silverlight app.
HTH.
Even though this question is already answered, i'm going to throw this one in too because it hasn't been mentioned yet.
You mention that you are using SL4 - if you are running out of browser (OOB) then you can just ship the XAP file, and use sllauncher.exe (2) to "install" it to the client machine. As part of that install you can also specify where updates are to be sourced from, which is important for when you find bugs or the requirements change.

How can i store multiple .ico files into a .DLL file

How can i store multiple .ico files into a .DLL file that can be opened and read from just like SHELL32.dll.
i am using it for a few .ico files that i am making that a few of my friends might want to use also, and it would be much nicer to use a .dll like SHELL32.dll.
i have:
office 2007 (the built in VB)
Visual studio 2010 express
i might still have some old verstion
of BASIC (command prompt programming)
i have windows 7 home premium 64bit
Create a DLL project in VS10. Edit resources. Add as many icons as you want.
Visual Studio should have a resource compiler that can bundle icons into exe or dll formats. You could probably use a wizard of some kind to create a new dll project, and then just stuff that with the icons.
Visual Studio Express might not be as capable. As an alternative, if you are up for it, MinGW has a resource editor, and MinGW is free.
I am not sure about the limited resource editing capabilities of VS2010 express, as I remember it was painful to add version information to resources under C++ Express Edition.
My quick research resulted in GConvert to be a suitable program that is unfortunately not free.
You could do that very easily using resource compiler tools like Resource Hacker or Resource Tuner. You can save them in .dll or .res formats