private Vector4 AddPage(int width, int height, int left = -1, int top = -1) { var rect = new Vector4(); var leftToUse = vm.Pages.Count() == 0 ? 150 : vm.Pages[vm.Pages.Count - 1].Left + vm.Pages[vm.Pages.Count - 1].Width + 150; rect.X = leftToUse; rect.Y = 100; rect.W = width; rect.Z = height; if (left != -1) { rect.X = left; } if (top != -1) { rect.Y = top; } //var nextLeft = vm.Pages[vm.Pages.Count - 1].Left + vm.Pages[vm.Pages.Count - 1].Width + 150; var pg = new SketchPage() { Width = width, Height = height, Top = (int)rect.Y, Left = (int)rect.X }; //pg.Layers.Add(new PageLayer()); var nc = new Controls.PageLayout() { DataContext = pg, Width = pg.Width, Height = pg.Height }; nc.SetValue(Windows.UI.Xaml.Controls.Canvas.LeftProperty, pg.Left); nc.SetValue(Windows.UI.Xaml.Controls.Canvas.TopProperty, pg.Top); nc.PerformAction += PageLayout_PerformAction; cvMain.Children.Add(nc); vm.Pages.Add(pg); return(rect); }
private async void LoadSketch(int sketchId) { var foundS = StorageService.Instance.Storage.RetrieveById<SketchDataModel>(sketchId); if (foundS != null && foundS.Count() > 0) { var fs = foundS.First(); var foundSP = StorageService.Instance.Storage.RetrieveByField<SketchPageDataModel>("SketchId", fs.Id.ToString()); if (foundSP != null && foundSP.Count() > 0) { foreach (var fsp in foundSP) { var pg = new SketchPage() { Title = fsp.Title, Width = (int)fsp.Width, Height = (int)fsp.Height, Top = (int)fsp.Top, Left = (int)fsp.Left }; var foundSPL = StorageService.Instance.Storage.RetrieveByField<SketchPageLayerDataModel>("SketchPageId", fsp.Id.ToString()); if (foundSPL != null && foundSPL.Count() > 0) { foreach (var fspl in foundSPL) { var pl = new PageLayer() { PersistedId = fspl.Id, HasChildContainerCanvas = fspl.HasChildContainerCanvas }; //add xamlfrags var foundSPLXF = StorageService.Instance.Storage.RetrieveByField<SketchPageLayerXamlFragmentDataModel>("SketchPageLayerId", fspl.Id.ToString()); if (foundSPLXF != null && foundSPLXF.Count() > 0) { foreach (var fsplxf in foundSPLXF) { var dt = string.IsNullOrEmpty(fsplxf.DataType) ? null : Type.GetType(fsplxf.DataType); var xf = new XamlFragment() { Uid = fsplxf.Uid, Xaml = fsplxf.Xaml, Data = fsplxf.Data, Type = dt }; pl.XamlFragments.Add(xf); } } pg.Layers.Add(pl); } } var nc = new Controls.PageLayout() { DataContext = pg, Width = pg.Width, Height = pg.Height }; nc.SetValue(Windows.UI.Xaml.Controls.Canvas.LeftProperty, pg.Left); nc.SetValue(Windows.UI.Xaml.Controls.Canvas.TopProperty, pg.Top); nc.PerformAction += PageLayout_PerformAction; cvMain.Children.Add(nc); vm.Pages.Add(pg); //// add xaml frags //foreach (var pl in pg.Layers) //{ // var foundSPLXF = StorageService.Instance.Storage.RetrieveByField<SketchPageLayerXamlFragmentDataModel>("SketchPageLayerId", pl.PersistedId.ToString()); // if (foundSPLXF != null && foundSPLXF.Count() > 0) // { // foreach (var fsplxf in foundSPLXF) // { // var dt = string.IsNullOrEmpty(fsplxf.DataType) ? null: Type.GetType(fsplxf.DataType); // var xf = new XamlFragment() { Uid = fsplxf.Uid, Xaml = fsplxf.Xaml, Data = fsplxf.Data, Type = dt }; // pl.XamlFragments.Add(xf); // } // } // pl.ExternalPC("Layers"); //} } } // foreach (var pgg in vm.Pages) // { // pgg.ExternalPC("Layers"); // } } }
private void LoadSampleSketch() { var pg = new SketchPage() { Title = "Splash", Width = 360, Height = 640, Top = 100, Left = 100 }; pg.Layers.Add(new PageLayer()); var nc = new Controls.PageLayout() { DataContext = pg, Width = pg.Width, Height = pg.Height }; nc.SetValue(Windows.UI.Xaml.Controls.Canvas.LeftProperty, pg.Left); nc.SetValue(Windows.UI.Xaml.Controls.Canvas.TopProperty, pg.Top); nc.PerformAction += PageLayout_PerformAction; cvMain.Children.Add(nc); vm.Pages.Add(pg); pg = new SketchPage() { Title = "Shell", Width = 360, Height = 640, Top = 100, Left = 600 }; pg.Layers.Add(new PageLayer()); pg.Layers.Add(new PageLayer()); pg.Layers.Add(new PageLayer()); nc = new Controls.PageLayout() { DataContext = pg, Width = pg.Width, Height = pg.Height }; nc.SetValue(Windows.UI.Xaml.Controls.Canvas.LeftProperty, pg.Left); nc.SetValue(Windows.UI.Xaml.Controls.Canvas.TopProperty, pg.Top); nc.PerformAction += PageLayout_PerformAction; cvMain.Children.Add(nc); vm.Pages.Add(pg); pg = new SketchPage() { Title = "Landing Page", Width = 360, Height = 640, Top = 100, Left = 1100 }; pg.Layers.Add(new PageLayer()); pg.Layers.Add(new PageLayer()); pg.Layers.Add(new PageLayer()); nc = new Controls.PageLayout() { DataContext = pg, Width = pg.Width, Height = pg.Height }; nc.SetValue(Windows.UI.Xaml.Controls.Canvas.LeftProperty, pg.Left); nc.SetValue(Windows.UI.Xaml.Controls.Canvas.TopProperty, pg.Top); nc.PerformAction += PageLayout_PerformAction; cvMain.Children.Add(nc); vm.Pages.Add(pg); pg = new SketchPage() { Title = "Profile", Width = 360, Height = 640, Top = 100, Left = 1600 }; pg.Layers.Add(new PageLayer()); pg.Layers.Add(new PageLayer()); nc = new Controls.PageLayout() { DataContext = pg, Width = pg.Width, Height = pg.Height }; nc.SetValue(Windows.UI.Xaml.Controls.Canvas.LeftProperty, pg.Left); nc.SetValue(Windows.UI.Xaml.Controls.Canvas.TopProperty, pg.Top); nc.PerformAction += PageLayout_PerformAction; cvMain.Children.Add(nc); vm.Pages.Add(pg); vm.Pages[1].Layers[0].XamlFragments.Add(new XamlFragment() { Uid = "xx1", Xaml = @"<Rectangle HorizontalAlignment=""Stretch"" VerticalAlignment=""Stretch"" Fill=""Black""></Rectangle>" }); vm.Pages[1].Layers[1].XamlFragments.Add(new XamlFragment() { Uid = "xx2", Xaml = @"<Rectangle Fill=""#FF252525"" Height=""40"" Opacity=""0.8"" HorizontalAlignment=""Stretch"" VerticalAlignment=""Bottom""/><StackPanel Orientation=""Horizontal"" HorizontalAlignment=""Right"" VerticalAlignment=""Bottom"" Margin=""0,0,5,5"" ><StackPanel Orientation=""Vertical""><TextBlock Text=""4:49 PM"" Margin=""7,0,0,0"" FontSize=""12"" Foreground=""White"" /><TextBlock Text=""3/04/2016"" FontSize=""12"" Foreground=""White"" /></StackPanel><xuip:Path PathType=""More"" Rotation=""90"" Width=""20"" Height=""30"" Foreground=""White"" /></StackPanel>" }); vm.Pages[1].ExternalPC("Layers"); vm.Pages[2].Layers[0].XamlFragments.Add(new XamlFragment() { Uid = "xx3", Xaml = @"<Rectangle Fill=""Black"" />" }); vm.Pages[2].Layers[1].XamlFragments.Add(new XamlFragment() { Uid = "xx4", Xaml = @"<Rectangle Fill=""#FF252525"" Height=""160"" HorizontalAlignment=""Stretch"" VerticalAlignment=""Top""/>" }); vm.Pages[2].Layers[2].XamlFragments.Add(new XamlFragment() { Uid = "xx5", Xaml = @"<TextBlock x:Name=""textBlock"" HorizontalAlignment=""Center"" TextWrapping=""Wrap"" Text=""Jose Fajardo"" VerticalAlignment=""Top"" Foreground=""White"" Margin=""0,120,0,0"" /><Ellipse Height=""85"" Margin=""0,15,0,0"" VerticalAlignment=""Top"" Width=""85"" HorizontalAlignment=""Center""><Ellipse.Fill><ImageBrush ImageSource=""http://art.ngfiles.com/images/378000/378294_kukatoo_minecraft-aqua-blue-avatar.png"" Stretch=""UniformToFill"" /></Ellipse.Fill></Ellipse>" }); vm.Pages[2].ExternalPC("Layers"); vm.Pages[3].Layers[0].XamlFragments.Add(new XamlFragment() { Uid = "xx6", Xaml = @"<Rectangle Fill=""Black"" />" }); vm.Pages[3].Layers[0].XamlFragments.Add(new XamlFragment() { Uid = "xx7", Xaml = @"<Rectangle Fill=""#FF252525"" Height=""30"" Opacity=""0.4"" HorizontalAlignment=""Stretch"" VerticalAlignment=""Top""/>" }); vm.Pages[3].Layers[1].XamlFragments.Add(new XamlFragment() { Uid = "xx8", Xaml = @"<StackPanel Orientation=""Horizontal"" HorizontalAlignment=""Left"" VerticalAlignment=""Top"" Margin=""10,5,0,0""><xuip:Path PathType=""Wifi2"" PathWidth=""30"" PathHeight=""15"" Width=""30"" Height=""20"" Foreground=""White"" Margin=""0,0,2,0"" /><xuip:Path PathType=""Wifi1"" Width=""20"" Height=""20"" Foreground=""White"" /></StackPanel>" }); vm.Pages[3].Layers[1].XamlFragments.Add(new XamlFragment() { Uid = "xx9", Xaml = @"<StackPanel Orientation=""Horizontal"" HorizontalAlignment=""Right"" VerticalAlignment=""Top"" Margin=""0,5,10,0""><xuip:Path PathType=""Sound"" Width=""20"" Height=""20"" Foreground=""White"" /><xuip:Path PathType=""BatteryLow"" Width=""35"" Height=""22"" Foreground=""White"" /></StackPanel>" }); vm.Pages[3].ExternalPC("Layers"); }
private Vector4 AddPage(int width, int height, int left = -1, int top = -1) { var rect = new Vector4(); var leftToUse = vm.Pages.Count() == 0 ? 150 : vm.Pages[vm.Pages.Count - 1].Left + vm.Pages[vm.Pages.Count - 1].Width + 150; rect.X = leftToUse; rect.Y = 100; rect.W = width; rect.Z = height; if (left != -1) rect.X = left; if (top != -1) rect.Y = top; //var nextLeft = vm.Pages[vm.Pages.Count - 1].Left + vm.Pages[vm.Pages.Count - 1].Width + 150; var pg = new SketchPage() { Width = width, Height = height, Top = (int)rect.Y, Left = (int)rect.X }; pg.Layers.Add(new PageLayer()); var nc = new Controls.PageLayout() { DataContext = pg, Width = pg.Width, Height = pg.Height }; nc.SetValue(Windows.UI.Xaml.Controls.Canvas.LeftProperty, pg.Left); nc.SetValue(Windows.UI.Xaml.Controls.Canvas.TopProperty, pg.Top); nc.PerformAction += PageLayout_PerformAction; cvMain.Children.Add(nc); vm.Pages.Add(pg); return rect; }
private void layoutRoot_PointerMoved(object sender, Windows.UI.Xaml.Input.PointerRoutedEventArgs e) { var ptEnd = e.GetCurrentPoint(null); console1.Text = $"ex : {ptEnd.Position.X} { this.ActualWidth} ey : { ptEnd.Position.Y} {this.ActualHeight} "; //var foundElements = VisualTreeHelper.FindElementsInHostCoordinates(ptEnd.Position, this); //foreach (var el in foundElements) //{ // if (el is PageLayout) // { // vm.SelectedPage = ((FrameworkElement)el).DataContext as SketchPage; // //vm.SelectedPage.ExternalPC("Title"); // } //} if (!IsMouseDown) { return; } if (IsMovingPage) { double newX = 0; double newY = 0; var lvm = _currentPageLayout.DataContext as SketchPage; console3.Text = $"sx : {ptStart.Position.X} sy : { ptStart.Position.Y } "; console2.Text = $"sx : {ptStartPt.X} sy : { ptStartPt.Y} "; if (ptEnd.Position.X > ptStart.Position.X) { newX = Math.Abs(ptEnd.Position.X - ptStart.Position.X); //diff from start newX = (newX * (1 / cvMainContainer.Scale)); //take into account the scale factor newX = ptStartPt.X + newX; // add to current canvas position //console1.Text = $"right : {ptStartPt.X + newX} ey : { 0 } "; } else { newX = Math.Abs(ptStart.Position.X - ptEnd.Position.X); //diff from start newX = (newX * (1 / cvMainContainer.Scale)); //take into account the scale factor newX = ptStartPt.X - newX; // add to current canvas position //console1.Text = $"left : {ptStartPt.X - newX} ey : { 0 } "; } _currentPageLayout.SetValue(Windows.UI.Xaml.Controls.Canvas.LeftProperty, newX); lvm.Left = (int)newX; lvm.ExternalPC("Left"); if (ptEnd.Position.Y > ptStart.Position.Y) { newY = Math.Abs(ptEnd.Position.Y - ptStart.Position.Y); //diff from start newY = (newY * (1 / cvMainContainer.Scale)); //take into account the scale factor newY = ptStartPt.Y + newY; // add to current canvas position //console1.Text = $"right : {ptStartPt.X + newY} ey : { 0 } "; } else { newY = Math.Abs(ptStart.Position.Y - ptEnd.Position.Y); //diff from start newY = (newY * (1 / cvMainContainer.Scale)); //take into account the scale factor newY = ptStartPt.Y - newY; // add to current canvas position //console1.Text = $"left : {ptStartPt.Y - newY} ey : { 0 } "; } _currentPageLayout.SetValue(Windows.UI.Xaml.Controls.Canvas.TopProperty, newY); lvm.Top = (int)newY; lvm.ExternalPC("Top"); //_currentPageLayout.SetValue(Canvas.TopProperty, (ptStartPt.Y - (ptStart.Position.Y - ptEnd.Position.Y))); return; } else if (IsResizingPage) { return; } else if (IsResizingStamp) { console2.Text = $"sx : {ptStart.Position.X} sy : { ptStart.Position.Y } "; console3.Text = $"deltax : {ptEnd.Position.X - ptStart.Position.X} deltay : { ptEnd.Position.Y - ptStart.Position.Y} "; var stampe = _stampEA as Controls.Stamps.ResizeMoveEdgesEventArgs; if (stampe.ActionType == eActionTypes.MoveTopLeft) { console2.Text = $"sx : {ptStart.Position.X} { _stampStartX } sy : { ptStart.Position.Y } { _stampStartY } "; var newX = _stampStartX + (ptEnd.Position.X - ptStart.Position.X); var newY = _stampStartY + (ptEnd.Position.Y - ptStart.Position.Y); _currentStamp.SetValue(Windows.UI.Xaml.Controls.Canvas.LeftProperty, newX); _currentStamp.SetValue(Windows.UI.Xaml.Controls.Canvas.TopProperty, newY); if (_currentStamp is IStamp) { ((IStamp)_currentStamp).UpdatedPosition(newX, newY); } } else if (stampe.ActionType == eActionTypes.RotateBottomLeft) { var ang = 180 / Math.PI * Math.Atan((ptStart.Position.Y - ptEnd.Position.Y) / (ptStart.Position.X - ptEnd.Position.X)); ((IStamp)_currentStamp).UpdateRotation(_stampStartRotation - (ptEnd.Position.X - ptStart.Position.X)); //((CompositeTransform)_currentStamp.RenderTransform).Rotation = _stampStartRotation - (ptEnd.Position.X - ptStart.Position.X); console2.Text = $"sx : {ptStart.Position.X} { _stampStartX } sy : { ptStart.Position.Y } { _stampStartY } angle : { ang } "; } else if (stampe.ActionType == eActionTypes.ResizeBottomRight) { var newWidth = _stampStartWidth + (ptEnd.Position.X - ptStart.Position.X); var newHeight = _stampStartHeight + (ptEnd.Position.Y - ptStart.Position.Y); ((FrameworkElement)_currentStamp).Width = newWidth; ((FrameworkElement)_currentStamp).Height = newHeight; if (_currentStamp is IStamp) { ((IStamp)_currentStamp).UpdatedDimension(newWidth, newHeight); } } else if (stampe.ActionType == eActionTypes.ResizeCenterRight) { console2.Text = $"thickness : { ((ptEnd.Position.X - ptStart.Position.X) / 10) }"; var newThickness = Math.Abs(((ptEnd.Position.X - ptStart.Position.X) / 10)); if (_currentStamp is IStamp) { ((IStamp)_currentStamp).UpdateStrokeThickness(newThickness); } } return; } else { //moving artboard var ct = cvMain.RenderTransform as CompositeTransform; line0.Text = $"sx : {ptStart.Position.X} sy : { ptStart.Position.Y} "; line1.Text = $"ex : {ptEnd.Position.X} ey : { ptEnd.Position.Y} "; line2.Text = $"scale : {cvMainContainer.Scale} ptDifXStart : { ptDifXStart} ptDifYStart : { ptDifYStart} "; line3.Text = $"translateX : {ct.TranslateX} translateY : { ct.TranslateY} "; ptDifX = ptDifXStart + ((ptStart.Position.X - ptEnd.Position.X) / cvMainContainer.Scale); ptDifY = ptDifYStart + ((ptStart.Position.Y - ptEnd.Position.Y) / cvMainContainer.Scale); line4.Text = $"s-e X : {ptStart.Position.X - ptEnd.Position.X} s-e Y : { ptStart.Position.Y - ptEnd.Position.Y} "; ct.TranslateX = -1 * ptDifX; ct.TranslateY = -1 * ptDifY; } }
private async void LoadSketch(int sketchId) { var foundS = StorageService.Instance.Storage.RetrieveById <SketchDataModel>(sketchId); if (foundS != null && foundS.Count() > 0) { var fs = foundS.First(); var foundSP = StorageService.Instance.Storage.RetrieveByField <SketchPageDataModel>("SketchId", fs.Id.ToString()); if (foundSP != null && foundSP.Count() > 0) { foreach (var fsp in foundSP) { var pg = new SketchPage(false) { Title = fsp.Title, Width = (int)fsp.Width, Height = (int)fsp.Height, Top = (int)fsp.Top, Left = (int)fsp.Left }; var foundSPL = StorageService.Instance.Storage.RetrieveByField <SketchPageLayerDataModel>("SketchPageId", fsp.Id.ToString()); if (foundSPL != null && foundSPL.Count() > 0) { foreach (var fspl in foundSPL) { var pl = new PageLayer() { PersistedId = fspl.Id, HasChildContainerCanvas = fspl.HasChildContainerCanvas }; //add xamlfrags var foundSPLXF = StorageService.Instance.Storage.RetrieveByField <SketchPageLayerXamlFragmentDataModel>("SketchPageLayerId", fspl.Id.ToString()); if (foundSPLXF != null && foundSPLXF.Count() > 0) { foreach (var fsplxf in foundSPLXF) { var dt = string.IsNullOrEmpty(fsplxf.DataType) ? null : Type.GetType(fsplxf.DataType); var xf = new XamlFragment() { Uid = fsplxf.Uid, Xaml = fsplxf.Xaml, Data = fsplxf.Data, Type = dt }; pl.XamlFragments.Add(xf); } } pg.Layers.Add(pl); } } var nc = new Controls.PageLayout() { DataContext = pg, Width = pg.Width, Height = pg.Height }; nc.SetValue(Windows.UI.Xaml.Controls.Canvas.LeftProperty, pg.Left); nc.SetValue(Windows.UI.Xaml.Controls.Canvas.TopProperty, pg.Top); nc.PerformAction += PageLayout_PerformAction; cvMain.Children.Add(nc); vm.Pages.Add(pg); //// add xaml frags //foreach (var pl in pg.Layers) //{ // var foundSPLXF = StorageService.Instance.Storage.RetrieveByField<SketchPageLayerXamlFragmentDataModel>("SketchPageLayerId", pl.PersistedId.ToString()); // if (foundSPLXF != null && foundSPLXF.Count() > 0) // { // foreach (var fsplxf in foundSPLXF) // { // var dt = string.IsNullOrEmpty(fsplxf.DataType) ? null: Type.GetType(fsplxf.DataType); // var xf = new XamlFragment() { Uid = fsplxf.Uid, Xaml = fsplxf.Xaml, Data = fsplxf.Data, Type = dt }; // pl.XamlFragments.Add(xf); // } // } // pl.ExternalPC("Layers"); //} } } // foreach (var pgg in vm.Pages) // { // pgg.ExternalPC("Layers"); // } } }
private void LoadSampleSketch() { var pg = new SketchPage() { Title = "Splash", Width = 360, Height = 640, Top = 100, Left = 100 }; pg.Layers.Add(new PageLayer()); var nc = new Controls.PageLayout() { DataContext = pg, Width = pg.Width, Height = pg.Height }; nc.SetValue(Windows.UI.Xaml.Controls.Canvas.LeftProperty, pg.Left); nc.SetValue(Windows.UI.Xaml.Controls.Canvas.TopProperty, pg.Top); nc.PerformAction += PageLayout_PerformAction; cvMain.Children.Add(nc); vm.Pages.Add(pg); pg = new SketchPage() { Title = "Shell", Width = 360, Height = 640, Top = 100, Left = 600 }; pg.Layers.Add(new PageLayer()); pg.Layers.Add(new PageLayer()); pg.Layers.Add(new PageLayer()); nc = new Controls.PageLayout() { DataContext = pg, Width = pg.Width, Height = pg.Height }; nc.SetValue(Windows.UI.Xaml.Controls.Canvas.LeftProperty, pg.Left); nc.SetValue(Windows.UI.Xaml.Controls.Canvas.TopProperty, pg.Top); nc.PerformAction += PageLayout_PerformAction; cvMain.Children.Add(nc); vm.Pages.Add(pg); pg = new SketchPage() { Title = "Landing Page", Width = 360, Height = 640, Top = 100, Left = 1100 }; pg.Layers.Add(new PageLayer()); pg.Layers.Add(new PageLayer()); pg.Layers.Add(new PageLayer()); nc = new Controls.PageLayout() { DataContext = pg, Width = pg.Width, Height = pg.Height }; nc.SetValue(Windows.UI.Xaml.Controls.Canvas.LeftProperty, pg.Left); nc.SetValue(Windows.UI.Xaml.Controls.Canvas.TopProperty, pg.Top); nc.PerformAction += PageLayout_PerformAction; cvMain.Children.Add(nc); vm.Pages.Add(pg); pg = new SketchPage() { Title = "Profile", Width = 360, Height = 640, Top = 100, Left = 1600 }; pg.Layers.Add(new PageLayer()); pg.Layers.Add(new PageLayer()); nc = new Controls.PageLayout() { DataContext = pg, Width = pg.Width, Height = pg.Height }; nc.SetValue(Windows.UI.Xaml.Controls.Canvas.LeftProperty, pg.Left); nc.SetValue(Windows.UI.Xaml.Controls.Canvas.TopProperty, pg.Top); nc.PerformAction += PageLayout_PerformAction; cvMain.Children.Add(nc); vm.Pages.Add(pg); vm.Pages[1].Layers[0].XamlFragments.Add(new XamlFragment() { Uid = "xx1", Xaml = @"<Rectangle HorizontalAlignment=""Stretch"" VerticalAlignment=""Stretch"" Fill=""Black""></Rectangle>" }); vm.Pages[1].Layers[1].XamlFragments.Add(new XamlFragment() { Uid = "xx2", Xaml = @"<Rectangle Fill=""#FF252525"" Height=""40"" Opacity=""0.8"" HorizontalAlignment=""Stretch"" VerticalAlignment=""Bottom""/><StackPanel Orientation=""Horizontal"" HorizontalAlignment=""Right"" VerticalAlignment=""Bottom"" Margin=""0,0,5,5"" ><StackPanel Orientation=""Vertical""><TextBlock Text=""4:49 PM"" Margin=""7,0,0,0"" FontSize=""12"" Foreground=""White"" /><TextBlock Text=""3/04/2016"" FontSize=""12"" Foreground=""White"" /></StackPanel><xuip:Path PathType=""More"" Rotation=""90"" Width=""20"" Height=""30"" Foreground=""White"" /></StackPanel>" }); vm.Pages[1].ExternalPC("Layers"); vm.Pages[2].Layers[0].XamlFragments.Add(new XamlFragment() { Uid = "xx3", Xaml = @"<Rectangle Fill=""Black"" />" }); vm.Pages[2].Layers[1].XamlFragments.Add(new XamlFragment() { Uid = "xx4", Xaml = @"<Rectangle Fill=""#FF252525"" Height=""160"" HorizontalAlignment=""Stretch"" VerticalAlignment=""Top""/>" }); vm.Pages[2].Layers[2].XamlFragments.Add(new XamlFragment() { Uid = "xx5", Xaml = @"<TextBlock x:Name=""textBlock"" HorizontalAlignment=""Center"" TextWrapping=""Wrap"" Text=""Jose Fajardo"" VerticalAlignment=""Top"" Foreground=""White"" Margin=""0,120,0,0"" /><Ellipse Height=""85"" Margin=""0,15,0,0"" VerticalAlignment=""Top"" Width=""85"" HorizontalAlignment=""Center""><Ellipse.Fill><ImageBrush ImageSource=""http://art.ngfiles.com/images/378000/378294_kukatoo_minecraft-aqua-blue-avatar.png"" Stretch=""UniformToFill"" /></Ellipse.Fill></Ellipse>" }); vm.Pages[2].ExternalPC("Layers"); vm.Pages[3].Layers[0].XamlFragments.Add(new XamlFragment() { Uid = "xx6", Xaml = @"<Rectangle Fill=""Black"" />" }); vm.Pages[3].Layers[0].XamlFragments.Add(new XamlFragment() { Uid = "xx7", Xaml = @"<Rectangle Fill=""#FF252525"" Height=""30"" Opacity=""0.4"" HorizontalAlignment=""Stretch"" VerticalAlignment=""Top""/>" }); vm.Pages[3].Layers[1].XamlFragments.Add(new XamlFragment() { Uid = "xx8", Xaml = @"<StackPanel Orientation=""Horizontal"" HorizontalAlignment=""Left"" VerticalAlignment=""Top"" Margin=""10,5,0,0""><xuip:Path PathType=""Wifi2"" PathWidth=""30"" PathHeight=""15"" Width=""30"" Height=""20"" Foreground=""White"" Margin=""0,0,2,0"" /><xuip:Path PathType=""Wifi1"" Width=""20"" Height=""20"" Foreground=""White"" /></StackPanel>" }); vm.Pages[3].Layers[1].XamlFragments.Add(new XamlFragment() { Uid = "xx9", Xaml = @"<StackPanel Orientation=""Horizontal"" HorizontalAlignment=""Right"" VerticalAlignment=""Top"" Margin=""0,5,10,0""><xuip:Path PathType=""Sound"" Width=""20"" Height=""20"" Foreground=""White"" /><xuip:Path PathType=""BatteryLow"" Width=""35"" Height=""22"" Foreground=""White"" /></StackPanel>" }); vm.Pages[3].ExternalPC("Layers"); }