Many nice features
This commit is contained in:
parent
01a90bd460
commit
2b295c9d93
@ -13,6 +13,10 @@
|
||||
<assemblyIdentity name="Prism" publicKeyToken="40ee6c3a2184dc59" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-7.0.0.396" newVersion="7.0.0.396" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="CommonServiceLocator" publicKeyToken="489b6accfaf20ef0" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.0.4.0" newVersion="2.0.4.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
|
@ -1,8 +1,9 @@
|
||||
<Application x:Class="MaterialModernWPF.App"
|
||||
<prism:PrismApplication x:Class="MaterialModernWPF.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:MaterialModernWPF"
|
||||
xmlns:dragablz="http://dragablz.net/winfx/xaml/dragablz">
|
||||
xmlns:dragablz="http://dragablz.net/winfx/xaml/dragablz"
|
||||
xmlns:prism="http://prismlibrary.com/">
|
||||
<Application.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
@ -11,12 +12,11 @@
|
||||
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" />
|
||||
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Primary/MaterialDesignColor.Blue.xaml" />
|
||||
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Accent/MaterialDesignColor.Lime.xaml" />
|
||||
<!-- Dragablz Material Design -->
|
||||
<ResourceDictionary Source="pack://application:,,,/Dragablz;component/Themes/materialdesign.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<!-- Dragablz Material Design -->
|
||||
<Style TargetType="{x:Type dragablz:TabablzControl}" BasedOn="{StaticResource MaterialDesignTabablzControlStyle}" />
|
||||
</ResourceDictionary>
|
||||
</Application.Resources>
|
||||
</Application>
|
||||
</prism:PrismApplication>
|
||||
|
||||
|
||||
|
||||
|
@ -1,16 +1,39 @@
|
||||
using System.Windows;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows;
|
||||
using MaterialModernWPF.Module;
|
||||
using MaterialModernWPF.Service;
|
||||
using MaterialModernWPF.View;
|
||||
using Prism.DryIoc;
|
||||
using Prism.Ioc;
|
||||
using Prism.Modularity;
|
||||
|
||||
namespace MaterialModernWPF
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaktionslogik für "App.xaml"
|
||||
/// </summary>
|
||||
public partial class App : Application
|
||||
public partial class App : PrismApplication
|
||||
{
|
||||
protected override void OnStartup(StartupEventArgs e)
|
||||
protected override void RegisterTypes(IContainerRegistry containerRegistry)
|
||||
{
|
||||
base.OnStartup(e);
|
||||
new Bootstrapper().Run();
|
||||
containerRegistry.Register<ShellViewModel>();
|
||||
containerRegistry.Register<Shell>();
|
||||
containerRegistry.RegisterSingleton<CalculationPackageContainer>();
|
||||
containerRegistry.RegisterSingleton<CalculationPackage, DetailedGeometryPackage>();
|
||||
containerRegistry.RegisterSingleton<CalculationPackage, AdditionalMoments>();
|
||||
containerRegistry.RegisterForNavigation<DetailedGeometryView>();
|
||||
}
|
||||
|
||||
protected override Window CreateShell()
|
||||
{
|
||||
return Container.Resolve<Shell>();
|
||||
}
|
||||
|
||||
|
||||
protected override void ConfigureModuleCatalog(IModuleCatalog moduleCatalog)
|
||||
{
|
||||
moduleCatalog.AddModule(typeof(MainModule));
|
||||
base.ConfigureModuleCatalog(moduleCatalog);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
using System.Windows;
|
||||
using Autofac;
|
||||
using Prism.Autofac;
|
||||
|
||||
namespace MaterialModernWPF
|
||||
{
|
||||
public class Bootstrapper : AutofacBootstrapper
|
||||
{
|
||||
protected override void ConfigureContainerBuilder(ContainerBuilder builder)
|
||||
{
|
||||
base.ConfigureContainerBuilder(builder);
|
||||
builder.RegisterType<Shell>();
|
||||
}
|
||||
|
||||
protected override DependencyObject CreateShell() => Container.Resolve<Shell>();
|
||||
|
||||
protected override void InitializeShell()
|
||||
{
|
||||
Application.Current.MainWindow = Shell as Window;
|
||||
Application.Current.MainWindow?.Show();
|
||||
}
|
||||
}
|
||||
}
|
8
MaterialModernWPF/Constants.cs
Normal file
8
MaterialModernWPF/Constants.cs
Normal file
@ -0,0 +1,8 @@
|
||||
namespace MaterialModernWPF
|
||||
{
|
||||
public static class Constants
|
||||
{
|
||||
public const string MainRegion = "MainRegion";
|
||||
public const string PackagesRegion = "PackagesRegion";
|
||||
}
|
||||
}
|
@ -40,14 +40,11 @@
|
||||
<ApplicationIcon>airballoon.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Autofac, Version=4.8.1.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Autofac.4.8.1\lib\net45\Autofac.dll</HintPath>
|
||||
<Reference Include="CommonServiceLocator, Version=2.0.4.0, Culture=neutral, PublicKeyToken=489b6accfaf20ef0, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\CommonServiceLocator.2.0.4\lib\net46\CommonServiceLocator.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="CommonServiceLocator, Version=2.0.3.0, Culture=neutral, PublicKeyToken=489b6accfaf20ef0, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\CommonServiceLocator.2.0.3\lib\net45\CommonServiceLocator.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Dragablz, Version=0.0.3.203, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Dragablz.0.0.3.203\lib\net45\Dragablz.dll</HintPath>
|
||||
<Reference Include="DryIoc, Version=2.12.10.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\DryIoc.dll.2.12.10\lib\net45\DryIoc.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MaterialDesignColors, Version=1.1.3.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MaterialDesignColors.1.1.3\lib\net45\MaterialDesignColors.dll</HintPath>
|
||||
@ -57,22 +54,22 @@
|
||||
<HintPath>..\packages\MaterialDesignThemes.2.4.0.1044\lib\net45\MaterialDesignThemes.Wpf.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ModernWpf.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=c99d0cfbea7491ef, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ModernWpf.Core.2.0.0-alpha94\lib\net40-Client\ModernWpf.Core.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<HintPath>..\packages\ModernWpf.Core.2.0.0-beta01\lib\net40-Client\ModernWpf.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Prism, Version=7.0.0.396, Culture=neutral, PublicKeyToken=40ee6c3a2184dc59, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Prism.Core.7.0.0.396\lib\net45\Prism.dll</HintPath>
|
||||
<Reference Include="Prism, Version=7.1.0.172, Culture=neutral, PublicKeyToken=40ee6c3a2184dc59, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Prism.Core.7.1.0.172-pre\lib\net45\Prism.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Prism.Autofac.Wpf, Version=6.3.0.0, Culture=neutral, PublicKeyToken=40ee6c3a2184dc59, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Prism.Autofac.6.3.0\lib\net45\Prism.Autofac.Wpf.dll</HintPath>
|
||||
<Reference Include="Prism.DryIoc.Wpf, Version=7.1.0.172, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Prism.DryIoc.7.1.0.172-pre\lib\net45\Prism.DryIoc.Wpf.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Prism.Wpf, Version=6.3.0.0, Culture=neutral, PublicKeyToken=40ee6c3a2184dc59, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Prism.Wpf.6.3.0\lib\net45\Prism.Wpf.dll</HintPath>
|
||||
<Reference Include="Prism.Wpf, Version=7.1.0.172, Culture=neutral, PublicKeyToken=40ee6c3a2184dc59, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Prism.Wpf.7.1.0.172-pre\lib\net45\Prism.Wpf.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Prism.Wpf.6.3.0\lib\net45\System.Windows.Interactivity.dll</HintPath>
|
||||
<Reference Include="System.ValueTuple, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.ValueTuple.4.3.0\lib\netstandard1.0\System.ValueTuple.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
@ -96,16 +93,30 @@
|
||||
<DependentUpon>App.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="InfoDialog.xaml.cs">
|
||||
<Compile Include="Constants.cs" />
|
||||
<Compile Include="Module\MainModule.cs" />
|
||||
<Compile Include="Module\MainView.xaml.cs">
|
||||
<DependentUpon>MainView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Module\MainViewModel.cs" />
|
||||
<Compile Include="Service\CalculationPackage.cs" />
|
||||
<Compile Include="Service\CalculationPackageContainer.cs" />
|
||||
<Compile Include="Service\CalculationPackageSelectionChangedEvent.cs" />
|
||||
<Compile Include="Service\AdditionalMoments.cs" />
|
||||
<Compile Include="Service\DetailedGeometryPackage.cs" />
|
||||
<Compile Include="Service\DetailedGeometryView.xaml.cs">
|
||||
<DependentUpon>DetailedGeometryView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\InfoDialog.xaml.cs">
|
||||
<DependentUpon>InfoDialog.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Shell.xaml.cs">
|
||||
<Compile Include="View\Shell.xaml.cs">
|
||||
<DependentUpon>Shell.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="View\ShellViewModel.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Bootstrapper.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
@ -137,15 +148,24 @@
|
||||
<Resource Include="airballoon.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Page Include="InfoDialog.xaml">
|
||||
<Page Include="Module\MainView.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Shell.xaml">
|
||||
<Page Include="Service\DetailedGeometryView.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="View\InfoDialog.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="View\Shell.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
22
MaterialModernWPF/Module/MainModule.cs
Normal file
22
MaterialModernWPF/Module/MainModule.cs
Normal file
@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using Prism.Ioc;
|
||||
using Prism.Modularity;
|
||||
using Prism.Regions;
|
||||
|
||||
namespace MaterialModernWPF.Module
|
||||
{
|
||||
public class MainModule : IModule
|
||||
{
|
||||
public void RegisterTypes(IContainerRegistry containerRegistry)
|
||||
{
|
||||
containerRegistry.Register<MainViewModel>();
|
||||
containerRegistry.RegisterForNavigation<MainView>();
|
||||
}
|
||||
|
||||
public void OnInitialized(IContainerProvider containerProvider)
|
||||
{
|
||||
var regionManager = containerProvider.Resolve<IRegionManager>();
|
||||
regionManager.RequestNavigate(Constants.MainRegion, new Uri(nameof(MainView), UriKind.Relative));
|
||||
}
|
||||
}
|
||||
}
|
33
MaterialModernWPF/Module/MainView.xaml
Normal file
33
MaterialModernWPF/Module/MainView.xaml
Normal file
@ -0,0 +1,33 @@
|
||||
<UserControl
|
||||
x:Class="MaterialModernWPF.Module.MainView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:MaterialModernWPF.Module"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:prism="http://prismlibrary.com/"
|
||||
xmlns:root="clr-namespace:MaterialModernWPF"
|
||||
d:DataContext="{d:DesignInstance local:MainViewModel}"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
prism:ViewModelLocator.AutoWireViewModel="True"
|
||||
mc:Ignorable="d">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" MinWidth="150" />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<ListBox
|
||||
Grid.Column="0"
|
||||
DisplayMemberPath="Name"
|
||||
ItemsSource="{Binding Packages}"
|
||||
SelectionMode="Multiple">
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style BasedOn="{StaticResource {x:Type ListBoxItem}}" TargetType="ListBoxItem">
|
||||
<Setter Property="IsSelected" Value="{Binding IsSelected}" />
|
||||
</Style>
|
||||
</ListBox.ItemContainerStyle>
|
||||
</ListBox>
|
||||
<ItemsControl Grid.Column="1" prism:RegionManager.RegionName="{x:Static root:Constants.PackagesRegion}" />
|
||||
</Grid>
|
||||
</UserControl>
|
28
MaterialModernWPF/Module/MainView.xaml.cs
Normal file
28
MaterialModernWPF/Module/MainView.xaml.cs
Normal file
@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace MaterialModernWPF.Module
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaktionslogik für MainView.xaml
|
||||
/// </summary>
|
||||
public partial class MainView : UserControl
|
||||
{
|
||||
public MainView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
18
MaterialModernWPF/Module/MainViewModel.cs
Normal file
18
MaterialModernWPF/Module/MainViewModel.cs
Normal file
@ -0,0 +1,18 @@
|
||||
using System.Collections.Generic;
|
||||
using DryIoc;
|
||||
using MaterialModernWPF.Service;
|
||||
|
||||
namespace MaterialModernWPF.Module
|
||||
{
|
||||
public class MainViewModel
|
||||
{
|
||||
private readonly CalculationPackageContainer _container;
|
||||
|
||||
public MainViewModel(CalculationPackageContainer container)
|
||||
{
|
||||
_container = container;
|
||||
}
|
||||
|
||||
public IEnumerable<CalculationPackage> Packages => _container.CalculationPackages;
|
||||
}
|
||||
}
|
17
MaterialModernWPF/Service/AdditionalMoments.cs
Normal file
17
MaterialModernWPF/Service/AdditionalMoments.cs
Normal file
@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using Prism.Events;
|
||||
|
||||
namespace MaterialModernWPF.Service
|
||||
{
|
||||
public class AdditionalMoments : CalculationPackage
|
||||
{
|
||||
public AdditionalMoments(IEventAggregator eventAggregator) : base(eventAggregator)
|
||||
{
|
||||
Name = "Additional moments";
|
||||
CalculationViewType = typeof(DetailedGeometryView);
|
||||
}
|
||||
|
||||
public override string Name { get; }
|
||||
public override Type CalculationViewType { get; }
|
||||
}
|
||||
}
|
37
MaterialModernWPF/Service/CalculationPackage.cs
Normal file
37
MaterialModernWPF/Service/CalculationPackage.cs
Normal file
@ -0,0 +1,37 @@
|
||||
using System;
|
||||
using System.Windows.Controls;
|
||||
using Prism.Events;
|
||||
|
||||
namespace MaterialModernWPF.Service
|
||||
{
|
||||
public abstract class CalculationPackage
|
||||
{
|
||||
private readonly IEventAggregator _eventAggregator;
|
||||
private bool _isSelected;
|
||||
|
||||
public CalculationPackage(IEventAggregator eventAggregator)
|
||||
{
|
||||
_eventAggregator = eventAggregator;
|
||||
}
|
||||
|
||||
public abstract string Name { get; }
|
||||
|
||||
public bool IsSelected
|
||||
{
|
||||
get => _isSelected;
|
||||
set
|
||||
{
|
||||
if (Equals(_isSelected, value)) return;
|
||||
_isSelected = value;
|
||||
_eventAggregator.GetEvent<CalculationPackageSelectionChangedEvent>().Publish((this, value));
|
||||
}
|
||||
}
|
||||
|
||||
public abstract Type CalculationViewType { get; }
|
||||
}
|
||||
|
||||
public class CalculationView : UserControl
|
||||
{
|
||||
|
||||
}
|
||||
}
|
40
MaterialModernWPF/Service/CalculationPackageContainer.cs
Normal file
40
MaterialModernWPF/Service/CalculationPackageContainer.cs
Normal file
@ -0,0 +1,40 @@
|
||||
using System.Linq;
|
||||
using DryIoc;
|
||||
using Prism.Events;
|
||||
using Prism.Regions;
|
||||
|
||||
namespace MaterialModernWPF.Service
|
||||
{
|
||||
public class CalculationPackageContainer
|
||||
{
|
||||
private readonly IRegionManager _regionManager;
|
||||
private readonly IResolver _resolver;
|
||||
public CalculationPackage[] CalculationPackages { get; }
|
||||
|
||||
public CalculationPackageContainer(
|
||||
IEventAggregator eventAggregator, IRegionManager regionManager,
|
||||
IResolver resolver)
|
||||
{
|
||||
_regionManager = regionManager;
|
||||
_resolver = resolver;
|
||||
CalculationPackages = resolver.ResolveMany<CalculationPackage>().ToArray();
|
||||
eventAggregator.GetEvent<CalculationPackageSelectionChangedEvent>().Subscribe(SelectionChanged);
|
||||
}
|
||||
|
||||
private void SelectionChanged((CalculationPackage sender, bool isSelected) payload)
|
||||
{
|
||||
var viewKey = payload.sender.CalculationViewType.FullName;
|
||||
var region = _regionManager.Regions[Constants.PackagesRegion];
|
||||
if (payload.isSelected)
|
||||
{
|
||||
var view = _resolver.Resolve(payload.sender.CalculationViewType);
|
||||
region.Add(view, viewKey);
|
||||
}
|
||||
else
|
||||
{
|
||||
var view = region.GetView(viewKey);
|
||||
region.Remove(view);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
using Prism.Events;
|
||||
|
||||
namespace MaterialModernWPF.Service
|
||||
{
|
||||
public class CalculationPackageSelectionChangedEvent : PubSubEvent<(CalculationPackage, bool)>
|
||||
{
|
||||
|
||||
}
|
||||
}
|
17
MaterialModernWPF/Service/DetailedGeometryPackage.cs
Normal file
17
MaterialModernWPF/Service/DetailedGeometryPackage.cs
Normal file
@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using Prism.Events;
|
||||
|
||||
namespace MaterialModernWPF.Service
|
||||
{
|
||||
public class DetailedGeometryPackage : CalculationPackage
|
||||
{
|
||||
public DetailedGeometryPackage(IEventAggregator eventAggregator) : base(eventAggregator)
|
||||
{
|
||||
Name = "Detailed Geometry";
|
||||
CalculationViewType = typeof(DetailedGeometryView);
|
||||
}
|
||||
|
||||
public override string Name { get; }
|
||||
public override Type CalculationViewType { get; }
|
||||
}
|
||||
}
|
14
MaterialModernWPF/Service/DetailedGeometryView.xaml
Normal file
14
MaterialModernWPF/Service/DetailedGeometryView.xaml
Normal file
@ -0,0 +1,14 @@
|
||||
<local:CalculationView
|
||||
x:Class="MaterialModernWPF.Service.DetailedGeometryView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:MaterialModernWPF.Service"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
mc:Ignorable="d">
|
||||
<GroupBox Margin="10" Header="Detailed Geometry">
|
||||
<TextBlock FontSize="100" Text="Hallo Welt" />
|
||||
</GroupBox>
|
||||
</local:CalculationView>
|
28
MaterialModernWPF/Service/DetailedGeometryView.xaml.cs
Normal file
28
MaterialModernWPF/Service/DetailedGeometryView.xaml.cs
Normal file
@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace MaterialModernWPF.Service
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaktionslogik für DetailedGeometryView.xaml
|
||||
/// </summary>
|
||||
public partial class DetailedGeometryView : CalculationView
|
||||
{
|
||||
public DetailedGeometryView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,131 +0,0 @@
|
||||
<Window x:Class="MaterialModernWPF.Shell"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:dragablz="http://dragablz.net/winfx/xaml/dragablz"
|
||||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||
xmlns:materialModernWpf="clr-namespace:MaterialModernWPF"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:modern="http://modernwpf"
|
||||
xmlns:prism="http://prismlibrary.com/"
|
||||
x:Name="Window"
|
||||
Title="NiftyTool NG"
|
||||
Width="920"
|
||||
Height="600"
|
||||
modern:UIHooks.AutoDpiScale="True"
|
||||
Background="{DynamicResource MaterialDesignPaper}"
|
||||
FontFamily="pack://application:,,,/MaterialDesignThemes.Wpf;component/Resources/Roboto/#Roboto"
|
||||
Icon="airballoon.ico"
|
||||
ResizeMode="CanResizeWithGrip"
|
||||
TextElement.Foreground="{DynamicResource MaterialDesignBody}"
|
||||
mc:Ignorable="d">
|
||||
<modern:Chrome.Chrome>
|
||||
<modern:Chrome ActiveBorderBrush="{StaticResource PrimaryHueDarkBrush}" />
|
||||
</modern:Chrome.Chrome>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<modern:TitleBar Grid.Row="0"
|
||||
Background="{StaticResource PrimaryHueDarkBrush}"
|
||||
ShowTitle="False" />
|
||||
<materialDesign:DialogHost Grid.Row="1" Identifier="RootDialog">
|
||||
<materialDesign:DialogHost.DialogContent>
|
||||
<materialModernWpf:InfoDialog />
|
||||
</materialDesign:DialogHost.DialogContent>
|
||||
<materialDesign:DrawerHost IsLeftDrawerOpen="{Binding ElementName=MenuToggleButton, Path=IsChecked}">
|
||||
<materialDesign:DrawerHost.LeftDrawerContent>
|
||||
<DockPanel MinWidth="212">
|
||||
<ToggleButton Margin="12"
|
||||
HorizontalAlignment="Right"
|
||||
DockPanel.Dock="Top"
|
||||
IsChecked="{Binding ElementName=MenuToggleButton,
|
||||
Path=IsChecked,
|
||||
Mode=TwoWay}"
|
||||
Style="{StaticResource MaterialDesignHamburgerToggleButton}" />
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Row="0"
|
||||
Margin="5"
|
||||
Text="Favorites" />
|
||||
<ListBox Grid.Row="1">
|
||||
<TextBlock Text="WIND020214" />
|
||||
<TextBlock Text="WIND020248" />
|
||||
<TextBlock Text="SRV-LSIMCTRL01" />
|
||||
</ListBox>
|
||||
<TextBlock Grid.Row="2"
|
||||
Margin="5"
|
||||
Text="History" />
|
||||
<ListBox Grid.Row="3">
|
||||
<TextBlock Text="WIND020214" />
|
||||
<TextBlock Text="WIND020248" />
|
||||
<TextBlock Text="SRV-LSIMCTRL01" />
|
||||
</ListBox>
|
||||
</Grid>
|
||||
</DockPanel>
|
||||
</materialDesign:DrawerHost.LeftDrawerContent>
|
||||
<DockPanel>
|
||||
<materialDesign:ColorZone materialDesign:ShadowAssist.ShadowDepth="Depth2"
|
||||
DockPanel.Dock="Top"
|
||||
Mode="PrimaryMid"
|
||||
Padding="2">
|
||||
<DockPanel>
|
||||
<ToggleButton x:Name="MenuToggleButton"
|
||||
IsChecked="False"
|
||||
Style="{StaticResource MaterialDesignHamburgerToggleButton}" />
|
||||
<StackPanel DockPanel.Dock="Right" Orientation="Horizontal">
|
||||
<Button materialDesign:ShadowAssist.ShadowDepth="Depth0" Style="{StaticResource MaterialDesignFloatingActionButton}">
|
||||
<materialDesign:PackIcon Width="32"
|
||||
Height="32"
|
||||
Kind="CubeOutline" />
|
||||
</Button>
|
||||
<Button materialDesign:ShadowAssist.ShadowDepth="Depth0" Style="{StaticResource MaterialDesignFloatingActionButton}">
|
||||
<materialDesign:PackIcon Width="32"
|
||||
Height="32"
|
||||
Kind="Clippy" />
|
||||
</Button>
|
||||
<materialDesign:PopupBox PlacementMode="BottomAndAlignRightEdges" StaysOpen="False">
|
||||
<StackPanel>
|
||||
<Button Command="{x:Static materialDesign:DialogHost.OpenDialogCommand}" Content="Einstellungen" />
|
||||
<Button Command="{x:Static materialDesign:DialogHost.OpenDialogCommand}" Content="Info" />
|
||||
</StackPanel>
|
||||
</materialDesign:PopupBox>
|
||||
</StackPanel>
|
||||
<TextBlock Margin="10,0,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="22"
|
||||
Text="{Binding Title,
|
||||
ElementName=Window}" />
|
||||
</DockPanel>
|
||||
</materialDesign:ColorZone>
|
||||
<dragablz:TabablzControl>
|
||||
<dragablz:TabablzControl.InterTabController>
|
||||
<dragablz:InterTabController />
|
||||
</dragablz:TabablzControl.InterTabController>
|
||||
<TabItem Header="Tab No. 1" IsSelected="True">
|
||||
<TextBlock Margin="12"
|
||||
FontSize="24"
|
||||
Foreground="{StaticResource MaterialDesignDarkForeground}">
|
||||
Hello World
|
||||
</TextBlock>
|
||||
</TabItem>
|
||||
<TabItem Header="Tab No. 2">
|
||||
<TextBlock Margin="12"
|
||||
FontSize="24"
|
||||
Foreground="{StaticResource MaterialDesignDarkForeground}">
|
||||
We Have Tearable Tabs!
|
||||
</TextBlock>
|
||||
</TabItem>
|
||||
</dragablz:TabablzControl>
|
||||
</DockPanel>
|
||||
</materialDesign:DrawerHost>
|
||||
</materialDesign:DialogHost>
|
||||
</Grid>
|
||||
</Window>
|
@ -1,4 +1,4 @@
|
||||
<UserControl x:Class="MaterialModernWPF.InfoDialog"
|
||||
<UserControl x:Class="MaterialModernWPF.View.InfoDialog"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
@ -1,4 +1,4 @@
|
||||
namespace MaterialModernWPF
|
||||
namespace MaterialModernWPF.View
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaktionslogik für InfoDialog.xaml
|
120
MaterialModernWPF/View/Shell.xaml
Normal file
120
MaterialModernWPF/View/Shell.xaml
Normal file
@ -0,0 +1,120 @@
|
||||
<Window
|
||||
x:Class="MaterialModernWPF.View.Shell"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:modern="http://modernwpf"
|
||||
xmlns:prism="http://prismlibrary.com/"
|
||||
xmlns:root="clr-namespace:MaterialModernWPF"
|
||||
xmlns:view="clr-namespace:MaterialModernWPF.View"
|
||||
x:Name="Window"
|
||||
Title="NiftyTool NG"
|
||||
Width="920"
|
||||
Height="600"
|
||||
modern:UIHooks.AutoDpiScale="True"
|
||||
prism:ViewModelLocator.AutoWireViewModel="True"
|
||||
Background="{DynamicResource MaterialDesignPaper}"
|
||||
FontFamily="pack://application:,,,/MaterialDesignThemes.Wpf;component/Resources/Roboto/#Roboto"
|
||||
ResizeMode="CanResizeWithGrip"
|
||||
TextElement.Foreground="{DynamicResource MaterialDesignBody}"
|
||||
mc:Ignorable="d">
|
||||
<modern:Chrome.Chrome>
|
||||
<modern:Chrome ActiveBorderBrush="{StaticResource PrimaryHueDarkBrush}" />
|
||||
</modern:Chrome.Chrome>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<modern:TitleBar
|
||||
Grid.Row="0"
|
||||
Background="{StaticResource PrimaryHueDarkBrush}"
|
||||
ShowTitle="False" />
|
||||
<materialDesign:DialogHost Grid.Row="1" Identifier="RootDialog">
|
||||
<materialDesign:DialogHost.DialogContent>
|
||||
<view:InfoDialog />
|
||||
</materialDesign:DialogHost.DialogContent>
|
||||
<materialDesign:DrawerHost IsLeftDrawerOpen="{Binding ElementName=MenuToggleButton, Path=IsChecked}">
|
||||
<materialDesign:DrawerHost.LeftDrawerContent>
|
||||
<DockPanel MinWidth="212">
|
||||
<ToggleButton
|
||||
Margin="12"
|
||||
HorizontalAlignment="Right"
|
||||
DockPanel.Dock="Top"
|
||||
IsChecked="{Binding ElementName=MenuToggleButton, Path=IsChecked, Mode=TwoWay}"
|
||||
Style="{StaticResource MaterialDesignHamburgerToggleButton}" />
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock
|
||||
Grid.Row="0"
|
||||
Margin="5"
|
||||
Text="Favorites" />
|
||||
<ListBox Grid.Row="1">
|
||||
<TextBlock Text="WIND020214" />
|
||||
<TextBlock Text="WIND020248" />
|
||||
<TextBlock Text="SRV-LSIMCTRL01" />
|
||||
</ListBox>
|
||||
<TextBlock
|
||||
Grid.Row="2"
|
||||
Margin="5"
|
||||
Text="History" />
|
||||
<ListBox Grid.Row="3">
|
||||
<TextBlock Text="WIND020214" />
|
||||
<TextBlock Text="WIND020248" />
|
||||
<TextBlock Text="SRV-LSIMCTRL01" />
|
||||
</ListBox>
|
||||
</Grid>
|
||||
</DockPanel>
|
||||
</materialDesign:DrawerHost.LeftDrawerContent>
|
||||
<DockPanel>
|
||||
<materialDesign:ColorZone
|
||||
Padding="2"
|
||||
materialDesign:ShadowAssist.ShadowDepth="Depth2"
|
||||
DockPanel.Dock="Top"
|
||||
Mode="PrimaryMid">
|
||||
<DockPanel>
|
||||
<ToggleButton
|
||||
x:Name="MenuToggleButton"
|
||||
IsChecked="False"
|
||||
Style="{StaticResource MaterialDesignHamburgerToggleButton}" />
|
||||
<StackPanel DockPanel.Dock="Right" Orientation="Horizontal">
|
||||
<Button materialDesign:ShadowAssist.ShadowDepth="Depth0" Style="{StaticResource MaterialDesignFloatingActionButton}">
|
||||
<materialDesign:PackIcon
|
||||
Width="32"
|
||||
Height="32"
|
||||
Kind="CubeOutline" />
|
||||
</Button>
|
||||
<Button materialDesign:ShadowAssist.ShadowDepth="Depth0" Style="{StaticResource MaterialDesignFloatingActionButton}">
|
||||
<materialDesign:PackIcon
|
||||
Width="32"
|
||||
Height="32"
|
||||
Kind="Clippy" />
|
||||
</Button>
|
||||
<materialDesign:PopupBox PlacementMode="BottomAndAlignRightEdges" StaysOpen="False">
|
||||
<StackPanel>
|
||||
<Button Command="{x:Static materialDesign:DialogHost.OpenDialogCommand}" Content="Einstellungen" />
|
||||
<Button Command="{x:Static materialDesign:DialogHost.OpenDialogCommand}" Content="Info" />
|
||||
</StackPanel>
|
||||
</materialDesign:PopupBox>
|
||||
</StackPanel>
|
||||
<TextBlock
|
||||
Margin="10,0,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="22"
|
||||
Text="{Binding Title, ElementName=Window}" />
|
||||
</DockPanel>
|
||||
</materialDesign:ColorZone>
|
||||
<ContentControl prism:RegionManager.RegionName="{x:Static root:Constants.MainRegion}" />
|
||||
</DockPanel>
|
||||
</materialDesign:DrawerHost>
|
||||
</materialDesign:DialogHost>
|
||||
</Grid>
|
||||
</Window>
|
@ -1,4 +1,4 @@
|
||||
namespace MaterialModernWPF
|
||||
namespace MaterialModernWPF.View
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaktionslogik für MainWindow.xaml
|
11
MaterialModernWPF/View/ShellViewModel.cs
Normal file
11
MaterialModernWPF/View/ShellViewModel.cs
Normal file
@ -0,0 +1,11 @@
|
||||
using Prism.Mvvm;
|
||||
|
||||
namespace MaterialModernWPF.View
|
||||
{
|
||||
public class ShellViewModel : BindableBase
|
||||
{
|
||||
public ShellViewModel()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
@ -1,12 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Autofac" version="4.8.1" targetFramework="net461" />
|
||||
<package id="CommonServiceLocator" version="2.0.3" targetFramework="net461" />
|
||||
<package id="Dragablz" version="0.0.3.203" targetFramework="net461" />
|
||||
<package id="CommonServiceLocator" version="2.0.4" targetFramework="net461" />
|
||||
<package id="DryIoc.dll" version="2.12.10" targetFramework="net461" />
|
||||
<package id="MaterialDesignColors" version="1.1.3" targetFramework="net452" />
|
||||
<package id="MaterialDesignThemes" version="2.4.0.1044" targetFramework="net461" />
|
||||
<package id="ModernWpf.Core" version="2.0.0-alpha94" targetFramework="net452" />
|
||||
<package id="Prism.Autofac" version="6.3.0" targetFramework="net461" />
|
||||
<package id="Prism.Core" version="7.0.0.396" targetFramework="net461" />
|
||||
<package id="Prism.Wpf" version="6.3.0" targetFramework="net461" />
|
||||
<package id="ModernWpf.Core" version="2.0.0-beta01" targetFramework="net461" />
|
||||
<package id="Prism.Core" version="7.1.0.172-pre" targetFramework="net461" />
|
||||
<package id="Prism.DryIoc" version="7.1.0.172-pre" targetFramework="net461" />
|
||||
<package id="Prism.Wpf" version="7.1.0.172-pre" targetFramework="net461" />
|
||||
<package id="System.ValueTuple" version="4.3.0" targetFramework="net461" />
|
||||
</packages>
|
Loading…
x
Reference in New Issue
Block a user