Closed veldfolds closed 1 year ago
Hi @veldfolds. We have added the "s/needs-repro" label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. See more details about creating repros here: https://github.com/dotnet/maui/blob/main/.github/repro.md
This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.
This issue has been automatically marked as stale because it has been marked as requiring author feedback to reproduce the issue but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.
Description
Placing control templates in the app dictionary leads to a lot of problems I haven't even bothered trying placing them in other pages "DRY". If it builds in debug in release, launching the app makes it to crash. In some cases in debug mode the control templates fail to render when instantiated in other views. I am using .NET 7 perhaps i'll have to switch back to 6
Steps to Reproduce
<?xml version = "1.0" encoding = "UTF-8" ?> <Application xmlns="http://schemas.microsoft.com/dotnet/2021/maui" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:local="clr-namespace:Trex" x:Class="Trex.App">
</Application
namespace Trex { class GroundSwitch : ContentView { public static readonly BindableProperty SwitchLabelTextProperty = BindableProperty.Create(nameof(SwitchTextLabel), typeof(string), typeof(GroundSwitch));
}
<?xml version="1.0" encoding="utf-8" ?> <ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:local="clr-namespace:Trex" x:Class="Trex.VoilaPage" Title="VoilaPage">
only the grid will show up in the content page when built but the label defined in the control template is MIA
Link to public reproduction project repository
NA
Version with bug
7.0 (current)
Last version that worked well
6.0.312
Affected platforms
Android, Windows
Affected platform versions
Android 11, Windows 10 19044.2075
Did you find any workaround?
No response
Relevant log output
No response