diff --git a/CampusAppWP8/CampusAppWP8/Model/TimeTable/AppointmentModel.cs b/CampusAppWP8/CampusAppWP8/Model/TimeTable/AppointmentModel.cs index 918e2ebc..f205729f 100644 --- a/CampusAppWP8/CampusAppWP8/Model/TimeTable/AppointmentModel.cs +++ b/CampusAppWP8/CampusAppWP8/Model/TimeTable/AppointmentModel.cs @@ -206,8 +206,8 @@ namespace CampusAppWP8.Model.TimeTable return retValue; } -/* - private void OnCanvasClick(object sender, EventArgs e) + + public void OnCanvasClick(object sender, EventArgs e) { if (this.OnClick != null) { @@ -215,11 +215,6 @@ namespace CampusAppWP8.Model.TimeTable } } - private void OnCanvasSizeChanged(object sender, SizeChangedEventArgs e) - { - - } -*/ // ------------------------------------------------------ public string Title { diff --git a/CampusAppWP8/CampusAppWP8/Pages/TimeTable/AppointmentEdit.xaml b/CampusAppWP8/CampusAppWP8/Pages/TimeTable/AppointmentEdit.xaml index 6f74a2c0..7bc208a8 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/TimeTable/AppointmentEdit.xaml +++ b/CampusAppWP8/CampusAppWP8/Pages/TimeTable/AppointmentEdit.xaml @@ -1,4 +1,4 @@ - - + - - \ No newline at end of file + + \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/Pages/TimeTable/AppointmentEdit.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/TimeTable/AppointmentEdit.xaml.cs index 94233db0..47452724 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/TimeTable/AppointmentEdit.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/TimeTable/AppointmentEdit.xaml.cs @@ -20,8 +20,9 @@ namespace CampusAppWP8.Pages.TimeTable using CampusAppWP8.Model.TimeTable; using CampusAppWP8.Utility; using CampusAppWP8.Utility.ICSProperties; + using CampusAppWP8.Utility.Lui.Page; - public partial class AppointmentEdit : PhoneApplicationPage + public partial class AppointmentEdit : PortraitLandscapePage { private readonly string[] DurationListText = new string[] { "15 Minuten", "30 Minuten", "1 Stunde", "90 Minuten", "2 Stunden", "Ganztägig", "Benutzerdefiniert" }; private readonly string[] RepeatListText = new string[] { "Einmal", "Täglich", "Jeden Mo-Fr", "Wöchentlich", "Monatlich", "Jährlich" }; diff --git a/CampusAppWP8/CampusAppWP8/Pages/TimeTable/TimeTable.cs b/CampusAppWP8/CampusAppWP8/Pages/TimeTable/TimeTable.cs index fffa353a..85ce3f26 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/TimeTable/TimeTable.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/TimeTable/TimeTable.cs @@ -24,7 +24,7 @@ namespace CampusAppWP8.Pages.TimeTable { private static AppointmentListModel appList //= null; = new AppointmentListModel(new AppointmentModel[] { - new AppointmentModel("BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:ownCloud Calendar 0.6.3\r\nX-WR-CALNAME:Das is der Titel\r\nBEGIN:VEVENT\r\nCREATED;VALUE=DATE-TIME:20130827T113216Z\r\nUID:c9904ea73c\r\nLAST-MODIFIED;VALUE=DATE-TIME:20130827T113216Z\r\nDTSTAMP;VALUE=DATE-TIME:20130827T113216Z\r\nSUMMARY:Das is der Titel\r\nDTSTART;VALUE=DATE-TIME:20131022T113500Z\r\nDTEND;VALUE=DATE-TIME:20131022T212000Z\r\nCLASS:PUBLIC\r\nLOCATION:BTU Campus\r\nDESCRIPTION:For Outlook 2003, the behavior is peculiar. It can save the sa\r\n me calendar entry in both .ics and .vcs format, but it only read & displa\r\n y .vcs file correctly. It can read .ics file but it omits some fields and \r\n does not display it in calendar mode. My guess is that back then Microsoft\r\n wanted to provide .ics to be compatible with Mac's iCal but not quite com\r\n mitted to v2.0 yet.\r\nCATEGORIES:Projekte\r\nEND:VEVENT\r\nEND:VCALENDAR"), + new AppointmentModel("BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:ownCloud Calendar 0.6.3\r\nX-WR-CALNAME:Das is der Titel\r\nBEGIN:VEVENT\r\nCREATED;VALUE=DATE-TIME:20130827T113216Z\r\nUID:c9904ea73c\r\nLAST-MODIFIED;VALUE=DATE-TIME:20130827T113216Z\r\nDTSTAMP;VALUE=DATE-TIME:20130827T113216Z\r\nSUMMARY:Das is der Titel\r\nDTSTART;VALUE=DATE-TIME:20131023T113500Z\r\nDTEND;VALUE=DATE-TIME:20131023T212000Z\r\nCLASS:PUBLIC\r\nLOCATION:BTU Campus\r\nDESCRIPTION:For Outlook 2003, the behavior is peculiar. It can save the sa\r\n me calendar entry in both .ics and .vcs format, but it only read & displa\r\n y .vcs file correctly. It can read .ics file but it omits some fields and \r\n does not display it in calendar mode. My guess is that back then Microsoft\r\n wanted to provide .ics to be compatible with Mac's iCal but not quite com\r\n mitted to v2.0 yet.\r\nCATEGORIES:Projekte\r\nEND:VEVENT\r\nEND:VCALENDAR"), new AppointmentModel("BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:http://www.example.com/calendarapplication/\r\nMETHOD:PUBLISH\r\nBEGIN:VEVENT\r\nUID:461092315540@example.com\r\nORGANIZER:MAILTO:alice@example.com\r\nLOCATION:Somewhere\r\nSUMMARY:Eine Kurzinfo welche einen etwas längeren titel enthält\r\nDESCRIPTION:Beschreibung des Termines\r\nCLASS:PUBLIC\r\nDTSTART:20131023T110000Z\r\nDTEND:20131024T113000Z\r\nDTSTAMP:20131003T125900Z\r\nPRIORITY:3\r\nEND:VEVENT\r\nEND:VCALENDAR"), new AppointmentModel("BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//hacksw/handcal//NONSGML v1.0//EN\r\nBEGIN:VEVENT\r\nUID:uid1@example.com\r\nDTSTAMP:19970714T170000Z\r\nORGANIZER;CN=John Doe:MAILTO:john.doe@example.com\r\nDTSTART:20131025T150000Z\r\nDTEND:20131025T170000Z\r\nSUMMARY:Bastille Day Party\r\nEND:VEVENT\r\nEND:VCALENDAR"), new AppointmentModel("BEGIN:VCALENDAR\r\nVERSION:1.0\r\nBEGIN:VEVENT\r\nCATEGORIES:MEETING\r\nSTATUS:TENTATIVE\r\nDTSTART:20130917T033000Z\r\nDTEND:20130917T043000Z\r\nSUMMARY:Your Proposal Review\r\nDESCRIPTION:Steve and John to review newest proposal material bla fsdfasfsdfsdfgsdafg sfdgfdsgf dsfg dsfgds fgds\r\nCLASS:PRIVATE\r\nEND:VEVENT\r\nEND:VCALENDAR"), diff --git a/CampusAppWP8/CampusAppWP8/Pages/TimeTable/TimeTableWeek.xaml b/CampusAppWP8/CampusAppWP8/Pages/TimeTable/TimeTableWeek.xaml index c1e89fdd..caaf9438 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/TimeTable/TimeTableWeek.xaml +++ b/CampusAppWP8/CampusAppWP8/Pages/TimeTable/TimeTableWeek.xaml @@ -18,7 +18,7 @@ - + diff --git a/CampusAppWP8/CampusAppWP8/Pages/TimeTable/TimeTableWeek.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/TimeTable/TimeTableWeek.xaml.cs index 75e324ba..bf3825d3 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/TimeTable/TimeTableWeek.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/TimeTable/TimeTableWeek.xaml.cs @@ -28,16 +28,11 @@ namespace CampusAppWP8.Pages.TimeTable public partial class TimeTableWeek : PhoneApplicationPage { private static readonly double WEEK_TABLE_CELL_HEIGHT = 40; - private static readonly double WEEK_TABLE_HEAD_WIDTH = 40; - private static readonly double WEEK_TABLE_HEAD_THICKNESS = 2; - private static readonly double WEEK_TABLE_HEAD_HALF = 15; - private static readonly double WEEK_TABLE_INNER_THICKNESS = 1; private static readonly int WEEK_TABLE_ZINDEX_MAX = 10; private static readonly int PIVOT_PAGES = 3; private static readonly int PIVOT_PAGES_HALF_DOWN = 1; - private static readonly int PIVOT_PAGES_COLUMNS = 5; // days in week - + private int lastSelectedIndex = 0; private ObservableCollection itemList = new ObservableCollection(); @@ -230,9 +225,9 @@ namespace CampusAppWP8.Pages.TimeTable } } - private void OnAppointmentClick(object sender, System.Windows.Input.GestureEventArgs e) + private void OnAppointmentClick(AppointmentModel model) { - int index = TimeTable.AppointmentsModel.Appointments.IndexOf((sender as Canvas).Tag as AppointmentModel); + int index = TimeTable.AppointmentsModel.Appointments.IndexOf(model); if (index >= 0) { @@ -315,19 +310,26 @@ namespace CampusAppWP8.Pages.TimeTable if (e.Action == NotifyCollectionChangedAction.Add) { tempModel = e.NewItems[0] as AppointmentModel; + + for (int i = 0; i < PIVOT_PAGES; i++) + { + if (tempModel.IsDate(this.itemList[i].FromDT, 4) >= 0) + { + tempModel.OnClick += this.OnAppointmentClick; + this.itemList[i].AppointmentList.Add(tempModel); + } + } } else if (e.Action == NotifyCollectionChangedAction.Remove) { tempModel = e.OldItems[0] as AppointmentModel; - } - if (tempModel != null) - { for (int i = 0; i < PIVOT_PAGES; i++) { - if (tempModel.IsDate(this.itemList[i].FromDT, 4) > -1) + if (this.itemList[i].AppointmentList.IndexOf(tempModel) >= 0) { - this.SetupPage(i); + tempModel.OnClick -= this.OnAppointmentClick; + this.itemList[i].AppointmentList.Remove(tempModel); } } } @@ -341,6 +343,7 @@ namespace CampusAppWP8.Pages.TimeTable { if (m.IsDate(this.itemList[i].FromDT, 4) >= 0) { + m.OnClick += this.OnAppointmentClick; this.itemList[i].AppointmentList.Add(m); } } @@ -620,27 +623,6 @@ namespace CampusAppWP8.Pages.TimeTable */ } - private void DrawAppointment(AppointmentModel model, int index, int xIndex, double opacity = 1.0, int zIndex = 0, int modelCount = 0) - { -/* - Canvas modelCan = model.GetCanvas( - ((this.itemPages[index].Content.Width - WEEK_TABLE_HEAD_WIDTH) / 5) - 2 - 2 - (modelCount * WEEK_TABLE_ZINDEX_SHIFT), - WEEK_TABLE_CELL_HEIGHT, - this.itemPages[index].DateFrom.Date.AddDays(xIndex)); - - modelCan.DoubleTap += new EventHandler(this.OnAppointmentClick); - modelCan.Opacity = opacity; - modelCan.SetValue(Canvas.ZIndexProperty, WEEK_TABLE_ZINDEX_MAX - zIndex); - modelCan.Margin = new Thickness( - (WEEK_TABLE_HEAD_WIDTH + 2 + (zIndex * WEEK_TABLE_ZINDEX_SHIFT) + (xIndex * ((this.itemPages[index].Content.Width - WEEK_TABLE_HEAD_WIDTH) / 5))), - modelCan.Margin.Top, - 0, - 0); - - this.itemPages[index].Content.Children.Add(modelCan); -*/ - } - private void DrawMultiBubble(int index, int dayIndex, int listIndex, int number, double xOffset, double yOffset) { Canvas can = new Canvas(); @@ -683,10 +665,5 @@ namespace CampusAppWP8.Pages.TimeTable // this.itemPages[index].Content.Children.Add(can); } - - private void ThePivot_LoadedPivotItem(object sender, PivotItemEventArgs e) - { - - } } } \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/Utility/Lui/Templates/AppointmentCanvas.xaml b/CampusAppWP8/CampusAppWP8/Utility/Lui/Templates/AppointmentCanvas.xaml index 8608ffe9..f188b56c 100644 --- a/CampusAppWP8/CampusAppWP8/Utility/Lui/Templates/AppointmentCanvas.xaml +++ b/CampusAppWP8/CampusAppWP8/Utility/Lui/Templates/AppointmentCanvas.xaml @@ -13,9 +13,9 @@ SizeChanged="TheMainCanvas_SizeChanged"> @@ -23,6 +23,7 @@ FontSize="14" Padding="3" TextWrapping="Wrap" + Foreground="White" /> \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/Utility/Lui/Templates/AppointmentCanvas.xaml.cs b/CampusAppWP8/CampusAppWP8/Utility/Lui/Templates/AppointmentCanvas.xaml.cs index 12d870b2..577c0ad2 100644 --- a/CampusAppWP8/CampusAppWP8/Utility/Lui/Templates/AppointmentCanvas.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Utility/Lui/Templates/AppointmentCanvas.xaml.cs @@ -25,6 +25,7 @@ namespace CampusAppWP8.Utility.Lui.Templates { private static readonly double HOURS_SPACING = 40; private static readonly double INDEX_SPACING = 10; + private static readonly int TOP_Z_INDEX = 10; private static readonly SolidColorBrush[] PRIO_COLORS = new SolidColorBrush[] { @@ -55,7 +56,9 @@ namespace CampusAppWP8.Utility.Lui.Templates { this.appPtr = model; - this.Height = model.GetTotalHours(day) * HOURS_SPACING; + double totalHours = model.GetTotalHours(day); + + this.Height = ((totalHours < 0.25) ? 0.25 : totalHours) * HOURS_SPACING; this.SetText(model.Title); this.SetValue(Canvas.TopProperty, (day.Date.Equals(model.Start.Date)) ? (model.Start.TimeOfDay.TotalHours * HOURS_SPACING) : 0); @@ -81,10 +84,16 @@ namespace CampusAppWP8.Utility.Lui.Templates this.Margin = new Thickness( (INDEX_SPACING * index), 0, - (INDEX_SPACING * count), + (INDEX_SPACING * (count - 1)), 0); - - if (index > 0) + + this.SetValue(Canvas.ZIndexProperty, ((TOP_Z_INDEX - index) < 0) ? 0 : (TOP_Z_INDEX - index)); + + if (index == 0) + { + this.Opacity = 1; + } + else { this.Opacity = 0.5; } @@ -111,7 +120,19 @@ namespace CampusAppWP8.Utility.Lui.Templates private void SetText(string text) { - this.TheText.Text = text; + if (this.Height < (HOURS_SPACING * 0.5)) + { + this.TheText.Text = "..."; + this.TheText.Margin = new Thickness( + 0, + this.Height - (HOURS_SPACING * 0.5), + 0, + 0); + } + else + { + this.TheText.Text = text; + } } private void SetBGColorByPriority(int prio) diff --git a/CampusAppWP8/CampusAppWP8/Utility/Lui/Templates/WeekView.xaml b/CampusAppWP8/CampusAppWP8/Utility/Lui/Templates/WeekView.xaml index 87dab9c4..494fa87f 100644 --- a/CampusAppWP8/CampusAppWP8/Utility/Lui/Templates/WeekView.xaml +++ b/CampusAppWP8/CampusAppWP8/Utility/Lui/Templates/WeekView.xaml @@ -11,7 +11,7 @@ Foreground="{StaticResource PhoneForegroundBrush}" x:Name="root"> - + @@ -48,20 +48,20 @@ - - + + - + - + - + - + @@ -70,7 +70,7 @@ @@ -94,13 +94,13 @@ - + - - + + diff --git a/CampusAppWP8/CampusAppWP8/Utility/Lui/Templates/WeekView.xaml.cs b/CampusAppWP8/CampusAppWP8/Utility/Lui/Templates/WeekView.xaml.cs index 27e76a26..b9b117da 100644 --- a/CampusAppWP8/CampusAppWP8/Utility/Lui/Templates/WeekView.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Utility/Lui/Templates/WeekView.xaml.cs @@ -78,9 +78,19 @@ namespace CampusAppWP8.Utility.Lui.Templates private void OnAppointmentListChanged(object s, NotifyCollectionChangedEventArgs e) { - for(int i = 0; i < e.NewItems.Count; i++) + if (e.Action == NotifyCollectionChangedAction.Add) { - this.SeperateAppointments(e.NewItems[i] as AppointmentModel); + for (int i = 0; i < e.NewItems.Count; i++) + { + this.SeperateAppointments(e.NewItems[i] as AppointmentModel, e.Action); + } + } + else if (e.Action == NotifyCollectionChangedAction.Remove) + { + for (int i = 0; i < e.OldItems.Count; i++) + { + this.SeperateAppointments(e.OldItems[i] as AppointmentModel, e.Action); + } } } @@ -88,17 +98,24 @@ namespace CampusAppWP8.Utility.Lui.Templates { foreach (AppointmentModel m in list) { - this.SeperateAppointments(m); + this.SeperateAppointments(m, NotifyCollectionChangedAction.Add); } } - private void SeperateAppointments(AppointmentModel model) + private void SeperateAppointments(AppointmentModel model, NotifyCollectionChangedAction action) { for(int i = 0; i < this.Days; i++) { if (model.IsDate(this.DateFrom.AddDays(i)) == 0) { - this.dayList[i].Appointments.Add(model); + if (action == NotifyCollectionChangedAction.Add) + { + this.dayList[i].Appointments.Add(model); + } + else if (action == NotifyCollectionChangedAction.Remove) + { + this.dayList[i].Appointments.Remove(model); + } } } } @@ -212,5 +229,10 @@ namespace CampusAppWP8.Utility.Lui.Templates this.TimeList.ItemsSource = this.timeStrings; } + + private void AutoScroll(object sender, RoutedEventArgs e) + { + this.TheScrollView.ScrollToVerticalOffset((40 * 7) + 2); + } } } diff --git a/CampusAppWP8/CampusAppWP8/Utility/Lui/Templates/WeekViewDay.xaml.cs b/CampusAppWP8/CampusAppWP8/Utility/Lui/Templates/WeekViewDay.xaml.cs index 55ea3131..4d67b4ce 100644 --- a/CampusAppWP8/CampusAppWP8/Utility/Lui/Templates/WeekViewDay.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Utility/Lui/Templates/WeekViewDay.xaml.cs @@ -62,12 +62,15 @@ namespace CampusAppWP8.Utility.Lui.Templates { for (int i = 0; i < e.NewItems.Count; i++) { - this.CheckForStack(e.NewItems[i] as AppointmentModel); + this.CheckStackAdd(e.NewItems[i] as AppointmentModel); } } else if (e.Action == NotifyCollectionChangedAction.Remove) { - throw new NotImplementedException(); + for (int i = 0; i < e.OldItems.Count; i++) + { + this.CheckStackRemove(e.OldItems[i] as AppointmentModel); + } } } @@ -137,32 +140,190 @@ namespace CampusAppWP8.Utility.Lui.Templates } } - private void CheckForStack(AppointmentModel model) + private void CheckStackAdd(AppointmentModel model) { int[] intersect = model.IntersectArray(this.Appointments.ToArray()); if (intersect.Count() == 0) { - this.DrawApp(model); + this.DrawApp(model, null); } else { + List intersecStack = new List(); + for (int i = 0; i < intersect.Count(); i++) + { + for (int s = 0; s < this.stacks.Count; s++) + { + if (this.stacks[s].IndexOf(this.Appointments[i]) >= 0) + { + intersecStack.Add(s); + } + } + } + + if (intersecStack.Count == 0) + { + List newStack = new List(); + + for (int k = 0; k < intersect.Count(); k++) + { + newStack.Add(this.Appointments[intersect[k]]); + } + + newStack.Add(model); + this.stacks.Add(newStack); + + this.DrawStack(model, newStack); + } + else if (intersecStack.Count == 1) + { + this.stacks[intersecStack[0]].Add(model); + this.DrawStack(model, this.stacks[intersecStack[0]]); + } + else + { + List newStack = new List(); + List> tempStackList = new List>(); + + for (int k = 0; k < intersecStack.Count; k++) + { + tempStackList.Add(this.stacks[intersecStack[k]]); + newStack.AddRange(this.stacks[intersecStack[k]]); + } + + newStack.Add(model); + + for (int k = 0; k < tempStackList.Count; k++) + { + this.stacks.Remove(tempStackList[k]); + } + + this.stacks.Add(newStack); + + this.DrawStack(model, newStack); + } + } + } + + private void CheckStackRemove(AppointmentModel model) + { + int stackIndex = -1; + + for (int i = 0; i < this.stacks.Count; i++) + { + if (this.stacks[i].IndexOf(model) >= 0) + { + stackIndex = i; + } + } + + if (stackIndex >= 0) + { + this.stacks[stackIndex].Remove(model); + + this.DrawStack(null, this.stacks[stackIndex]); + + if (this.stacks[stackIndex].Count <= 1) + { + this.stacks.RemoveAt(stackIndex); + } + } + + int removeIndex = -1; + + for (int i = 0; i < this.UserCanvas.Children.Count; i++) + { + if ((this.UserCanvas.Children[i] as AppointmentCanvas).Is(model)) + { + removeIndex = i; + } + } + + if (removeIndex >= 0) + { + this.UserCanvas.Children.RemoveAt(removeIndex); + } + } + + private void DrawStack(AppointmentModel newModel, List stack) + { + for (int i = 0; i < stack.Count; i++) + { + if (stack[i].Equals(newModel)) + { + this.DrawApp(newModel, stack); + } + else + { + this.ManipulateAppCanvas(stack[i], i, stack.Count); + } + } + } + + private void ManipulateAppCanvas(AppointmentModel model, int stackIndex) + { + if (stackIndex < this.stacks.Count) + { + this.ManipulateAppCanvas(model, this.stacks[stackIndex]); + } + } + + private void ManipulateAppCanvas(AppointmentModel model, List list) + { + int index = list.IndexOf(model); + + if (index >= 0) + { + this.ManipulateAppCanvas(model, index, list.Count); + } + } + + private void ManipulateAppCanvas(AppointmentModel model, int index, int count) + { + AppointmentCanvas can = null; + + for (int i = 0; i < this.UserCanvas.Children.Count; i++) + { + if ((this.UserCanvas.Children[i] as AppointmentCanvas).Is(model)) + { + can = this.UserCanvas.Children[i] as AppointmentCanvas; + } + } + + if (can != null) + { + can.SetListPosition(index, count); } } private void DrawApp(AppointmentModel model, int stackIndex = -1) + { + if (stackIndex >= 0) + { + this.DrawApp(model, this.stacks[stackIndex]); + } + else + { + this.DrawApp(model, null); + } + } + + private void DrawApp(AppointmentModel model, List stack = null) { AppointmentCanvas newCan = new AppointmentCanvas(model, this.Date); + + newCan.DoubleTap += new EventHandler(model.OnCanvasClick); Binding widthBind = new Binding("ActualWidth"); widthBind.ElementName = "MainCanvas"; widthBind.Mode = BindingMode.OneWay; newCan.SetBinding(WidthProperty, widthBind); - if (stackIndex >= 0) + if (stack != null) { - newCan.SetListPosition(this.stacks[stackIndex]); + newCan.SetListPosition(stack); } this.UserCanvas.Children.Add(newCan);