Однострочный элемент параметра запроса Мауи не будет работатьC#

Место общения программистов C#
Ответить
Гость
 Однострочный элемент параметра запроса Мауи не будет работать

Сообщение Гость »


наберите здесь
Привет всем, я прочитал множество прошлых выпусков, связанных с этой проблемой. Пока ничего не помогло. Вероятно, мне не хватает чего-то простого... Поэтому я подумал, что больше внимания к проблеме поможет. Вот что у меня есть:
На странице «Отношения» регулярно нажимается эта кнопка:

Код: Выделить всё

 public async void OnButton2Clicked(object sender, EventArgs args)
{
Routing.RegisterRoute("Relationships/RelationshipDetail", typeof(RelationshipDetail));

if(Sign1 != null | Sign2 == null)
{
Sign2 = getsign(rotate);
}
signs = Sign1 + "|" + Sign2;

await Shell.Current.GoToAsync($"Relationships/RelationshipDetail?signs={signs}");
}
Затем у меня есть страница «Подробности отношений»:

Код: Выделить всё

[QueryProperty(nameof(aSigns),"signs")]
public partial class RelationshipDetail : ContentPage
{
string asigns;
public string aSigns
{
get => asigns;
set
{
asigns = value;
OnPropertyChanged();
}
}
The route works, but the set method never gets invoked. I have not used other types of objects (dictionary or an object) as that seems pointless until I get some type of reaction from the details page. No model is involved here.
Here is the debug session, first breakpoint not hit.
I have went through most of the related issues here and nothing has worked. I have checked the Maui Xaminals sample code... that works fine... (looking at the cats / cats detail pages. The code there works, and the route, call and query property are setup almost identical. What's up with my code?


Источник: https://stackoverflow.com/questions/781 ... l-not-work
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «C#»