Tôi gặp sự cố khi tạo điều khiển xaml. Tôi đang viết dự án mới trong VS 2015 trong ứng dụng toàn cầu. Tôi muốn tạo lưới. Trong lưới này tôi muốn có một nút. Trong mô hình tôi specifi cột (Level) và Row. đây là mã của tôi:UWP Binding in Style Setter không hoạt động
<ItemsControl Grid.Row="1" ItemsSource="{Binding Path=TechnologyList}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="10*"/>
<RowDefinition Height="10*"/>
<RowDefinition Height="10*"/>
<RowDefinition Height="10*"/>
<RowDefinition Height="10*"/>
<RowDefinition Height="10*"/>
<RowDefinition Height="10*"/>
<RowDefinition Height="10*"/>
<RowDefinition Height="10*"/>
<RowDefinition Height="10*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="14*"/>
<ColumnDefinition Width="14*"/>
<ColumnDefinition Width="14*"/>
<ColumnDefinition Width="14*"/>
<ColumnDefinition Width="14*"/>
<ColumnDefinition Width="14*"/>
<ColumnDefinition Width="14*"/>
</Grid.ColumnDefinitions>
</Grid>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemContainerStyle>
<Style TargetType="Control">
<Setter Property="Grid.Column" Value="{Binding Level}" />
<Setter Property="Grid.Row" Value="{Binding Row}" />
</Style>
</ItemsControl.ItemContainerStyle>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Button Content="{Binding Name}"/>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
tôi nhận được một lỗi trong dòng <Setter Property="Grid.Column" Value="{Binding Level}" />
Các lỗi: ngoại lệ từ HRESULT: 0x8000FFFF (E_UNEXPECTED) là trong edytor không chạy mã. Có gì sai? Trong "cũ" WPF mọi thứ đều OK nhưng trong Universal App cho Windows 10 tôi có một lỗi. Có ai giúp tôi không?
Tôi có thể làm điều gì đó như thế này n UWP? – Babel