Repository navigation
Closed
Labels
kind/bugSomething isn't workingplatform/ios 🍎Categorizes an issue or PR as relevant to the iOS platform
Description
<Page
x:Class="UnoControlsSample.Shared.Controls.CommandBarPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:UnoControlsSample.Shared.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ios="http://uno.ui/ios"
xmlns:android="http://uno.ui/android"
xmlns:xamarin="http://uno.ui/xamarin"
mc:Ignorable="d ios android xamarin"
x:Name="CurrentPage"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<ListView Grid.Row="1" x:Name="recipes" ItemsSource="{x:Bind Users}" Padding="5" Margin="0,20,0,0"
HorizontalContentAlignment="Stretch"
SelectionMode="None"
IsItemClickEnabled="True"
>
<ListView.ItemContainerStyle>
<Style TargetType="ListViewItem">
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="Padding" Value="0" />
<Setter Property="Margin" Value="0" />
</Style>
</ListView.ItemContainerStyle>
<ListView.ItemTemplate>
<DataTemplate>
<Button Margin="0,5" Content="test command" Command="{Binding DataContext.TestCommand,ElementName=CurrentPage}"/>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</Page>
I'm submitting a...
Using {Binding DataContext.TestCommand,ElementName=CurrentPage} in ListView is not recognized and can take effect in Android and UWP
Current behavior
Expected behavior
Minimal reproduction of the problem with instructions
Environment
Nuget Package:
Package Version(s):
Affected platform(s):
- [x] iOS
- [ ] Android
- [ ] WebAssembly
- [ ] Windows
- [ ] Build tasks
Visual Studio
- [x] 2017 (version: )
- [ ] 2017 Preview (version: )
- [ ] for Mac (version: )
Relevant plugins
- [ ] Resharper (version: )
Reacted by abrull
Metadata
Metadata
Assignees
Labels
kind/bugSomething isn't workingplatform/ios 🍎Categorizes an issue or PR as relevant to the iOS platform
Activity
HaoLife commentedon Apr 10, 2019
@jeromelaban External members are bound in ListView, and member bindings outside ListView cannot be used in IOS as long as they are in ListView. Can we follow up on this issue?
Example
HaoLife commentedon Apr 13, 2019
NameScope.FindInNamescopes
ListViewItem can't find the upper object after reloading parent.GetParent (), but can't find the bound object after reloading.
HaoLife commentedon Apr 13, 2019
@jeromelaban The reason is that the Parent object is not a DependencyObject object, and the object first loaded is Windows.UI.Xaml.Controls.BlockLayout and then loaded again into the UIKit.UIView object.
davidjohnoliver commentedon Aug 8, 2019
fixed by #1064