mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 03:48:56 +00:00
Added routing to UI project
Added Ninject Added Fody
This commit is contained in:
1 parent
fc996b7258
commit
6b8a8b6b4e
14 files changed
+288
-51
No files matched your search
@@ -139,10 +139,12 @@
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
<materialDesign:PopupBox Style="{StaticResource MaterialDesignMultiFloatingActionPopupBox}"
|
||||
<!-- PopupBox could be nice in the future when we actually have some stuff to send ppl to -->
|
||||
<!--<materialDesign:PopupBox Style="{StaticResource MaterialDesignMultiFloatingActionPopupBox}"
|
||||
HorizontalAlignment="Right" VerticalAlignment="Bottom"
|
||||
Margin="32" Grid.Row="1">
|
||||
<StackPanel>
|
||||
--><!-- add the visibility binding https://github.com/ButchersBoy/MaterialDesignInXamlToolkit/issues/723 --><!--
|
||||
<StackPanel Visibility="{Binding Path=IsPopupOpen, ElementName=MyPopupBox, Converter={StaticResource BoolToVisibilityConverter}}">
|
||||
<Button ToolTip="GitHub" Command="{Binding OpenUrl}" CommandParameter="https://github.com/SpoinkyNL/Artemis">
|
||||
<materialDesign:PackIcon Kind="GithubCircle" Height="20" Width="20" />
|
||||
</Button>
|
||||
@@ -152,7 +154,7 @@
|
||||
<materialDesign:PackIcon Kind="Twitter" />
|
||||
</Button>
|
||||
<Button ToolTip="Chat" Command="{Binding OpenUrl}" CommandParameter="https://github.com/SpoinkyNL/Artemis">
|
||||
<!-- mix up the colours by brinking in a named palette (see merged dictionaries at top) -->
|
||||
--><!-- mix up the colours by brinking in a named palette (see merged dictionaries at top) --><!--
|
||||
<Button.Background>
|
||||
<SolidColorBrush Color="{StaticResource GreenPrimary500}" />
|
||||
</Button.Background>
|
||||
@@ -178,6 +180,6 @@
|
||||
<materialDesign:PackIcon Kind="Gift" />
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</materialDesign:PopupBox>
|
||||
</materialDesign:PopupBox>-->
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -1,20 +1,30 @@
|
||||
using System.Windows.Controls;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using Artemis.UI.ViewModels;
|
||||
using ReactiveUI;
|
||||
|
||||
namespace Artemis.UI.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for MainView.xaml
|
||||
/// </summary>
|
||||
public partial class MainView : UserControl
|
||||
public partial class MainView : UserControl, IViewFor<IMainViewModel>
|
||||
{
|
||||
public static readonly DependencyProperty ViewModelProperty =
|
||||
DependencyProperty.Register("ViewModel", typeof(IMainViewModel), typeof(MainView), new PropertyMetadata(null));
|
||||
|
||||
public MainView()
|
||||
{
|
||||
ViewModel = new MainViewModel();
|
||||
InitializeComponent();
|
||||
DataContext = ViewModel;
|
||||
this.WhenAnyValue(x => x.ViewModel).BindTo(this, x => x.DataContext);
|
||||
}
|
||||
|
||||
public MainViewModel ViewModel { get; set; }
|
||||
object IViewFor.ViewModel
|
||||
{
|
||||
get => ViewModel;
|
||||
set => ViewModel = (IMainViewModel) value;
|
||||
}
|
||||
|
||||
public IMainViewModel ViewModel { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user