Closed HamidLaktarash closed 2 months ago
few days ago I debug your code and I find out FlyleafME.cs in Initialize() method:
popUpMenu = ((FrameworkElement)Overlay.Template.FindName("PART_ContextMenuOwner", Overlay))?.ContextMenu;
dialogSettings = (DialogHost)Overlay.Template.FindName("PART_DialogSettings", Overlay);
both variable evaluate with NULL Reason? I can`t understand
below code is your FlyleafME.xaml
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:fl="clr-namespace:FlyleafLib.Controls.WPF;assembly=FlyleafLib"
xmlns:flwpf="clr-namespace:FlyleafLib.Controls.WPF">
<Style x:Key="FlyleafMEDefault" TargetType="{x:Type flwpf:FlyleafME}" BasedOn="{StaticResource {x:Type fl:FlyleafHost}}">
<Setter Property="KeyBindings" Value="Both"/>
<Setter Property="OverlayTemplate">
<Setter.Value>
<ControlTemplate>
<Border>
<Border.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/FlyleafLib.Controls.WPF;component/Resources/MaterialDesign.xaml"/>
<ResourceDictionary Source="pack://application:,,,/FlyleafLib.Controls.WPF;component/Resources/Converters.xaml"/>
<ResourceDictionary Source="pack://application:,,,/FlyleafLib.Controls.WPF;component/Resources/PopUpMenu.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Border.Resources>
<Grid x:Name="PART_ContextMenuOwner" ContextMenu="{StaticResource PopUpMenu}">
<!--Pop Up Dialog (Settings/Set Values)-->
<materialDesign:DialogHost x:Name="PART_DialogSettings" OverlayBackground="{x:Null}"/>
<!--Debug Info-->
<fl:PlayerDebug VerticalAlignment="Center" HorizontalAlignment="Center" Player="{Binding Player}" BoxColor="#AA000000" HeaderColor="White" InfoColor="{DynamicResource MaterialDesign.Brush.Primary.Light}" ValueColor="{DynamicResource MaterialDesign.Brush.Secondary.Light}" Visibility="{Binding ShowDebug, Converter={StaticResource BooleanToVisibility}, FallbackValue=Collapsed, TargetNullValue=Collapsed}"/>
<!--Flyleaf Bar-->
<flwpf:FlyleafBar Player="{Binding Player}"/>
</Grid>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
Hello bro. see reported bug in your own project: Please run Tests\FlyleafMultiPlayer (WPF) project Settings and popupMenu does not open. My Target RunTime is .NET6
This caused by this commit https://github.com/SuRGeoNix/Flyleaf/commit/ca20c51a564c4f7dde0dc476f6761a131626e923 I will review this
currently I use 3.7.28 version. in my app, I use bellow
<flwpf:FlyleafME x:Name="flyleafControl" Player="{Binding Player}"/>
which load FlyleafLib.Controls.WPF\Themes\FlyleafME.xaml as default Video View I don`t want use your custom Video View in MainWindow.xaml that contains more feature like Messages, Status, Subtitles everything works fine.now I update to 3.7.50. with your custom Video View in MainWindow.xaml everything is OK. below code is your code in MainWindow.xaml:
but in this new version (3.7.50) when I replace your custom Video View with
<flwpf:FlyleafME x:Name="flyleafControl" Player="{Binding Player}"/>
Settings Dialog and Popup Menu does not show. other feature works fine. in 3.7.28 version this problem does not exist. if you want, I can send you my project!!! To understand my problem better