File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ namespace NETworkManager . Controls
2+ {
3+ public class DragablzTabContent
4+ {
5+ public string Header { get ; set ; }
6+ public object Content { get ; set ; }
7+
8+ public DragablzTabContent ( string header , object content )
9+ {
10+ Header = header ;
11+ Content = content ;
12+ }
13+ }
14+ }
Original file line number Diff line number Diff line change 169169 <Compile Include =" 3rdParty\Heijden.DNS\Response.cs" />
170170 <Compile Include =" 3rdParty\Heijden.DNS\RR.cs" />
171171 <Compile Include =" 3rdParty\Heijden.DNS\Structs.cs" />
172+ <Compile Include =" Controls\DragablzTabContent.cs" />
172173 <Compile Include =" Converters\TimestampToStringConverter.cs" />
173174 <Compile Include =" Converters\NullableDateTimeToStringConverter.cs" />
174175 <Compile Include =" Converters\ValidateSubnetCalculatorIPv4SplitterConverter.cs" />
Original file line number Diff line number Diff line change 5656 <DataTemplate >
5757 <StackPanel Orientation =" Horizontal" >
5858 <Grid >
59- <TextBlock Text =" {Binding}" VerticalAlignment =" Center" Margin =" 10" >
59+ <TextBlock Text =" {Binding Header }" VerticalAlignment =" Center" Margin =" 10" >
6060 <TextBlock .Style>
6161 <Style TargetType =" {x:Type TextBlock}" BasedOn =" {StaticResource HeaderTextBlock}" >
6262 <Setter Property =" FontSize" Value =" 18" />
Original file line number Diff line number Diff line change 1- using System . Windows . Input ;
2- using MahApps . Metro . Controls . Dialogs ;
3- using System . Collections . ObjectModel ;
4- using NETworkManager . Models . Settings ;
5- using System . Collections . Generic ;
6- using NETworkManager . Models . Network ;
7- using NETworkManager . Helpers ;
1+ using System . Collections . ObjectModel ;
2+ using NETworkManager . Controls ;
3+ using System ;
4+ using NETworkManager . Views . Applications ;
85
96namespace NETworkManager . ViewModels . Applications
107{
118 public class RemoteDesktopViewModel : ViewModelBase
129 {
10+ public ObservableCollection < DragablzTabContent > TabContents = new ObservableCollection < DragablzTabContent > ( ) ;
11+
1312 public RemoteDesktopViewModel ( )
1413 {
14+
15+ }
1516
17+ public static Func < object > NewItemFactory
18+ {
19+ get { return ( ) => new DragablzTabContent ( "test" , new TracerouteView ( ) ) ; }
1620 }
1721 }
1822}
Original file line number Diff line number Diff line change 33 xmlns : x =" http://schemas.microsoft.com/winfx/2006/xaml"
44 xmlns : d =" http://schemas.microsoft.com/expression/blend/2008"
55 xmlns : mc =" http://schemas.openxmlformats.org/markup-compatibility/2006"
6- xmlns:ApplicationViews =" clr-namespace:NETworkManager.Views .Applications"
6+ xmlns:ViewModel =" clr-namespace:NETworkManager.ViewModels .Applications"
77 xmlns : dragablz =" clr-namespace:Dragablz;assembly=Dragablz"
88 mc : Ignorable =" d" >
99 <Grid >
10- <dragablz : TabablzControl Style =" {StaticResource DefaultTabablzControl}" >
11- <TabItem Header =" One" >
12- <Button HorizontalAlignment =" Center" VerticalAlignment =" Center" >Hello World</Button >
13- </TabItem >
14- <TabItem Header =" Two" >
15- <Button HorizontalAlignment =" Center" VerticalAlignment =" Center" >How are you doing</Button >
16- </TabItem >
17- <TabItem Header =" Three" >
18- <Button HorizontalAlignment =" Center" VerticalAlignment =" Center" >Goodbye</Button >
19- </TabItem >
10+ <dragablz : TabablzControl ItemsSource =" {Binding TabContents}" >
11+ <dragablz : TabablzControl .Style>
12+ <Style TargetType =" {x:Type dragablz:TabablzControl}" BasedOn =" {StaticResource DefaultTabablzControl}" >
13+ <Setter Property =" NewItemFactory" Value =" {x:Static ViewModel:RemoteDesktopViewModel.NewItemFactory}" />
14+ </Style >
15+ </dragablz : TabablzControl .Style>
2016 </dragablz : TabablzControl >
2117 </Grid >
2218</UserControl >
You can’t perform that action at this time.
0 commit comments