Browse Source

Added Mica enum value to WindowTransparencyLevel.cs

Added Mica as selected option
pull/6574/head
Adir 5 years ago
parent
commit
e61147edc1
  1. 1
      samples/ControlCatalog/MainView.xaml
  2. 1
      samples/ControlCatalog/MainWindow.xaml
  3. 1
      samples/ControlCatalog/Pages/WindowCustomizationsPage.xaml
  4. 7
      src/Avalonia.Controls/WindowTransparencyLevel.cs

1
samples/ControlCatalog/MainView.xaml

@ -98,6 +98,7 @@
<ComboBoxItem>Transparent</ComboBoxItem>
<ComboBoxItem>Blur</ComboBoxItem>
<ComboBoxItem>AcrylicBlur</ComboBoxItem>
<ComboBoxItem>Mica</ComboBoxItem>
</ComboBox>
<ComboBox Items="{Binding WindowStates}" SelectedItem="{Binding WindowState}" />
</StackPanel>

1
samples/ControlCatalog/MainWindow.xaml

@ -12,6 +12,7 @@
ExtendClientAreaTitleBarHeightHint="{Binding TitleBarHeight}"
TransparencyLevelHint="{Binding TransparencyLevel}"
x:Name="MainWindow"
Background="Transparent"
x:Class="ControlCatalog.MainWindow" WindowState="{Binding WindowState, Mode=TwoWay}">
<NativeMenu.Menu>
<NativeMenu>

1
samples/ControlCatalog/Pages/WindowCustomizationsPage.xaml

@ -14,6 +14,7 @@
<ComboBoxItem>Transparent</ComboBoxItem>
<ComboBoxItem>Blur</ComboBoxItem>
<ComboBoxItem>AcrylicBlur</ComboBoxItem>
<ComboBoxItem>Mica</ComboBoxItem>
</ComboBox>
</StackPanel>
</UserControl>

7
src/Avalonia.Controls/WindowTransparencyLevel.cs

@ -20,6 +20,11 @@
/// <summary>
/// The window background is a blur-behind with a high blur radius. This level may fallback to Blur.
/// </summary>
AcrylicBlur
AcrylicBlur,
/// <summary>
/// The window background is based on desktop wallpaper tint with a blur. This will only work on Windows 11
/// </summary>
Mica
}
}

Loading…
Cancel
Save