-
0>CreateBookPage_66850084b733a89173eb2b72f6e9d3ff.cs(213,30): Error CS1061 : 'Grid' does not contain a definition for 'Columns' and no accessible extension method 'Columns' accepting a first argument of type 'Grid' could be found (are you missing a using directive or an assembly reference?) <wct:DataGrid.Columns>
<wct:DataGridTextColumn Header="Plant Name"
Tag="PlantName"
Binding="{Binding PlantName, Mode=TwoWay}" />
<wct:DataGridTextColumn Header="Plants Count"
Tag="PlantsCount"
Binding="{Binding PlantsCount, Mode=TwoWay}" />
<wct:DataGridTemplateColumn Header="Fruit or Vegetable"
Tag="FruitOrVegetable">
<wct:DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding FruitOrVegetable}"
VerticalAlignment="Center"
Margin="8,0,0,0" />
</DataTemplate>
</wct:DataGridTemplateColumn.CellTemplate>
<wct:DataGridTemplateColumn.CellEditingTemplate>
<DataTemplate>
<ComboBox ItemsSource="{Binding FruitOrVegetableEnumValues}"
SelectedItem="{Binding FruitOrVegetable, Mode=TwoWay}"
HorizontalAlignment="Stretch" />
</DataTemplate>
</wct:DataGridTemplateColumn.CellEditingTemplate>
</wct:DataGridTemplateColumn>
<wct:DataGridTemplateColumn Header="Date Planted"
Tag="PlantDate">
<wct:DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding PlantDate, Converter={StaticResource StringFormatConverter}, ConverterParameter='{}{0:MM/dd/yyyy}'}"
VerticalAlignment="Center"
Margin="8,0,0,0" />
</DataTemplate>
</wct:DataGridTemplateColumn.CellTemplate>
<wct:DataGridTemplateColumn.CellEditingTemplate>
<DataTemplate>
<CalendarDatePicker Margin="3,4,3,3"
Date="{Binding PlantDate, Mode=TwoWay,Converter={StaticResource DateTimeToDateTimeOffset}}" />
</DataTemplate>
</wct:DataGridTemplateColumn.CellEditingTemplate>
</wct:DataGridTemplateColumn>
<wct:DataGridCheckBoxColumn Header="Has been watered?"
Tag="IsWatered"
Binding="{Binding IsWatered, Mode=TwoWay}" />
</wct:DataGrid.Columns>
<wct:DataGrid.RowDetailsTemplate>
<DataTemplate>
<StackPanel Spacing="8"
Margin="20,10">
<TextBlock Text="{Binding PlantName}" />
<TextBlock Text="{Binding PlantsCount}" />
<TextBlock Text="{Binding FruitOrVegetable}" />
<TextBlock Text="{Binding PlantDate}" />
<TextBlock Text="{Binding IsWatered}" />
</StackPanel>
</DataTemplate>
</wct:DataGrid.RowDetailsTemplate>
<ScrollViewer>
<StackPanel Spacing="4">
<StackPanel Orientation="Horizontal">
<AppBarButton Icon="Filter"
Label="Filter By">
<AppBarButton.Flyout>
<MenuFlyout>
<MenuFlyoutItem Text="Count > 10"
Tag="TenMore"
Click="FilterFlyoutItem_Click" />
<MenuFlyoutItem Text="Count < 10"
Tag="TenLess"
Click="FilterFlyoutItem_Click" />
<MenuFlyoutSeparator />
<MenuFlyoutItem Text="Watered"
Tag="IsWatered"
Click="FilterFlyoutItem_Click" />
<MenuFlyoutSeparator />
<MenuFlyoutItem Text="Fruit"
Tag="Fruit"
Click="FilterFlyoutItem_Click" />
<MenuFlyoutItem Text="Vegetable"
Tag="Vegetable"
Click="FilterFlyoutItem_Click" />
<MenuFlyoutSeparator />
<MenuFlyoutItem Text="Remove Filter"
Click="FilterFlyoutItem_Click" />
</MenuFlyout>
</AppBarButton.Flyout>
</AppBarButton>
<AppBarButton Label="Group By">
<AppBarButton.Icon>
<FontIcon Glyph="" />
</AppBarButton.Icon>
<AppBarButton.Flyout>
<MenuFlyout>
<MenuFlyoutItem Text="Fruit or Vegetable"
Tag="FruitOrVegetable"
Click="GroupByFlyoutItem_Click" />
<MenuFlyoutItem Text="Has been watered?"
Tag="IsWatered"
Click="GroupByFlyoutItem_Click" />
<MenuFlyoutSeparator />
<MenuFlyoutItem Text="Remove Filter"
Click="GroupByFlyoutItem_Click" />
</MenuFlyout>
</AppBarButton.Flyout>
</AppBarButton>
</StackPanel>
<MenuFlyoutSeparator Margin="0,-4,0,4" />
<muxc:NumberBox Value="{Binding Data.ColumnHeaderHeight, Mode=TwoWay}"
Minimum="4"
Maximum="999"
Header="ColumnHeaderHeight" />
<muxc:NumberBox Value="{Binding Data.MaxColumnWidth, Mode=TwoWay}"
Minimum="{Binding Data.MinColumnWidth, Mode=TwoWay}"
Maximum="999"
Header="MaxColumnWidth" />
<muxc:NumberBox Value="{Binding Data.MinColumnWidth, Mode=TwoWay}"
Maximum="{Binding Data.MaxColumnWidth, Mode=TwoWay}"
Minimum="0"
Header="MinColumnWidth" />
<CheckBox IsChecked="{Binding Data.AreRowDetailsFrozen, Mode=TwoWay}"
Content="AreRowDetailsFrozen" />
<CheckBox IsChecked="{Binding Data.AreRowGroupHeadersFrozen, Mode=TwoWay}"
Content="AreRowGroupHeadersFrozen" />
<CheckBox IsChecked="{Binding Data.CanUserSortColumns, Mode=TwoWay}"
Content="CanUserSortColumns" />
<CheckBox IsChecked="{Binding Data.CanUserReorderColumns, Mode=TwoWay}"
Content="CanUserReorderColumns" />
<CheckBox IsChecked="{Binding Data.CanUserResizeColumns, Mode=TwoWay}"
Content="CanUserResizeColumns" />
<CheckBox IsChecked="{Binding Data.IsReadOnly, Mode=TwoWay}"
Content="IsReadOnly" />
<ComboBox ItemsSource="{Binding Data.AvailableColors, Mode=OneTime}"
SelectedItem="{Binding Data.AlternatingRowForeground, Mode=TwoWay}"
Header="AlternatingRowForeground">
<ComboBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<Border BorderBrush="Gray"
BorderThickness="0.5"
CornerRadius="3">
<Rectangle Width="20"
Height="20"
RadiusX="3"
RadiusY="3"
VerticalAlignment="Center"
Fill="{Binding}" />
</Border>
<TextBlock Text="{Binding Color, Converter={StaticResource ColorNameToString}}"
VerticalAlignment="Center"
Margin="10,0,0,0" />
</StackPanel>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<ComboBox ItemsSource="{Binding Data.AvailableColors, Mode=OneTime}"
SelectedItem="{Binding Data.AlternatingRowBackground, Mode=TwoWay}"
Header="AlternatingRowBackground">
<ComboBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<Border BorderBrush="Gray"
BorderThickness="0.5"
CornerRadius="3">
<Rectangle Width="20"
Height="20"
RadiusX="3"
RadiusY="3"
VerticalAlignment="Center"
Fill="{Binding}" />
</Border>
<TextBlock Text="{Binding Color, Converter={StaticResource ColorNameToString}}"
VerticalAlignment="Center"
Margin="10,0,0,0" />
</StackPanel>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<ComboBox ItemsSource="{Binding Data.GridLinesVisibilityOptions}"
SelectedItem="{Binding Data.GridLinesVisibility, Mode=TwoWay}"
Header="GridLinesVisibility" />
<ComboBox ItemsSource="{Binding Data.HeadersVisibilityOptions}"
SelectedItem="{Binding Data.HeadersVisibility, Mode=TwoWay}"
Header="HeadersVisibility" />
<ComboBox ItemsSource="{Binding Data.SelectionModeOptions}"
SelectedItem="{Binding Data.SelectionMode, Mode=TwoWay}"
Header="SelectionMode" />
</StackPanel>
</ScrollViewer> |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
error line |
Beta Was this translation helpful? Give feedback.
-
Installed Package Name : Uno.CommunityToolkit.WinUI.UI.Controls |
Beta Was this translation helpful? Give feedback.
-
issue fixed by remove <DataTemplate>
<StackPanel Spacing="8"
Margin="20,10">
<TextBlock Text="{Binding PlantName}" />
<TextBlock Text="{Binding PlantsCount}" />
<TextBlock Text="{Binding FruitOrVegetable}" />
<TextBlock Text="{Binding PlantDate}" />
<TextBlock Text="{Binding IsWatered}" />
</StackPanel>
</DataTemplate> </wct:DataGrid.Columns> .Columns |
Beta Was this translation helpful? Give feedback.
issue fixed by remove
</wct:DataGrid.Columns>
.Columns