-
-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
stylingProblems related to styling (e.g. a control is not displayed)Problems related to styling (e.g. a control is not displayed)
Description
The title says it all. The DataGrid from the Avalonia.Controls.DataGrid library doesnt show up at all on the UI.
CollectionsPage.axaml:
<Panel>
<DataGrid x:Name="Data">
<DataGrid.Columns>
<DataGridTextColumn Header="First Name" />
<DataGridTextColumn Header="Last Name" />
</DataGrid.Columns>
</DataGrid>
</Panel>
MainWindow.axaml:
<Design.DataContext>
<vm:MainWindowViewModel />
</Design.DataContext>
<PleasantWindow.TitleBarContent>
<TextBox VerticalAlignment="Center"
HorizontalAlignment="Stretch"
Margin="50, 0, 50, 0"
Watermark="Search for a collection" />
</PleasantWindow.TitleBarContent>
<NavigationView IsOpen="False"
SelectionMode="AlwaysSelected"
Header="{x:Null}"
BindWindowSettings="True">
<NavigationViewItem x:Name="CollectionsScreenPage"
IsSelected="True"
Header="Collections"
Icon="{StaticResource HomeScreenRegular}" />
<NavigationViewItem x:Name="SettingsScreenPage"
Header="Settings"
DockPanel.Dock="Bottom" Margin="0 0 0 5"
Icon="{StaticResource SettingsRegular}" />
<Panel />
</NavigationView>
MainWindow.axaml.cs:
public partial class MainWindow : PleasantWindow
{
public MainWindow()
{
InitializeComponent();
CollectionsScreenPage.FuncControl += Ioc.Default.GetRequiredService<CollectionsPage>;
SettingsScreenPage.FuncControl += Ioc.Default.GetRequiredService<SettingsPage>;
Closing += OnClosing;
}
protected override void OnApplyTemplate(TemplateAppliedEventArgs e)
{
base.OnApplyTemplate(e);
if (OperatingSystem.IsMacOS())
{
EnableTitleBarMargin = true;
TitleBarType = PleasantTitleBarType.Classic;
}
Ioc.Default.GetRequiredService<MainWindowViewModel>().NotificationManager = new PleasantNotificationManager(this)
{
Position = NotificationPosition.TopRight,
MaxItems = 3,
ZIndex = 1
};
}
private void OnClosing(object? sender, WindowClosingEventArgs e)
=> PleasantSettings.Instance.Save();
}
Metadata
Metadata
Assignees
Labels
stylingProblems related to styling (e.g. a control is not displayed)Problems related to styling (e.g. a control is not displayed)