Code Monkey home page Code Monkey logo

fluentavalonia's People

Contributors

adirh3 avatar amwx avatar cricketthomas avatar danielmayost avatar davidxuang avatar dynesshely avatar hez2010 avatar huaxing-yuan avatar jasonwues avatar leon99 avatar manfromarce avatar maxkatz6 avatar mgnslndh avatar nlogozzo avatar phantomgamers avatar rabbitism avatar raymonf avatar rbnswartz avatar robertbeekman avatar robloo avatar taj-ny avatar timunie avatar tobyfirth avatar tsrberry avatar workgroupengineering avatar xlegion avatar zii-dmg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fluentavalonia's Issues

Nuget Package?

Hi, I recently stumbled upon this repository and am eager to test it. Do you have a nuget package available to easily add this library to other projects? If not, I'd be happy to manage a dev package a nuget for you instead.

[Suggestion] Make the new window style available in the library

Hello,

I noticed there's a nice new window style in the demo application matching the Fluent UI UWP example app.
While I know I can copy the style into my own project it might be a nice addition to the library to have this available publicly.

I looked at the code and it seems like it falls back gracefully to a default window style in non-Windows platforms, so I think it would be a simple change to make it public :)

Lack of Datagrid styles

There's currently no datagrid styles. Because of that, the avalonia default fluent theme must be specified before v2 themes before datagrid can renderer.
There is also a chance switching themes would crash when datagrid is populated in this way. It doesn't occur with only fluent v1 specified.
Exception;

   at Avalonia.Data.BindingValue`1.FromUntyped(Object value) in /_/src/Avalonia.Base/Data/BindingValue.cs:line 250
   at Avalonia.Styling.PropertySetterBindingInstance`1.Inner.OnNext(Object value) in /_/src/Avalonia.Styling/Styling/PropertySetterBindingInstance.cs:line 191
   at Avalonia.Reactive.LightweightObservableBase`1.PublishNext(T value) in /_/src/Avalonia.Base/Reactive/LightweightObservableBase.cs:line 138
   at Avalonia.StyledElement.NotifyResourcesChanged(ResourcesChangedEventArgs e, Boolean propagate) in /_/src/Avalonia.Styling/StyledElement.cs:line 843
   at Avalonia.StyledElement.NotifyChildResourcesChanged(ResourcesChangedEventArgs e) in /_/src/Avalonia.Styling/StyledElement.cs:line 536
   at Avalonia.StyledElement.NotifyChildResourcesChanged(ResourcesChangedEventArgs e) in /_/src/Avalonia.Styling/StyledElement.cs:line 536
   at Avalonia.StyledElement.NotifyChildResourcesChanged(ResourcesChangedEventArgs e) in /_/src/Avalonia.Styling/StyledElement.cs:line 536
   at Avalonia.Controls.Primitives.TemplatedControl.NotifyChildResourcesChanged(ResourcesChangedEventArgs e) in /_/src/Avalonia.Controls/Primitives/TemplatedControl.cs:line 298
   at Avalonia.StyledElement.NotifyChildResourcesChanged(ResourcesChangedEventArgs e) in /_/src/Avalonia.Styling/StyledElement.cs:line 536
   at Avalonia.StyledElement.NotifyChildResourcesChanged(ResourcesChangedEventArgs e) in /_/src/Avalonia.Styling/StyledElement.cs:line 536
   at Avalonia.Controls.Primitives.TemplatedControl.NotifyChildResourcesChanged(ResourcesChangedEventArgs e) in /_/src/Avalonia.Controls/Primitives/TemplatedControl.cs:line 298
   at Avalonia.StyledElement.NotifyChildResourcesChanged(ResourcesChangedEventArgs e) in /_/src/Avalonia.Styling/StyledElement.cs:line 536
   at Avalonia.StyledElement.NotifyChildResourcesChanged(ResourcesChangedEventArgs e) in /_/src/Avalonia.Styling/StyledElement.cs:line 536
   at Avalonia.StyledElement.NotifyChildResourcesChanged(ResourcesChangedEventArgs e) in /_/src/Avalonia.Styling/StyledElement.cs:line 536
   at Avalonia.StyledElement.NotifyChildResourcesChanged(ResourcesChangedEventArgs e) in /_/src/Avalonia.Styling/StyledElement.cs:line 536
   at Avalonia.Utilities.WeakSubscriptionManager.Subscription`1.OnEvent(Object sender, T eventArgs) in /_/src/Avalonia.Base/Utilities/WeakSubscriptionManager.cs:line 184
   at Avalonia.Controls.ResourceDictionary.Avalonia.Controls.IResourceProvider.RemoveOwner(IResourceHost owner) in /_/src/Avalonia.Styling/Controls/ResourceDictionary.cs:line 174
   at Avalonia.Styling.Styles.Avalonia.Controls.IResourceProvider.RemoveOwner(IResourceHost owner) in /_/src/Avalonia.Styling/Styling/Styles.cs:line 253
   at FluentAvalonia.Styling.FluentAvaloniaTheme.set_RequestedTheme(String value)
   at Avalonia.Interactivity.EventRoute.RaiseEventImpl(RoutedEventArgs e) in /_/src/Avalonia.Interactivity/EventRoute.cs:line 152
   at Avalonia.Interactivity.EventRoute.RaiseEvent(IInteractive source, RoutedEventArgs e) in /_/src/Avalonia.Interactivity/EventRoute.cs:line 101
   at Avalonia.Interactivity.Interactive.RaiseEvent(RoutedEventArgs e) in /_/src/Avalonia.Interactivity/Interactive.cs:line 122
   at Avalonia.Controls.Button.OnClick() in /_/src/Avalonia.Controls/Button.cs:line 307
   at System.Reactive.Subjects.Subject`1.OnNext(T value) in /_/Rx.NET/Source/src/System.Reactive/Subjects/Subject.cs:line 145
   at Avalonia.Interactivity.EventRoute.RaiseEventImpl(RoutedEventArgs e) in /_/src/Avalonia.Interactivity/EventRoute.cs:line 148
   at Avalonia.Interactivity.EventRoute.RaiseEvent(IInteractive source, RoutedEventArgs e) in /_/src/Avalonia.Interactivity/EventRoute.cs:line 101
   at Avalonia.Interactivity.Interactive.RaiseEvent(RoutedEventArgs e) in /_/src/Avalonia.Interactivity/Interactive.cs:line 122
   at Avalonia.Input.MouseDevice.MouseUp(IMouseDevice device, UInt64 timestamp, IInputRoot root, Point p, PointerPointProperties props, KeyModifiers inputModifiers) in /_/src/Avalonia.Input/MouseDevice.cs:line 303
   at Avalonia.Input.MouseDevice.ProcessRawEvent(RawPointerEventArgs e) in /_/src/Avalonia.Input/MouseDevice.cs:line 149
   at Avalonia.Input.InputManager.ProcessInput(RawInputEventArgs e) in /_/src/Avalonia.Input/InputManager.cs:line 34
   at Avalonia.X11.X11Window.<ScheduleInput>b__120_0() in /_/src/Avalonia.X11/X11Window.cs:line 718
   at Avalonia.Threading.JobRunner.RunJobs(Nullable`1 priority) in /_/src/Avalonia.Base/Threading/JobRunner.cs:line 37
   at Avalonia.X11.X11PlatformThreading.HandleX11(CancellationToken cancellationToken) in /_/src/Avalonia.X11/X11PlatformThreading.cs:line 169
   at Avalonia.X11.X11PlatformThreading.RunLoop(CancellationToken cancellationToken) in /_/src/Avalonia.X11/X11PlatformThreading.cs:line 245
   at Avalonia.Threading.Dispatcher.MainLoop(CancellationToken cancellationToken) in /_/src/Avalonia.Base/Threading/Dispatcher.cs:line 61
   at Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.Start(String[] args) in /_/src/Avalonia.Controls/ApplicationLifetimes/ClassicDesktopStyleApplicationLifetime.cs:line 105```

NavigationView is empty if MenuItems not loaded in CTOR

Great job you have done! Love it!

MenuItems are loaded according to the other Issue i filed. Thanks for the help with that!.

The problem is that if I load them with a "Initialized += MainWindow_Loaded;" event, there are no items showing up in the NavigationView. Only if I load them directly in the constructor.

This is working, even if sometimes the last Item does not show any Content until clicking back and forward on the items.
`public MainViewModel(INavigationLookupDataService navigationLookupDataService)
{
_navigationLookupDataService = navigationLookupDataService;

        MenuItems = new ObservableCollection<LookupItem>();
        
        LoadNavigationLookupAsync();
    }`

This is not working, no MenuItems are showing up:
`public MainWindow()
{
var container = ((App)Application.Current).Container;
ViewModel = (MainViewModel?) ActivatorUtilities.GetServiceOrCreateInstance(container, typeof(MainViewModel));
Initialized += MainWindow_Loaded;
AvaloniaXamlLoader.Load(this);
#if DEBUG
this.AttachDevTools();
#endif
}

    private async void MainWindow_Loaded(object? sender, EventArgs e)
    {
        await ViewModel.LoadAsync();
    }`

`public MainViewModel(INavigationLookupDataService navigationLookupDataService)
{
_navigationLookupDataService = navigationLookupDataService;

        MenuItems = new ObservableCollection<LookupItem>();
        
        //LoadNavigationLookupAsync();
    }
    
    public async Task LoadAsync()
    {
        await LoadNavigationLookupAsync(); // Fires, I have checked!
    }`

[Bug] CommandBar commands out of order

I have a CommandBar designed as follows:

<ui:CommandBar HorizontalAlignment="Stretch" VerticalAlignment="Top" Margin="0,40,0,0" DefaultLabelPosition="Right">
	<ui:CommandBar.Content>
		<TextBlock Margin="6,12,6,0" Text="{Binding Status}"/>
	</ui:CommandBar.Content>
	
	<ui:CommandBar.PrimaryCommands>
		<ui:CommandBarSeparator />

		<ui:CommandBarButton Label="Select Save Folder" Icon="OpenLocal"/>

		<ui:CommandBarButton Label="Download Video" Icon="Download"/>

		<ui:CommandBarSeparator />

		<ui:CommandBarButton Label="Back" Icon="Back"/>

		<ui:CommandBarButton Label="Forward" Icon="Forward"/>

		<ui:CommandBarButton Label="Refresh" Icon="Refresh"/>

		<ui:CommandBarButton Label="Home" Icon="Home"/>

		<ui:CommandBarSeparator />

		<ui:CommandBarButton Label="Settings" Icon="Settings" Command="{Binding SettingsCommand}"/>
	</ui:CommandBar.PrimaryCommands>
</ui:CommandBar>

When the application is running, the CommandBar looks normal:
Good

However, if the window is resized smaller and the command overflow to the secondary commands menu, the commands then become out of order as so:
Bad

[Demo | Idea] add syntax highlight and copy support to the code examples

Hi @amwx

I like the demo app very much as it is really helpful 👍 . While playing around I was wondering if syntax highlighting and copy-support would be good.

I tried out some things and found that AvaloniaEdit might be helpful:

image

See: https://github.com/AvaloniaUI/AvaloniaEdit

I have a branch for this here: https://github.com/timunie/FluentAvalonia/tree/feature/ImproveDemoApp

If you like this idea I can work on the branch more and send a PR.

Happy coding
Tim

NumericUpDown not rendered and HorizontalAlignment not working

Hello,

I used the updated styles to refresh the look of my Avalonia app, and it is awesome.
However, my Avalonia NumericUpDown is not rendered, and in addition, some HorizontalAlignment="Right" are not working anymore.

Before / After of my little Avalonia App :

image

image

Any clue about these issues ?

Thank you in advance

Win32Interop.GetThemeColorRef causes crash on Win7

Call of this method (Win32Interop.GetThemeColorRef) causes crash on Win7. It is not possible to get an accent color on Win7. As a hotfix, you can set GetUserAccentColor="false" to let the application run on Win 7. But then the accent color on Windows 10 is not applied.

DataGrid ContextMenu broken

Hi,

I'm having a simple DataGrid with a ContextMenu for rows, but using FluentAvalonia is breaking the displaying of the ContextMenu. It doesn't display anymore.

`
<Application.DataTemplates>
local:ViewLocator/
</Application.DataTemplates>

<Application.Styles>
  <!--
       Default for Avalonia 
       (Requested to allow ContextMenu to work on DataGrid)
       But including the avalonia style bellow break the Expander header color for example.
  -->
  <!--<FluentTheme Mode="Light"/>
  <StyleInclude Source="avares://Avalonia.Controls.DataGrid/Themes/Fluent.xaml"/>-->

  <!-- FluentUI for Avalonia -->
  <sty:FluentAvaloniaTheme/>
</Application.Styles>
`

If I want the ContextMenu to be displayed with a right click, I have to uncomment the Avalonia Styles in the App.axaml, but it requires to select a theme which is done automatically by FluentAvalonia. Then, if I let the both declarations, it breaks other visual aspects (Expander header foreground for example).
I have no idea what could prevent the ContextMenu to be displayed looking at the DataGrid styles definitions.

Thanks for your help.
I have attached the project sample.
AvaloniaApplication2.zip

ToggleSwitch right alignment doesn't work as expected

Tested on kubuntu 21.04.

Steps to reproduce:

  1. Create new app with dotnet new avalonia.mvvm -o MyApp
  2. Add FluentAvalonia dependency ver. 1.1.2 to .csproj and corresponding minimal lines to App.axaml:
<Application xmlns="https://github.com/avaloniaui"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:local="using:MyApp"
             x:Class="MyApp.App"
             xmlns:sty="using:FluentAvalonia.Styling"
             xmlns:ui="using:FluentAvalonia.UI.Controls"
             xmlns:uip="using:FluentAvalonia.UI.Controls.Primitives"
             >
    <Application.DataTemplates>
        <local:ViewLocator/>
    </Application.DataTemplates>

    <Application.Styles>
        <FluentTheme Mode="Dark"/>
        <sty:FluentAvaloniaTheme ControlsVersion="2" RequestedTheme="Dark" />
    </Application.Styles>
</Application>
  1. Replace the MainWindow.axaml's textbox with the following grid:
<Grid ColumnDefinitions="Auto,*,Auto">
    <ToggleSwitch Grid.Column="0" Content="Left switch"/>
    <ToggleSwitch Grid.Column="2" HorizontalAlignment="Right" Content="Right switch"/>
</Grid>

Results without/with FluentAvalonia:

Default
With FluentAvalonia

Update CalendarDatePickerStyle

Describe the bug
In Avalonia there was a change which breaks the style for CalendarDatePicker. The DropDown needs to use TemplateBinding for additional properties now.

Screenshots
See AvaloniaUI/Avalonia#7162

Desktop (please complete the following information):

  • OS: All I think
  • FluentAvalonia Version latest
  • Avalonia Version 0.10.11

Additional context
See AvaloniaUI/Avalonia#7162 and AvaloniaUI/Avalonia#7194 for more Info

I'll post a PR for fixing this.

Happy coding
Tim

Unable to run the sample app: The Styles already has a owner

Just pulled the repo and getting this when trying to run the sample app (using Rider 2021.1.3):

System.InvalidOperationException: The Styles already has a owner.
   at Avalonia.Styling.Styles.Avalonia.Controls.IResourceProvider.AddOwner(IResourceHost owner) in /_/src/Avalonia.Styling/Styling/Styles.cs:line 230
   at FluentAvalonia.Styling.FluentAvaloniaTheme.Avalonia.Controls.IResourceProvider.AddOwner(IResourceHost owner) in F:\source\temp\FluentAvalonia\FluentAvalonia\Styling\Core\FluentAvaloniaTheme.cs:line 220
   at Avalonia.Styling.Styles.<OnCollectionChanged>g__Add|52_1(IList items) in /_/src/Avalonia.Styling/Styling/Styles.cs:line 289
   at Avalonia.Styling.Styles.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e) in /_/src/Avalonia.Styling/Styling/Styles.cs:line 318
   at Avalonia.Collections.AvaloniaList`1.NotifyAdd(T item, Int32 index) in /_/src/Avalonia.Base/Collections/AvaloniaList.cs:line 680
   at Avalonia.Collections.AvaloniaList`1.Add(T item) in /_/src/Avalonia.Base/Collections/AvaloniaList.cs:line 205
   at Avalonia.Styling.Styles.Add(IStyle item) in /_/src/Avalonia.Styling/Styling/Styles.cs:line 201
   at FluentAvaloniaSamples.App.!XamlIlPopulate(IServiceProvider , App ) in F:\source\temp\FluentAvalonia\FluentAvaloniaSamples\App.axaml:line 22
   at FluentAvaloniaSamples.App.!XamlIlPopulateTrampoline(App )
   at FluentAvaloniaSamples.App.Initialize() in F:\source\temp\FluentAvalonia\FluentAvaloniaSamples\App.axaml.cs:line 13
   at Avalonia.Controls.AppBuilderBase`1.Setup() in /_/src/Avalonia.Controls/AppBuilderBase.cs:line 310
   at Avalonia.Controls.AppBuilderBase`1.SetupWithLifetime(IApplicationLifetime lifetime) in /_/src/Avalonia.Controls/AppBuilderBase.cs:line 179
   at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime[T](T builder, String[] args, ShutdownMode shutdownMode) in /_/src/Avalonia.Controls/ApplicationLifetimes/ClassicDesktopStyleApplicationLifetime.cs:line 147
   at FluentAvaloniaSamples.Program.Main(String[] args) in F:\source\temp\FluentAvalonia\FluentAvaloniaSamples\Program.cs:line 12

Not sure what this could be related to

What control is this?

What control is this?
image

The WinUI 2.6 NavigationView looks like this:
image

So how can we replicate the control from the windows store?

Segoe Fluent Replacement Font

I re-built the Segoe Fluent font using the Fluent UI System icons that are open source. I notice you are using Fluent UI System fonts and Unicode points as well with this project for the SymbolIcon.

Would you like to switch to use the replacement font created here?

https://github.com/robloo/SymbolIconManager/blob/main/Fonts/WinSymbols3.ttf
https://github.com/robloo/SymbolIconManager

Aside from being smaller in size and only 1 file, it would standardize all the Unicode points with WinUI upstream and align the glyphs for the most part with Fluent version 2 (the same ones you are using now since Segoe Fluent and Fluent UI System Icons are very similar).

The goal here is for every non-Microsoft XAML framework to use the same Segoe Fluent font replacement. Anyone can contribute mappings to share with others as well:

https://github.com/robloo/SymbolIconManager/blob/main/Source/Data/Mappings/SegoeFluent.json
https://github.com/robloo/SymbolIconManager/blob/main/Docs/IconMapping.md

Hi!

Please check DMs on telegram!

Error when selecting MenuItens back and forward

When selecting MenuItems back and forward an error occurs.
I have also tried using code behind and Bindings instead of CompiledBindings, same result.

IDE: Rider
Manjaro
This nuget package (unofficial)

This is how my Test Project set it up.

XAML:
`

<Window.Resources>
    <DataTemplate x:Key="NaviItemTemplate" x:DataType="controls:NavigationViewItem">
        <controls:NavigationViewItem MenuItems="{CompiledBinding MenuItems}"
                                     Content="{CompiledBinding Name}"
                                     Tag="{CompiledBinding Tag}" />
    </DataTemplate>
</Window.Resources>

<controls:NavigationView Name="NavView"
                         MenuItemTemplate="{StaticResource NaviItemTemplate}"
                         MenuItems="{CompiledBinding MenuItems}"
                         SelectedItem="{CompiledBinding SelectedItem, Mode=TwoWay}">
    <controls:Frame Name="ContentFrame" Margin="5" />
</controls:NavigationView>
`

C#:
`
public MainViewModel()
{
MenuItems = new ObservableCollection();

        // Static list with dummy data
        var projects = ProjectLookupDataService.GetProjectLookup();
        var symbol = new SymbolIcon {Symbol = Symbol.Home};
        MenuItems.Clear();

        foreach (var project in projects)
        {
            MenuItems.Add(new NavigationViewItem
            {
                Name = project.DisplayMember,
                Icon = symbol,
                Tag = project.Id,
                MenuItems = GetSystemNamesByProjectId(project.Id)
            });
        }
    }

private ObservableCollection GetSystemNamesByProjectId(int projectId)
{
var systemNameList = SystemNameLookupDataService.GetSystemNameLookup();
var systemNames = systemNameList.Where(p => p.ProjectId == projectId);
var items = new ObservableCollection();
var symbol = new SymbolIcon {Symbol = Symbol.Home};

        foreach (var systemName in systemNames)
        {
            items.Add(new NavigationViewItem
            {
                Name = systemName.DisplayMember,
                Icon = symbol,
                Tag = systemName.Id,
                MenuItems = GetDrawingsBySystemNameId(systemName.Id)
            });
        }
        return items;
    }

    private ObservableCollection<NavigationViewItem> GetDrawingsBySystemNameId(int systemNameId)
    {
        var drawingList = DrawingLookupDataService.GetDrawingLookup();
        var drawings = drawingList.Where(p => p.SystemNameId == systemNameId);
        var items = new ObservableCollection<NavigationViewItem>();
        var symbol = new SymbolIcon {Symbol = Symbol.Home};

        foreach (var drawing in drawings)
        {
            items.Add(new NavigationViewItem
            {
                Name = drawing.DisplayMember,
                Icon = symbol,
                Tag = drawing.Id,
                MenuItems = new ObservableCollection<NavigationViewItem>()
            });
        }
        return items;
    }

`

Error Message:
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
at System.Collections.Generic.List1.get_Item(Int32 index) at FluentAvalonia.UI.Controls.IndexPath.GetAt(Int32 index) at FluentAvalonia.UI.Controls.NavigationView.FindLowestLevelContainerToDisplaySelectionIndicator() at FluentAvalonia.UI.Controls.NavigationView.ShowHideChildrenItemsRepeater(NavigationViewItem nvi) at FluentAvalonia.UI.Controls.NavigationView.OnNavigationViewItemExpandedPropertyChanged(AvaloniaPropertyChangedEventArgs args) at System.Reactive.AnonymousObserver1.OnNextCore(T value) in //Rx.NET/Source/src/System.Reactive/AnonymousObserver.cs:line 67
at System.Reactive.ObserverBase1.OnNext(T value) in /_/Rx.NET/Source/src/System.Reactive/ObserverBase.cs:line 34 at Avalonia.Reactive.LightweightObservableBase1.PublishNext(T value) in /
/src/Avalonia.Base/Reactive/LightweightObservableBase.cs:line 138
at Avalonia.Reactive.AvaloniaPropertyChangedObservable.PropertyChanged(Object sender, AvaloniaPropertyChangedEventArgs e) in //src/Avalonia.Base/Reactive/AvaloniaPropertyChangedObservable.cs:line 42
at Avalonia.AvaloniaObject.RaisePropertyChanged[T](AvaloniaPropertyChangedEventArgs1 change) in /_/src/Avalonia.Base/AvaloniaObject.cs:line 720 at Avalonia.AvaloniaObject.RaisePropertyChanged[T](AvaloniaProperty1 property, Optional1 oldValue, BindingValue1 newValue, BindingPriority priority) in /
/src/Avalonia.Base/AvaloniaObject.cs:line 632
at Avalonia.AvaloniaObject.SetAndRaise[T](AvaloniaProperty1 property, T& field, T value) in /_/src/Avalonia.Base/AvaloniaObject.cs:line 662 at FluentAvalonia.UI.Controls.NavigationViewItem.set_IsExpanded(Boolean value) at FluentAvalonia.UI.Controls.NavigationView.ChangeIsExpandedNavigationViewItem(NavigationViewItem nvi, Boolean isExpanded) at FluentAvalonia.UI.Controls.NavigationView.ToggleIsExpandedNavigationViewItem(NavigationViewItem nvi) at FluentAvalonia.UI.Controls.NavigationView.OnNavigationViewItemInvoked(NavigationViewItem nvi) at FluentAvalonia.UI.Controls.NavigationView.OnNavigationViewItemTapped(Object sender, RoutedEventArgs e) at Avalonia.Interactivity.Interactive.<AddHandler>g__InvokeAdapter|4_0[TEventArgs](Delegate baseHandler, Object sender, RoutedEventArgs args) in /_/src/Avalonia.Interactivity/Interactive.cs:line 60 at Avalonia.Interactivity.Interactive.<>c__41.b__4_1(Delegate baseHandler, Object sender, RoutedEventArgs args) in //src/Avalonia.Interactivity/Interactive.cs:line 66
at Avalonia.Interactivity.EventRoute.RaiseEventImpl(RoutedEventArgs e) in /
/src/Avalonia.Interactivity/EventRoute.cs:line 167
at Avalonia.Interactivity.EventRoute.RaiseEvent(IInteractive source, RoutedEventArgs e) in //src/Avalonia.Interactivity/EventRoute.cs:line 101
at Avalonia.Interactivity.Interactive.RaiseEvent(RoutedEventArgs e) in /
/src/Avalonia.Interactivity/Interactive.cs:line 120
at Avalonia.Input.Gestures.PointerReleased(RoutedEventArgs ev) in //src/Avalonia.Input/Gestures.cs:line 109
at System.Reactive.AnonymousObserver1.OnNextCore(T value) in /_/Rx.NET/Source/src/System.Reactive/AnonymousObserver.cs:line 67 at System.Reactive.ObserverBase1.OnNext(T value) in /
/Rx.NET/Source/src/System.Reactive/ObserverBase.cs:line 34
at System.Reactive.Subjects.Subject1.OnNext(T value) in /_/Rx.NET/Source/src/System.Reactive/Subjects/Subject.cs:line 147 at Avalonia.Interactivity.RoutedEvent.InvokeRouteFinished(RoutedEventArgs e) in /_/src/Avalonia.Interactivity/RoutedEvent.cs:line 104 at Avalonia.Interactivity.EventRoute.RaiseEvent(IInteractive source, RoutedEventArgs e) in /_/src/Avalonia.Interactivity/EventRoute.cs:line 102 at Avalonia.Interactivity.Interactive.RaiseEvent(RoutedEventArgs e) in /_/src/Avalonia.Interactivity/Interactive.cs:line 120 at Avalonia.Input.MouseDevice.MouseUp(IMouseDevice device, UInt64 timestamp, IInputRoot root, Point p, PointerPointProperties props, KeyModifiers inputModifiers) in /_/src/Avalonia.Input/MouseDevice.cs:line 306 at Avalonia.Input.MouseDevice.ProcessRawEvent(RawPointerEventArgs e) in /_/src/Avalonia.Input/MouseDevice.cs:line 173 at Avalonia.Input.MouseDevice.ProcessRawEvent(RawInputEventArgs e) in /_/src/Avalonia.Input/MouseDevice.cs:line 86 at Avalonia.Input.InputManager.ProcessInput(RawInputEventArgs e) in /_/src/Avalonia.Input/InputManager.cs:line 35 at Avalonia.Controls.TopLevel.HandleInput(RawInputEventArgs e) in /_/src/Avalonia.Controls/TopLevel.cs:line 476 at Avalonia.X11.X11Window.<ScheduleInput>b__120_0() in /_/src/Avalonia.X11/X11Window.cs:line 719 at Avalonia.Threading.JobRunner.Job.Avalonia.Threading.JobRunner.IJob.Run() in /_/src/Avalonia.Base/Threading/JobRunner.cs:line 166 at Avalonia.Threading.JobRunner.RunJobs(Nullable1 priority) in //src/Avalonia.Base/Threading/JobRunner.cs:line 37
at Avalonia.Threading.Dispatcher.RunJobs() in /
/src/Avalonia.Base/Threading/Dispatcher.cs:line 69
at Avalonia.X11.X11PlatformThreading.HandleX11(CancellationToken cancellationToken) in //src/Avalonia.X11/X11PlatformThreading.cs:line 199
at Avalonia.X11.X11PlatformThreading.RunLoop(CancellationToken cancellationToken) in /
/src/Avalonia.X11/X11PlatformThreading.cs:line 245
at Avalonia.Threading.Dispatcher.MainLoop(CancellationToken cancellationToken) in //src/Avalonia.Base/Threading/Dispatcher.cs:line 61
at Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.Start(String[] args) in /
/src/Avalonia.Controls/ApplicationLifetimes/ClassicDesktopStyleApplicationLifetime.cs:line 107
at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime[T](T builder, String[] args, ShutdownMode shutdownMode) in /_/src/Avalonia.Controls/ApplicationLifetimes/ClassicDesktopStyleApplicationLifetime.cs:line 134
at SomeApp.UI.Program.Main(String[] args) in SomeApp/SomeApp.UI/Program.cs:line 18

AccentColor customization?

By default the accent color on Windows is blue and on Linux it's a purple-ish color. Is there a way we can change the accent color used throughout the application?

Some Questions

So first, awesome work @amwx!! It's great to see someone take this up and it's sorely needed for those of us committed to WinUI but looking at Avalonia for future ports (it's the most stable macOS/Linux desktop option on the market).

I know the Avalonia Core team has reached out to you but wonder if you can share the strategy for this library? As I see it several of these core controls should end up in Avalonia UI itself (perhaps not with the latest styles). This project would still likely be needed to:

  1. Include the controls not deemed worthy of inclusion in Avalonia itself (RatingControl, etc.)
  2. Include the Fluent version 1 and 2 styles for ALL controls. It is likely that Avalonia will deviate and use custom styling so being able to restyle to Fluent using this lib is very useful.
  3. This library could still mirror WinUI with all controls and just keep everything synced with WinUI as Avalonia might deviate in the future.

Controls that are prime candidates for Avalonia inclusion in my option are:

  • ColorPicker (however I plan a port that is closer to WinUI + UWP Community Toolkit)
  • SplitButton/ToggleSplitButton/DropDownButton
  • NavigationView
  • ContentDialog
  • All the various Icons (which @maxkatz6 is already working on I believe). Have you discussed code sharing I wonder?

For the buttons (SplitButton/ToggleSplitButton, etc.) I was planning to port those over myself. However, you have done the vast majority of the work including Flyouts, awesome! Do you have any concerns if I use your code and try to get these into Avalonia itself? Obviously, I'll need to adjust the styles, but most of the code-behind will likely be copy-pasted verbatim. I would only double check with latest WinUI.

Since version 1.1.5 all animations are stuck

Really can't understand why (hope I didn't miss any new flag), but was able to repro it in a small project.
Since version 1.1.5, all animations are very laggy/stuck, it's solved after some time.

Here's the repro solution -
FluentAvaloniaAnimationBug1.1.5.zip

Or code here -
App.xaml

<Application xmlns="https://github.com/avaloniaui"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:styling="clr-namespace:FluentAvalonia.Styling;assembly=FluentAvalonia"
             x:Class="Avalonia.NETCoreApp2.App">
    <Application.Styles>
        <styling:FluentAvaloniaTheme
            RequestedTheme="Light" />
    </Application.Styles>
</Application>

MainWindow.xaml

<Window 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"
        mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
        x:Class="Avalonia.NETCoreApp2.MainWindow"
        Title="Avalonia.NETCoreApp2">
    <ProgressBar IsIndeterminate="True" Width="100" Foreground="Red"/>
</Window>

Csproj
<PackageReference Include="FluentAvaloniaUI" Version="1.1.6" />

It is using ProgressBar, run it, the ProgressBar will not move at all.
Change the FluentAvaloniaUI package to 1.1.3 or below to see the animation being fixed.

Wrong Font Family name for Windows build 22000

The font family of the default font released in windows 11 is Segoe UI Variable and not Segoe UI Variable Text. This prevents non avalonia controls that try to use the same font to fail if it picks the font family from the window class.

[Bug] Unable to create custom ContentDialog

Hi, I'm trying to create a custom Dialog that extends a ContentDialog. My xaml and c# are below:

<ui:ContentDialog x:Class="NickvisionApp.Views.WelcomeDialog"
             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:ui="using:FluentAvalonia.UI.Controls"
             mc:Ignorable="d" d:DesignWidth="600" d:DesignHeight="400"
             Title="Welcome" PrimaryButtonText="Finish" CloseButtonText="Close" DefaultButton="Close"
             Width="600" Height="400">
    <StackPanel>
        
    </StackPanel>
</ui:ContentDialog>
using Avalonia.Markup.Xaml;
using FluentAvalonia.UI.Controls;

namespace NickvisionApp.Views
{
    public class WelcomeDialog : ContentDialog
    {
        public WelcomeDialog()
        {
            AvaloniaXamlLoader.Load(this);
        }
    }
}

However, I'm getting this error:
image

Navigating through page loose visual tree state

Hi,

Using a NavigationView, every time I navigate from page to page, each page loose its visual tree state.
If for example, on page one, you have scrolled down to the page, when you get back to it, the visual state is restored as if it was the first time displayed.
Is there a workaround for that, or is a planned feature ?

Best Regards,
François

[Bug] ComboBox Placeholder Text Not Showing

The placeholder text of a combo box is only shown when the cursor hovers over the combo box.

Without mouse cursor hovering:
image

With mouse cursor hovering:
image

Here is my XAML:
<ComboBox HorizontalAlignment="Left" VerticalAlignment="Top" Margin="8,154,0,0" Width="320" PlaceholderText="Select file format"/>

(Snipping Tool does not show the mouse cursor in screenshots)

CoreWindow has no top-border

Hello,

I've been enjoying the new update but I noticed the CoreWindow is missing its top-border on Windows 10
image

Hidden content Dialog causes crash when you use Tab to navigate on a window

When using Tab to navigate, and a content dialog is next to be tested for tabstop, it throws an exception.

   at Avalonia.Input.KeyboardNavigation.GetIsTabStop(InputElement element) in /_/src/Avalonia.Input/KeyboardNavigation.cs:line 102
   at Avalonia.Input.Navigation.TabNavigation.GetFocusableDescendants(IInputElement element, NavigationDirection direction)+MoveNext() in /_/src/Avalonia.Input/Navigation/TabNavigation.cs:line 128
   at Avalonia.Input.Navigation.TabNavigation.GetFocusableDescendants(IInputElement element, NavigationDirection direction)+MoveNext() in /_/src/Avalonia.Input/Navigation/TabNavigation.cs:line 126
   at Avalonia.Input.Navigation.TabNavigation.GetFocusableDescendants(IInputElement element, NavigationDirection direction)+MoveNext() in /_/src/Avalonia.Input/Navigation/TabNavigation.cs:line 126
   at Avalonia.Input.Navigation.TabNavigation.GetFocusableDescendants(IInputElement element, NavigationDirection direction)+MoveNext() in /_/src/Avalonia.Input/Navigation/TabNavigation.cs:line 126
   at Avalonia.Input.Navigation.TabNavigation.GetFocusableDescendants(IInputElement element, NavigationDirection direction)+MoveNext() in /_/src/Avalonia.Input/Navigation/TabNavigation.cs:line 126
   at Avalonia.Input.Navigation.TabNavigation.GetFocusableDescendants(IInputElement element, NavigationDirection direction)+MoveNext() in /_/src/Avalonia.Input/Navigation/TabNavigation.cs:line 126
   at Avalonia.Input.Navigation.TabNavigation.GetFocusableDescendants(IInputElement element, NavigationDirection direction)+MoveNext() in /_/src/Avalonia.Input/Navigation/TabNavigation.cs:line 126
   at Avalonia.Input.Navigation.TabNavigation.GetFocusableDescendants(IInputElement element, NavigationDirection direction)+MoveNext() in /_/src/Avalonia.Input/Navigation/TabNavigation.cs:line 126
   at Avalonia.Input.Navigation.TabNavigation.GetFocusableDescendants(IInputElement element, NavigationDirection direction)+MoveNext() in /_/src/Avalonia.Input/Navigation/TabNavigation.cs:line 126
   at Avalonia.Input.Navigation.TabNavigation.GetFocusableDescendants(IInputElement element, NavigationDirection direction)+MoveNext() in /_/src/Avalonia.Input/Navigation/TabNavigation.cs:line 126
   at Avalonia.Input.Navigation.TabNavigation.GetFocusableDescendants(IInputElement element, NavigationDirection direction)+MoveNext() in /_/src/Avalonia.Input/Navigation/TabNavigation.cs:line 126
   at Avalonia.Input.Navigation.TabNavigation.GetFocusableDescendants(IInputElement element, NavigationDirection direction)+MoveNext() in /_/src/Avalonia.Input/Navigation/TabNavigation.cs:line 126
   at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable`1 source, Boolean& found)
   at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source)
   at Avalonia.Input.Navigation.TabNavigation.GetFirstInNextContainer(IInputElement element, IInputElement container, NavigationDirection direction) in /_/src/Avalonia.Input/Navigation/TabNavigation.cs:line 253
   at Avalonia.Input.Navigation.TabNavigation.GetFirstInNextContainer(IInputElement element, IInputElement container, NavigationDirection direction) in /_/src/Avalonia.Input/Navigation/TabNavigation.cs:line 263
   at Avalonia.Input.Navigation.TabNavigation.GetFirstInNextContainer(IInputElement element, IInputElement container, NavigationDirection direction) in /_/src/Avalonia.Input/Navigation/TabNavigation.cs:line 263
   at Avalonia.Input.Navigation.TabNavigation.GetFirstInNextContainer(IInputElement element, IInputElement container, NavigationDirection direction) in /_/src/Avalonia.Input/Navigation/TabNavigation.cs:line 263
   at Avalonia.Input.Navigation.TabNavigation.GetFirstInNextContainer(IInputElement element, IInputElement container, NavigationDirection direction) in /_/src/Avalonia.Input/Navigation/TabNavigation.cs:line 263
   at Avalonia.Input.Navigation.TabNavigation.GetFirstInNextContainer(IInputElement element, IInputElement container, NavigationDirection direction) in /_/src/Avalonia.Input/Navigation/TabNavigation.cs:line 263
   at Avalonia.Input.Navigation.TabNavigation.GetFirstInNextContainer(IInputElement element, IInputElement container, NavigationDirection direction) in /_/src/Avalonia.Input/Navigation/TabNavigation.cs:line 263
   at Avalonia.Input.Navigation.TabNavigation.GetFirstInNextContainer(IInputElement element, IInputElement container, NavigationDirection direction) in /_/src/Avalonia.Input/Navigation/TabNavigation.cs:line 263
   at Avalonia.Input.Navigation.TabNavigation.GetFirstInNextContainer(IInputElement element, IInputElement container, NavigationDirection direction) in /_/src/Avalonia.Input/Navigation/TabNavigation.cs:line 263
   at Avalonia.Input.Navigation.TabNavigation.GetNextInTabOrder(IInputElement element, NavigationDirection direction, Boolean outsideElement) in /_/src/Avalonia.Input/Navigation/TabNavigation.cs:line 54
   at Avalonia.Input.KeyboardNavigationHandler.GetNext(IInputElement element, NavigationDirection direction) in /_/src/Avalonia.Input/KeyboardNavigationHandler.cs:line 78
   at Avalonia.Input.KeyboardNavigationHandler.Move(IInputElement element, NavigationDirection direction, KeyModifiers keyModifiers) in /_/src/Avalonia.Input/KeyboardNavigationHandler.cs:line 99
   at Avalonia.Input.KeyboardNavigationHandler.OnKeyDown(Object sender, KeyEventArgs e) in /_/src/Avalonia.Input/KeyboardNavigationHandler.cs:line 123
   at Avalonia.Interactivity.Interactive.<AddHandler>g__InvokeAdapter|4_0[TEventArgs](Delegate baseHandler, Object sender, RoutedEventArgs args) in /_/src/Avalonia.Interactivity/Interactive.cs:line 62
   at Avalonia.Interactivity.Interactive.<>c__4`1.<AddHandler>b__4_1(Delegate baseHandler, Object sender, RoutedEventArgs args) in /_/src/Avalonia.Interactivity/Interactive.cs:line 68
   at Avalonia.Interactivity.EventRoute.RaiseEventImpl(RoutedEventArgs e) in /_/src/Avalonia.Interactivity/EventRoute.cs:line 167
   at Avalonia.Interactivity.EventRoute.RaiseEvent(IInteractive source, RoutedEventArgs e) in /_/src/Avalonia.Interactivity/EventRoute.cs:line 101
   at Avalonia.Interactivity.Interactive.RaiseEvent(RoutedEventArgs e) in /_/src/Avalonia.Interactivity/Interactive.cs:line 122
   at Avalonia.Input.KeyboardDevice.ProcessRawEvent(RawInputEventArgs e) in /_/src/Avalonia.Input/KeyboardDevice.cs:line 229
   at Avalonia.Input.InputManager.ProcessInput(RawInputEventArgs e) in /_/src/Avalonia.Input/InputManager.cs:line 35
   at Avalonia.Controls.TopLevel.HandleInput(RawInputEventArgs e) in /_/src/Avalonia.Controls/TopLevel.cs:line 476
   at Avalonia.X11.X11Window.<ScheduleInput>b__120_0() in /_/src/Avalonia.X11/X11Window.cs:line 719
   at Avalonia.Threading.JobRunner.Job.Avalonia.Threading.JobRunner.IJob.Run() in /_/src/Avalonia.Base/Threading/JobRunner.cs:line 166
   at Avalonia.Threading.JobRunner.RunJobs(Nullable`1 priority) in /_/src/Avalonia.Base/Threading/JobRunner.cs:line 37
   at Avalonia.Threading.Dispatcher.RunJobs() in /_/src/Avalonia.Base/Threading/Dispatcher.cs:line 69
   at Avalonia.X11.X11PlatformThreading.HandleX11(CancellationToken cancellationToken) in /_/src/Avalonia.X11/X11PlatformThreading.cs:line 199
   at Avalonia.X11.X11PlatformThreading.RunLoop(CancellationToken cancellationToken) in /_/src/Avalonia.X11/X11PlatformThreading.cs:line 245
   at Avalonia.Threading.Dispatcher.MainLoop(CancellationToken cancellationToken) in /_/src/Avalonia.Base/Threading/Dispatcher.cs:line 61
   at Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.Start(String[] args) in /_/src/Avalonia.Controls/ApplicationLifetimes/ClassicDesktopStyleApplicationLifetime.cs:line 116
   at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime[T](T builder, String[] args, ShutdownMode shutdownMode) in /_/src/Avalonia.Controls/ApplicationLifetimes/ClassicDesktopStyleApplicationLifetime.cs:line 148
   at FluentAvaloniaSamples.Program.Main(String[] args) in /home/aa/personal/FluentAvalonia/FluentAvaloniaSamples/Program.cs:line 12```

InfoBar: Informational is transparent

When i set the severity to information I get the following result:
image

Whereas the other severities are not transparent:
image

Could we make the informational severity not transparent as well, to properly display notifications.

TextBox Header

Hello again,
Is there a way we can add a header to a textbox control similarly to WinUI. There is already the watermark feature but no header. Maybe like a textbox helper where we could do:

<TextBox ... ui:TextBoxHelper.Header="Name"/>

More than just Primary, Secondary and Close button!

Hello,

It's possible to have more buttons than Primary, Secondary or Close?

Can I have a button with a custom command? An example is to have several buttons on the Dialog that will change what is happening in the dialog.

I thought that I could use a Custom UserControl with as many buttons as I want, but, I have to define the button any way.

Is this possible?

best regards
Paulo Aboim Pinto

OnNavigatedTo

This is more of a question than an issue.

With UWP / WINUI you can send a parameter "ContentFrame.Navigate(Type, parameter)" and receive it through "OnNavigatedto(NavigationEventArgs e)". Have you implemented something similar?

[Improvement] ContentDialog handle Enter-Key

Hi @amwx

What is the current situation?

I have a ContentDialog which has a UserControl as content. I would like to perform the closing action when the user hits Enter, but only if the password box has focus and has any text. This is not so easy at the moment

What ideas do I have?

  • Adding two more StyledProperties called CancelOnEscape [bool] and DefaultOnEnter [bool] and handle these in the KeyDown or KeyUp-Event
  • Add an overload to Hide() which accepts a close reason, like Hide(ContentDialogResult result) which closes the dialog and returns the given result

Which solution do you like best? I would be happy to provide the needed PR.

Happy coding
Tim

CommandBar Improvements

I'm testing out the current V1.1.0 release and I love it, really amazing work!
However, I just had some suggestions/improvements for the CommandBar. Here is my xaml for reference:

<ui:CommandBar HorizontalAlignment="Stretch" VerticalAlignment="Top" DefaultLabelPosition="Right">
    <ui:CommandBar.PrimaryCommands>
      <ui:CommandBarButton Label="Add" Icon="Add"/>
    </ui:CommandBar.PrimaryCommands>
    
    <ui:CommandBar.SecondaryCommands>
      <ui:CommandBarButton Label="Open" Icon="Open"/>
    </ui:CommandBar.SecondaryCommands>
</ui:CommandBar>

The first thing is when the label is displayed to the right, the text is off-centered of the icon, as you can see below:
image

Another request, is to have the CommandBar use the same background (or at least a darker color to show it is a bar of some sort) as the NavigationView and MenuBar:
image
Regarding this, ^, is there a DynamicResource brush or something I can set for the background that would match the same brush used as the background of the NavigationView and MenuBar?

Navigation Control Animation Glitch

Great Control! and I know this is still BETA.... ;-)

Right now when click to show a page with a SlideNavigationTransitionEffect.FromTop animation I see for a split second the page I just clicked before it slides in.
FYI: I see if with all 4 slide direction animations

lmk if you need video of the problem in action.
Is it possible to add fade in time to it already as that might fix the problem?

thx!
Steve

[Bug] ComboBox List Border Not Shown Properly

It seems as there is an issue drawing the border around the list of a ComboBox:
image

However, this ComboBox seems to be fine:
image

Here is my XAML:

<ui:ContentDialog 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:ui="using:FluentAvalonia.UI.Controls"
				  xmlns:uip="using:FluentAvalonia.UI.Controls.Primitives"
				  xmlns:i="clr-namespace:Avalonia.Xaml.Interactivity;assembly=Avalonia.Xaml.Interactivity"
				  xmlns:ia="clr-namespace:Avalonia.Xaml.Interactions.Core;assembly=Avalonia.Xaml.Interactions"
				  mc:Ignorable="d" x:Class="NickvisionApp.Views.SettingsDialogView"
				  Name="SettingsDialog" Title="{Binding Title}"
				  CloseButtonText="Close" DefaultButton="Close" CloseButtonCommand="{Binding CloseCommand}">
	<ui:ContentDialog.Resources>
		<x:Double x:Key="ContentDialogMaxWidth">600</x:Double>
		<x:Double x:Key="ContentDialogMaxHeight">600</x:Double>
	</ui:ContentDialog.Resources>

	<ui:ContentDialog.Styles>
		<Style Selector="ui|ContentDialog /template/ Grid#DialogSpace">
			<Setter Property="Width" Value="440"/>
			<Setter Property="Height" Value="500" />
		</Style>
	</ui:ContentDialog.Styles>

	<StackPanel>
		<TextBlock Text="Theme" Margin="0,0,0,2"/>

		<ComboBox Width="200" Items="{Binding Themes}"/>
		
		<TextBlock Text="Accent Color" Margin="0,10,0,2"/>
		
		<ComboBox Width="200" Items="{Binding AccentColors}"/>
	</StackPanel>
</ui:ContentDialog>

[Bug] Unable to change InfoBar Severity

I'm able to create a regular InfoBar no issues <ui:InfoBar Name="InfoBar" HorizontalAlignment="Stretch" VerticalAlignment="Bottom" IsOpen="True" Title="Test" Message="Test" IsClosable="False"/> and it defaults to using the Information severity. When I go to change the severity, for example, Severity="Warning" I get a NullReferenceException (this also happens if I try "Error" or anything else).
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.