Merge pull request #273 from irihitech/window
Ursa Window: The Window utilizing custom title bar.
This commit is contained in:
@@ -21,17 +21,9 @@
|
||||
</UserControl.Resources>
|
||||
<Panel>
|
||||
<Grid
|
||||
Classes.Blur="{Binding #host.HasModal}"
|
||||
ColumnDefinitions="Auto, *"
|
||||
RowDefinitions="Auto, *">
|
||||
<Grid.Styles>
|
||||
<Style Selector="Grid.Blur">
|
||||
<Setter Property="Effect" Value="blur(20)" />
|
||||
</Style>
|
||||
</Grid.Styles>
|
||||
ColumnDefinitions="Auto, *" >
|
||||
<Border
|
||||
Padding="8 4"
|
||||
Grid.RowSpan="2"
|
||||
VerticalAlignment="Stretch"
|
||||
Theme="{DynamicResource CardBorder}">
|
||||
<u:NavMenu Name="menu" ItemsSource="{Binding Menus.MenuItems}"
|
||||
@@ -89,22 +81,14 @@
|
||||
</u:NavMenu.Header>
|
||||
</u:NavMenu>
|
||||
</Border>
|
||||
<u:ThemeToggleButton
|
||||
Grid.Row="0"
|
||||
Grid.Column="1"
|
||||
IsThreeState="True"
|
||||
Mode="Controller"
|
||||
HorizontalAlignment="Right" />
|
||||
<ContentControl
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Margin="12"
|
||||
Margin="12 36 12 12"
|
||||
Content="{Binding Content}">
|
||||
<ContentControl.ContentTemplate>
|
||||
<converters:ViewLocator />
|
||||
</ContentControl.ContentTemplate>
|
||||
</ContentControl>
|
||||
</Grid>
|
||||
<u:OverlayDialogHost Name="host" SnapThickness="20" />
|
||||
</Panel>
|
||||
</UserControl>
|
||||
|
||||
@@ -1,17 +1,24 @@
|
||||
<Window
|
||||
<u:UrsaWindow
|
||||
x:Class="Ursa.Demo.Views.MainWindow"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:views="clr-namespace:Ursa.Demo.Views"
|
||||
xmlns:u="https://irihi.tech/ursa"
|
||||
xmlns:viewModels="clr-namespace:Ursa.Demo.ViewModels"
|
||||
Title="Ursa.Demo"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
x:CompileBindings="True"
|
||||
IsFullScreenButtonVisible="True"
|
||||
x:DataType="viewModels:MainWindowViewModel"
|
||||
Icon="/Assets/Ursa.ico"
|
||||
mc:Ignorable="d">
|
||||
<u:UrsaWindow.RightContent>
|
||||
<u:ThemeToggleButton
|
||||
IsThreeState="True"
|
||||
Mode="Controller" />
|
||||
</u:UrsaWindow.RightContent>
|
||||
<views:MainView />
|
||||
</Window>
|
||||
</u:UrsaWindow>
|
||||
@@ -1,9 +1,11 @@
|
||||
using System;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Interactivity;
|
||||
using Ursa.Controls;
|
||||
|
||||
namespace Ursa.Demo.Views;
|
||||
|
||||
public partial class MainWindow : Window
|
||||
public partial class MainWindow : UrsaWindow
|
||||
{
|
||||
public MainWindow()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user