Where to add the images physically in the Xamarin-forms application? - xamarin.forms

How and where to physically add images into a Xamarin crossplatform solution ? I have a WPF project + android + iOS projects and I have a listview control in the MainPage.xaml (in the WPF project). Each listviewitem should show an image and a text description. But I don't know how and where to physically put images in the Xamarin project explorer ? I am asking for the physical location in the solution explorer. I am using VS2019.
I am planning to show these item images in the XAML. Please throw some light on this issue.
Thanks.

Related

Visual Studio 2022 Enable Web Live Preview

I wanted to try developing a website in VS but I'd really like a visual (WYSIWYG) editor. Apparently, this is available in VS. In that video, and lots of other videos and websites, it shows 'Design' and 'Split' buttons on the window, which should show a live view of the web page that's open. It seems this is supposed to work with both .aspx and .cshtml files.
However, nowhere can I find how to enable this, and I've done a lot of searching. I've even uninstalled and reinstalled VS. There are no options, settings or menu options to enable it. I'm using VS 2022 Community, fully up to date, in an ASP.NET Core Web App project using .NET 7.0.
Does anyone know what's wrong? I wondered if it was only available in VS Professional/Enterprise, but seemed silly to me.
that feature in the brand new vs2022 is for ONLY .net framework, and ONLY for web forms.
So, if you using MVC, then you don't have a forms designer.
And if you using .net core, then you can't use this feature either.
So, when you create a project, it MUST be .net framework (not .net core), and it MUST be a webforms project, and NOT MVC projects.
So, that would be say this (for c#).
And (best choice) would of course be this template:
And if using vb.net, then again, same thing:
So, web projects, and .net framework - NOT .net core projects.
thus:
So, out of those templates, then again, of course a asp.net web application would be the preferred choice.
so, for example, here is a gridview in "live" preview, and yes you can edit or drag + drop controls into that live preview.
it looks like this (split screen for example).
but, if I run the page, same in a chrome based browser (Edge, or chrome).
Then I see this:
Since the new designer is based on the chrome engine then as above shows, yes, it is rather cool.
Here is that web page, not split view in the designer:
(so I have NOT yet hit f5 to run, but only am in design mode)
so, in old legacy designer, I would see/get this:
So, note how do you DO NOT see say for example the bootstrap menu bar.
But, if I turn on live preview, and now I see/get this:
Note how we now even see the bootstrap menu bar in the preview - I have not yet hit f5 to run in browser. And on the bottom, you see a "bread-crumb hierarchy" as to what element you clicked on (very much like f12 debug tools in a browser, and then using "elements" selection).
You can find it by creating an asp.net web (.Net Framework) and selecting Web Form in it.
I use vs2022 17.4.2 community version
You can also view its settings in the tool.

Visual Studio Xamarin Forms not showing Design View

I am using visual studio 2019 community v16.8.6 and xaml design view shows me only this banner of hot reload.
I have double checked to see if hot reload and xaml designer is enabled.
Any idea why I cannot see my xaml rendered in design view? Any help is appreciated
Looks like this is a known limitation.

How to add Windows Media Player to Toolbox

I am doing asp.net web application that will play the media on the website.
I am trying to add Windows Media Player tools on Toolbox but when I try to add I have:
"The following controls were successfully added to the toolbox but are not enabled in the active designer:
Windows Media Player
Make sure the controls to add are compatible with the current designer and .NET Framework version.
"
Make sure that the latest version of the Player and the Player SDK is installed on your machine.
Install and register the PIA. For more information, see Registering Primary Interop Assemblies for Application Development.
Start a new project in Visual Studio .NET.
From the Tools menu, select Customize Toolbox.
In the COM Components tab, click on the check box for Windows Media Player item to select the Player. Click OK to close the dialog and add the Player to the Toolbox.
At the start of your project, make sure you are using the right .NET Framework version. Select the Windows Form app with the VB logo on the corner of it, and use .NET Framework 4.5. I'm running Visual Studio 2019 and it works fine for me.

Xamarin.Forms Previewer does not show up in Visual Studio Enterprise 2017

I am developing app using Xamarin in Visual Studio Enterprise 2017. I go to View -> Other Windows but there is no Xamarin.Forms Previewer. I am pretty sure It was still here last night.
Screenshot
Does anyone know what is happening? Thank you very much.
so I figured it out myself. It's kind of easy. I am posting here just in case someone will need it in the future. We just need to go to Tools -> Extensions and Updates and then enable Xamarin.forms Previewer and done!
In VS 2017, Xamarin.Forms Previewer is attached to the editor window. Just we need to expand by clicking on Expand Pane button as shown in the image.
.

In WPF control - display a UWP app

https://learn.microsoft.com/en-us/windows/uwp/porting/desktop-to-uwp-extend
This explains a process of showing a UWP app in a separate window than the WPF app. Is it possible to display them in the same window? Eg. display the UWP app inside a WPF control. Or even better : display a UWP control inside a WPF control.
Things have changed and Windows now supports hosting UWP controls inside Win32 applications such as WPF or Windows Forms.
You can find documentation on XAML islands and the hosting process on https://learn.microsoft.com/en-us/windows/uwp/xaml-platform/using-the-xaml-hosting-api. The article also references sample apps that should help you get started.
I consulted your issue with our team, and as Steven Wick mentioned:
It is currently not possible to display WPF and UWP UI/controls within the same window. A Desktop Bridge app can contain both WPF and UWP components, but their UI will need to reside in separate windows.
It seems like the UI betwwen WPF and UWP can't be mixed stuff, they may in different technologies.

Resources