Fixed and compiling
This commit is contained in:
parent
3985395141
commit
2faae1167b
2 changed files with 4 additions and 4 deletions
|
@ -134,7 +134,7 @@
|
|||
<Button Grid.Column="1" Command="{Binding ToggleFunctionsCommand}" Margin="0,0,6,0" MinHeight="40" MinWidth="40"
|
||||
AutomationProperties.Name="Toggle functions panel">
|
||||
<Button.Flyout>
|
||||
<Flyout x:Name="FunctionsFlyout"
|
||||
<Flyout
|
||||
IsOpen="{Binding IsFunctionsPanelOpen, Mode=TwoWay}"
|
||||
Placement="BottomEdgeAlignedLeft"
|
||||
Opened="OnFunctionsFlyoutOpened"
|
||||
|
|
|
@ -95,12 +95,12 @@ public partial class MainView : UserControl
|
|||
|
||||
private void OnFunctionsItemTapped(object? sender, TappedEventArgs e)
|
||||
{
|
||||
if (sender is not IControl control)
|
||||
if (sender is not Control control)
|
||||
return;
|
||||
if (control.DataContext is not FunctionDefinitionItem item)
|
||||
{
|
||||
// If attached to panel root, walk up from the source to a ListBoxItem and use its DataContext
|
||||
if (sender is IVisual root && e.Source is IVisual src)
|
||||
if (sender is ContentPresenter root && e.Source is ContentPresenter src)
|
||||
{
|
||||
var lbi = src.FindAncestorOfType<ListBoxItem>();
|
||||
if (lbi?.DataContext is not FunctionDefinitionItem rowItem)
|
||||
|
@ -126,7 +126,7 @@ public partial class MainView : UserControl
|
|||
// Flyout content is rendered in a popup; find by name at TopLevel
|
||||
var top = TopLevel.GetTopLevel(this);
|
||||
if (top is null) return;
|
||||
var panel = top.FindDescendantOfType<Border>(b => b.Name == "FunctionsPanelRoot");
|
||||
var panel = top.FindControl<Border>("FunctionsPanelRoot");
|
||||
if (panel is null) return;
|
||||
|
||||
// Attach a single tap handler to the flyout content root
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue