Fixed custom controls not responding to changes, fixed title bar interaciton

This commit is contained in:
Robert committed 2023-04-02 10:40:54 +02:00
1 parent 02e85af4af
commit 82b41425aa
20 files changed
+141 -120

No files matched your search

@@ -84,11 +84,7 @@
</paz:ZoomBorder>
<Border CornerRadius="0 0 8 0" VerticalAlignment="Top" HorizontalAlignment="Left" Background="{DynamicResource ControlFillColorDefaultBrush}">
<StackPanel Orientation="Horizontal" Margin="8">
<shared:ProfileConfigurationIcon ConfigurationIcon="{CompiledBinding ProfileConfiguration.Icon}"
Foreground="{DynamicResource ToolTipForeground}"
Width="18"
Height="18"
Margin="0 0 5 0" />
<shared:ProfileConfigurationIcon ConfigurationIcon="{CompiledBinding ProfileConfiguration.Icon}" Width="18" Height="18" Margin="0 0 5 0" />
<TextBlock Text="{CompiledBinding ProfileConfiguration.Name}" />
</StackPanel>
</Border>
@@ -3,15 +3,18 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:avalonia="clr-namespace:Material.Icons.Avalonia;assembly=Material.Icons.Avalonia"
xmlns:windowing="clr-namespace:FluentAvalonia.UI.Windowing;assembly=FluentAvalonia"
xmlns:profileEditor="clr-namespace:Artemis.UI.Screens.ProfileEditor"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="Artemis.UI.Screens.ProfileEditor.ProfileEditorTitleBarView">
<Grid ColumnDefinitions="Auto,*,Auto">
<ContentControl Grid.Row="0" Grid.Column="0" Content="{Binding MenuBarViewModel}" />
<!-- This border enables dragging the window in between the menu and the buttons-->
<Border Grid.Row="0" Grid.Column="1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Background="Transparent" IsHitTestVisible="False" />
<Button Grid.Column="2" Classes="title-bar-button" Command="{Binding ShowDebugger}" HorizontalAlignment="Right" VerticalAlignment="Top">
x:Class="Artemis.UI.Screens.ProfileEditor.ProfileEditorTitleBarView"
x:DataType="profileEditor:ProfileEditorTitleBarViewModel">
<Grid ColumnDefinitions="*,Auto">
<ContentControl Grid.Row="0" Grid.Column="0" Content="{CompiledBinding MenuBarViewModel}" windowing:AppWindow.AllowInteractionInTitleBar="True" HorizontalAlignment="Left" />
<Button Grid.Column="1" Classes="title-bar-button"
Command="{CompiledBinding ShowDebugger}"
HorizontalAlignment="Right"
VerticalAlignment="Top"
windowing:AppWindow.AllowInteractionInTitleBar="True">
<avalonia:MaterialIcon Kind="Bug" />
</Button>
</Grid>
@@ -3,9 +3,10 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:avalonia="clr-namespace:Material.Icons.Avalonia;assembly=Material.Icons.Avalonia"
xmlns:windowing="clr-namespace:FluentAvalonia.UI.Windowing;assembly=FluentAvalonia"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="Artemis.UI.Screens.Root.DefaultTitleBarView">
<Button Classes="title-bar-button" Command="{Binding ShowDebugger}" VerticalAlignment="Top" HorizontalAlignment="Right">
<Button Classes="title-bar-button" Command="{Binding ShowDebugger}" VerticalAlignment="Top" HorizontalAlignment="Right" windowing:AppWindow.AllowInteractionInTitleBar="True" >
<avalonia:MaterialIcon Kind="Bug"></avalonia:MaterialIcon>
</Button>
</UserControl>
@@ -25,7 +25,7 @@
Margin="10 2"
Items="{CompiledBinding SidebarScreens}"
SelectedItem="{CompiledBinding SelectedSidebarScreen}" />
<Separator Grid.Row="2" Margin="8" Height="1" Background="#FF6c6c6c" />
<Border Grid.Row="2" Margin="8" Height="1" Background="{DynamicResource ButtonBorderBrush}"></Border>
<!-- Categories -->
<ScrollViewer Grid.Row="3" VerticalScrollBarVisibility="Auto">
@@ -39,7 +39,7 @@
</ScrollViewer>
<!-- Bottom buttons -->
<Separator Grid.Row="4" Margin="8" />
<Border Grid.Row="4" Margin="8" Height="1" Background="{DynamicResource ButtonBorderBrush}"></Border>
<WrapPanel Grid.Row="5" Orientation="Horizontal" HorizontalAlignment="Left" Margin="5 0 5 5">
<controls:HyperlinkButton Classes="icon-button"
Width="44"
@@ -32,7 +32,7 @@
</Button>
<shared:HotkeyBox Watermark="Some hotkey" Width="250" HorizontalAlignment="Left" />
<controls1:NumberBox
attachedProperties:NumberBoxAssist.PrefixText="$"
attachedProperties:NumberBoxAssist.SuffixText="%">
@@ -44,6 +44,7 @@
</TextBox>
<TextBlock Classes="h4" Text="{CompiledBinding TestValue}"/>
<controls1:NumberBox Value="{CompiledBinding TestValue}"/>
<controls:DraggableNumberBox Value="{CompiledBinding TestValue}"/>
<controls:DraggableNumberBox Value="{CompiledBinding TestValue}" Classes="condensed"/>