Guest User

Untitled

a guest
Jan 20th, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.96 KB | None | 0 0
  1. <Window
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
  7. xmlns:xcad="http://schemas.xceed.com/wpf/xaml/avalondock"
  8. xmlns:dockctrl="clr-namespace:Xceed.Wpf.AvalonDock.Controls;assembly=Xceed.Wpf.AvalonDock"
  9. xmlns:view="clr-namespace:Galaxy_Rotation_4.View"
  10. xmlns:viewmodel="clr-namespace:Galaxy_Rotation_4.ViewModel"
  11. xmlns:menuVM="clr-namespace:Galaxy_Rotation_4.ViewModel.Menu"
  12. xmlns:diagramsVM="clr-namespace:Galaxy_Rotation_4.ViewModel.Diagrams"
  13. xmlns:ic="clr-namespace:Galaxy_Rotation_4.View.ImportedGraphicsControls"
  14. xmlns:cc="clr-namespace:Galaxy_Rotation_4.View.ComponentControls"
  15. x:Class="Galaxy_Rotation_4.MainWindow"
  16. Title="Galaxy Rotation 3" Height="550" Width="1000"
  17. WindowState="Maximized"
  18. mc:Ignorable="d"
  19. x:Name="mainWindow"
  20. d:DataContext="{viewmodel:MainWindowVM}">
  21.  
  22. <Grid>
  23. <Grid.RowDefinitions>
  24. <RowDefinition Height="Auto"/>
  25. <RowDefinition />
  26. </Grid.RowDefinitions>
  27.  
  28. <Menu>
  29. <!--Меню "Файл"-->
  30. <MenuItem Header="Файл">
  31.  
  32. <MenuItem Header="Выход" Command="{Binding Path=Quit}"/>
  33. </MenuItem>
  34.  
  35. <!--Меню "Вид"-->
  36. <MenuItem Header="Вид" >
  37.  
  38. <MenuItem Header="Графики" DataContext="{Binding MenuGraphicsViewModel}" ItemsSource="{Binding Items}">
  39. <MenuItem.Resources>
  40. <Style TargetType="{x:Type MenuItem}" BasedOn="{StaticResource {x:Type MenuItem}}">
  41. <Setter Property="Command" Value="{Binding Command}" />
  42. <Setter Property="Header" Value="{Binding Header}" />
  43. <Setter Property="IsCheckable" Value="{Binding IsCheckable}" />
  44. <Setter Property="IsChecked" Value="{Binding IsChecked}" />
  45. </Style>
  46. <HierarchicalDataTemplate DataType="{x:Type menuVM:MenuItemVM}" ItemsSource="{Binding Items}" />
  47. </MenuItem.Resources>
  48. </MenuItem>
  49.  
  50. <MenuItem Header="Управление компонентами"
  51. IsCheckable="True" IsChecked="{Binding Path=IsVisible, ElementName=controls}" />
  52.  
  53. <MenuItem Header="Импорт"
  54. IsCheckable="True" IsChecked="{Binding Path=IsVisible, ElementName=importedGraphics}" />
  55.  
  56. <MenuItem Header="Среднеквадратичные отклонения"
  57. IsCheckable="True" IsChecked="{Binding Path=IsVisible, ElementName=standardDerivations}" />
  58.  
  59. <MenuItem Header="Отчет о массах"
  60. IsCheckable="True" IsChecked="{Binding Path=IsVisible, ElementName=massReport}" />
  61.  
  62. </MenuItem>
  63.  
  64. <!--Меню "Настройки"-->
  65. <MenuItem Header="Настройки">
  66.  
  67. <MenuItem Header="Вид кривых"
  68. IsCheckable="True" IsChecked="{Binding Path=IsVisible, ElementName=lineDesigner}" />
  69.  
  70. <!--<MenuItem Header="Параметры компонентов"/>-->
  71.  
  72. <MenuItem Header="Параметры расчетной области" Command="{Binding PlotAreaTuningCommand}"/>
  73. </MenuItem>
  74.  
  75. </Menu>
  76.  
  77.  
  78. <xcad:DockingManager Margin="0" Grid.Row="1"
  79. DataContext="{Binding DockManagerVM}"
  80. DocumentsSource="{Binding Documents}"
  81. AnchorablesSource="{Binding Anchorables}">
  82.  
  83. <xcad:DockingManager.LayoutItemContainerStyle>
  84. <!-- you can add additional bindings from the layoutitem to the DockWindowVM -->
  85. <Style TargetType="{x:Type dockctrl:LayoutItem}" >
  86. <Setter Property="Title" Value="{Binding Model.Title}" />
  87. <Setter Property="IsActive" Value="{Binding Model.IsActive}" />
  88. <Setter Property="CloseCommand" Value="{Binding Model.CloseCommand}" />
  89. <Setter Property="CanClose" Value="{Binding Model.CanClose}" />
  90. </Style>
  91. </xcad:DockingManager.LayoutItemContainerStyle>
  92.  
  93.  
  94. <xcad:DockingManager.Resources>
  95. <!-- add views for specific ViewModels -->
  96. <DataTemplate DataType="{x:Type diagramsVM:DiagramVM}">
  97. <view:Diagram />
  98. </DataTemplate>
  99. </xcad:DockingManager.Resources>
  100.  
  101.  
  102. <xcad:LayoutRoot>
  103.  
  104. <xcad:LayoutPanel Orientation="Horizontal">
  105.  
  106. <!--Левая колонка-->
  107. <xcad:LayoutAnchorablePane DockWidth="240" DockMinWidth="240">
  108.  
  109. <xcad:LayoutAnchorable Title="Компоненты" x:Name="controls">
  110. <cc:ControlsPane DataContext="{Binding ControlsVM}" />
  111. </xcad:LayoutAnchorable>
  112. <xcad:LayoutAnchorable Title="Импортированные графики" x:Name="importedGraphics">
  113. <ic:Pane DataContext="{Binding ImportedControlsPaneVM}" />
  114. </xcad:LayoutAnchorable>
  115.  
  116. </xcad:LayoutAnchorablePane>
  117.  
  118. <!--Средняя колонка-->
  119. <xcad:LayoutPanel Orientation="Vertical">
  120.  
  121. <xcad:LayoutAnchorablePaneGroup DockHeight="70">
  122. <xcad:LayoutAnchorablePane>
  123. <xcad:LayoutAnchorable Title="Среднеквадратичные отклонения" x:Name="standardDerivations" IsVisible="False">
  124. <view:StandardDeviations DataContext="{Binding StandardDeviationsGroupVM}" />
  125. </xcad:LayoutAnchorable>
  126. </xcad:LayoutAnchorablePane>
  127. </xcad:LayoutAnchorablePaneGroup>
  128.  
  129. <xcad:LayoutDocumentPane x:Name="documentPane" />
  130.  
  131. </xcad:LayoutPanel>
  132.  
  133. <!--Правая колонка-->
  134.  
  135. <xcad:LayoutAnchorablePane DockWidth="Auto">
  136. <xcad:LayoutAnchorable Title="Отчет о массах" x:Name="massReport" IsVisible="False">
  137. <view:MassReport DataContext="{Binding MassReportVM}" />
  138. </xcad:LayoutAnchorable>
  139. <xcad:LayoutAnchorable Title="Вид кривых" x:Name="lineDesigner" IsVisible="False">
  140. <view:LineDesigner DataContext="{Binding LineDesignerVM}"/>
  141. </xcad:LayoutAnchorable>
  142. </xcad:LayoutAnchorablePane>
  143.  
  144. </xcad:LayoutPanel>
  145. </xcad:LayoutRoot>
  146. </xcad:DockingManager>
  147.  
  148.  
  149. </Grid>
  150. </Window>
  151.  
  152. System.NullReferenceException
  153. HResult=0x80004003
  154. Сообщение = Ссылка на объект не указывает на экземпляр объекта.
  155. Источник = Xceed.Wpf.AvalonDock
  156. Трассировка стека:
  157. в Xceed.Wpf.AvalonDock.Controls.LayoutAnchorableTabItem.OnMouseEnter(MouseEventArgs e)
  158. в System.Windows.UIElement.OnMouseEnterThunk(Object sender, MouseEventArgs e)
  159. в System.Windows.Input.MouseEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
  160. в System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
  161. в System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
  162. в System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
  163. в System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
  164. в System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
  165. в System.Windows.MouseOverProperty.FireNotifications(UIElement uie, ContentElement ce, UIElement3D uie3D, Boolean oldValue)
  166. в System.Windows.ReverseInheritProperty.FirePropertyChangeInAncestry(DependencyObject element, Boolean oldValue, DeferredElementTreeState treeState, Action`2 originChangedAction)
  167. в System.Windows.ReverseInheritProperty.FirePropertyChangeInAncestry(DependencyObject element, Boolean oldValue, DeferredElementTreeState treeState, Action`2 originChangedAction)
  168. в System.Windows.ReverseInheritProperty.FirePropertyChangeInAncestry(DependencyObject element, Boolean oldValue, DeferredElementTreeState treeState, Action`2 originChangedAction)
  169. в System.Windows.ReverseInheritProperty.FirePropertyChangeInAncestry(DependencyObject element, Boolean oldValue, DeferredElementTreeState treeState, Action`2 originChangedAction)
  170. в System.Windows.ReverseInheritProperty.FirePropertyChangeInAncestry(DependencyObject element, Boolean oldValue, DeferredElementTreeState treeState, Action`2 originChangedAction)
  171. в System.Windows.ReverseInheritProperty.FirePropertyChangeInAncestry(DependencyObject element, Boolean oldValue, DeferredElementTreeState treeState, Action`2 originChangedAction)
  172. в System.Windows.ReverseInheritProperty.FirePropertyChangeInAncestry(DependencyObject element, Boolean oldValue, DeferredElementTreeState treeState, Action`2 originChangedAction)
  173. в System.Windows.ReverseInheritProperty.FirePropertyChangeInAncestry(DependencyObject element, Boolean oldValue, DeferredElementTreeState treeState, Action`2 originChangedAction)
  174. в System.Windows.ReverseInheritProperty.FirePropertyChangeInAncestry(DependencyObject element, Boolean oldValue, DeferredElementTreeState treeState, Action`2 originChangedAction)
  175. в System.Windows.ReverseInheritProperty.OnOriginValueChanged(DependencyObject oldOrigin, DependencyObject newOrigin, IList`1 otherOrigins, DeferredElementTreeState& oldTreeState, Action`2 originChangedAction)
  176. в System.Windows.Input.MouseDevice.ChangeMouseOver(IInputElement mouseOver, Int32 timestamp)
  177. в System.Windows.Input.MouseDevice.PreNotifyInput(Object sender, NotifyInputEventArgs e)
  178. в System.Windows.Input.InputManager.ProcessStagingArea()
  179. в System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
  180. в System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
  181. в System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
  182. в System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
  183. в System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
  184. в MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
  185. в MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
  186. в System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
  187. в System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
  188. в System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
  189. в MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
  190. в MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
  191. в System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
  192. в System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
  193. в System.Windows.Application.RunDispatcher(Object ignore)
  194. в System.Windows.Application.RunInternal(Window window)
  195. в System.Windows.Application.Run(Window window)
  196. в System.Windows.Application.Run()
  197. в Galaxy_Rotation_4.App.Main()
Add Comment
Please, Sign In to add comment