using System.Collections.Generic;
using Xamarin.Forms;
namespace FirstApp.Renderers
{
public partial class CustomExpansibleMenu : ContentView
{
public CustomExpansibleMenu()
{
//Error here
InitializeComponent();
}
}
}
< /code>
a xaml.cs Унаследование со страницы содержимого: < /p>
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using FirstApp.Services;
using Xamarin.Essentials;
using Xamarin.Forms;
namespace FirstApp.Pages
{
public partial class ChatMenuPage : ContentPage
{
private NavigationService navigation;
public static double numPixelsW;
public static double numPixelsH;
public ChatMenuPage()
{
numPixelsH = DeviceDisplay.MainDisplayInfo.Height / DeviceDisplay.MainDisplayInfo.Density;
numPixelsW = DeviceDisplay.MainDisplayInfo.Width / DeviceDisplay.MainDisplayInfo.Density;
navigation = new NavigationService();
//Error here
InitializeComponent();
//Another error here, searchBox is the name of a frame in my xaml page, but //I cant access to it because of the previous error
searchBox.BorderWith = 3;
}
}
}
< /code>
Это общие решения, которые я пробовал: < /p>
- Убедитесь, что сборка Xaml Msbuild: updateSigntimexaml
Подробнее здесь: https://stackoverflow.com/questions/626 ... rent-conte