Exemple #1
0
        public SidebarItem(ISidebarControl view) : base()
        {
            if (view.MenuLabel.Contains("_"))
            {
                Content = new AccessText()
                {
                    Text = view.MenuLabel
                }
            }
            ;
            else
            {
                Content = view.MenuLabel;
            }

            this.view = view as UserControl;

            Width     = 75;
            Height    = 25;
            Focusable = false;

            Canvas.SetTop(this.view, top);
            top += Width;

            try
            {
                Style = Application.Current.FindResource("btnSidebar") as Style;
            }
            catch { }

            LayoutTransform = new RotateTransform(90d);

            Click += button_Click;
        }
        void IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.PreviousButton = (Button)target;
                break;

            case 2:
                this.PreviousButtonText = (AccessText)target;
                break;

            case 3:
                this.ContinueButton = (Button)target;
                break;

            case 4:
                this.ContinueButtonText = (AccessText)target;
                break;

            case 5:
                this.CancelButton = (Button)target;
                break;

            case 6:
                this.CancelButtonText = (AccessText)target;
                break;

            default:
                this._contentLoaded = true;
                break;
            }
        }
        public SidebarItem(string name, UserControl view) : base()
        {
            if (name.Contains("_"))
            {
                Content = new AccessText()
                {
                    Text = name
                }
            }
            ;
            else
            {
                Content = name;
            }

            this.view = view;

            Width     = 75;
            Height    = 25;
            Focusable = false;

            try
            {
                Style = Application.Current.FindResource("btnSidebar") as Style;
            }
            catch { }

            LayoutTransform = new RotateTransform(90d);

            Click += button_Click;
        }
Exemple #4
0
        private void SetContent(MessageBoxResult messageBoxResult)
        {
            switch (messageBoxResult)
            {
            case MessageBoxResult.Yes:
                Content = new AccessText {
                    Text = YES
                };
                break;

            case MessageBoxResult.No:
                Content = new AccessText {
                    Text = NO
                };
                break;

            case MessageBoxResult.OK:
                Content = new AccessText {
                    Text = OK
                };
                break;

            case MessageBoxResult.Cancel:
                Content = new AccessText {
                    Text = CANCEL
                };
                break;
            }
        }
Exemple #5
0
        /// <inheritdoc />
        public override void OnApplyTemplate()
        {
            this.textRun  = this.GetTemplateChild("PART_TextRun") as AccessText;
            this.textRun2 = this.GetTemplateChild("PART_TextRun2") as AccessText;

            this.UpdateTextRun();
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="MainWindow"/> class
        /// </summary>
        public MainWindow()
        {
            this.InitializeComponent();

            this.Title = App.ApplicationTitle;
            AccessText text = new AccessText();

            text.TextWrapping  = TextWrapping.Wrap;
            text.TextAlignment = TextAlignment.Center;
            text.Text          = App.ApplicationTitle;
            appBanner.Content  = text;
            Uri iconUri = new Uri("pack://application:,,,/" + App.ApplicationIcon, UriKind.RelativeOrAbsolute);

            this.Icon = BitmapFrame.Create(iconUri);
            var bc = new BrushConverter();

            this.Background     = (Brush)bc.ConvertFrom(App.ApplicationBackground);
            SchemaLabel.Content = "Schema: " + App.Schema;

            if (ConfigurationManager.AppSettings["datapath"] != null)
            {
                DataFileTextBox.Text = ConfigurationManager.AppSettings["datapath"];
            }

            ComboBoxItem cbi;

            cbi = new ComboBoxItem
            {
                Name    = "CommaWithQuotes",
                Content = "Comma ,"
            };
            DelimiterCheckBox.Items.Add(cbi);

            cbi = new ComboBoxItem
            {
                Name    = "Semicolon",
                Content = "Semicolon ;"
            };
            DelimiterCheckBox.Items.Add(cbi);

            cbi = new ComboBoxItem
            {
                Name    = "Tab",
                Content = "Tab"
            };
            DelimiterCheckBox.Items.Add(cbi);

            cbi = new ComboBoxItem
            {
                Name    = "Pipe",
                Content = "Pipe (Vertical Bar) |"
            };

            DelimiterCheckBox.Items.Add(cbi);
        }
        protected override string?GetNameCore()
        {
            var result = base.GetNameCore();

            if (result is null && Owner.Header is string header)
            {
                result = AccessText.RemoveAccessKeyMarker(header);
            }

            return(result);
        }
Exemple #8
0
        private void LoadBorders()
        {
            NewsContainer.Children.Clear();
            for (int i = 0; i < News.Count; i++)
            {
                Border border = new Border();
                border.Height          = 200; border.Width = 290;
                border.Background      = Brushes.White;
                border.BorderThickness = new Thickness(0, 3, 0, 0);
                border.BorderBrush     = (SolidColorBrush)(new BrushConverter().ConvertFrom("#28D4CA"));
                DropShadowEffect dse = new DropShadowEffect();
                dse.Color = Color.FromRgb(224, 229, 233);


                border.Effect = dse;
                border.Margin = new Thickness(5);

                //if (i == 0)
                //    border.Margin = new Thickness(0, 0, 0, 20);
                //else
                //    border.Margin = new Thickness(20, 0, 0, 20);


                //----
                Grid grid = new Grid();

                grid.Margin = new Thickness(10);

                Label label = new Label();
                label.Foreground = Brushes.Black;

                AccessText at = new AccessText();
                at.TextWrapping = TextWrapping.WrapWithOverflow;
                at.Text         = News[i].Content;

                label.Content = at;

                Label label2 = new Label();
                label2.Foreground        = Brushes.Black;
                label2.Content           = News[i].CreatedAt;
                label2.VerticalAlignment = VerticalAlignment.Bottom;

                grid.Children.Add(label);
                grid.Children.Add(label2);


                border.Child = grid;

                NewsContainer.Children.Add(border);
            }
        }
Exemple #9
0
        /// <summary>Gets the text label of the <see cref="T:System.Windows.Controls.TabItem" /> that is associated with this <see cref="T:System.Windows.Automation.Peers.TabItemAutomationPeer" />. Called by <see cref="M:System.Windows.Automation.Peers.AutomationPeer.GetName" />.</summary>
        /// <returns>The string that contains the label. If set, this method returns the value of the <see cref="P:System.Windows.Automation.AutomationProperties.Name" /> property; otherwise this method will return the value of the <see cref="P:System.Windows.Controls.HeaderedContentControl.Header" /> property.</returns>
        // Token: 0x06002814 RID: 10260 RVA: 0x000BB764 File Offset: 0x000B9964
        protected override string GetNameCore()
        {
            string nameCore = base.GetNameCore();

            if (!string.IsNullOrEmpty(nameCore))
            {
                TabItem tabItem = base.GetWrapper() as TabItem;
                if (tabItem != null && tabItem.Header is string)
                {
                    return(AccessText.RemoveAccessKeyMarker(nameCore));
                }
            }
            return(nameCore);
        }
        /// <summary>Gets the text label of the <see cref="T:System.Windows.Controls.Label" /> that is associated with this <see cref="T:System.Windows.Automation.Peers.LabelAutomationPeer" />. This method is called by <see cref="M:System.Windows.Automation.Peers.AutomationPeer.GetName" />.</summary>
        /// <returns>The string that contains the label.</returns>
        // Token: 0x06002766 RID: 10086 RVA: 0x000B9F74 File Offset: 0x000B8174
        protected override string GetNameCore()
        {
            string nameCore = base.GetNameCore();

            if (!string.IsNullOrEmpty(nameCore))
            {
                Label label = (Label)base.Owner;
                if (label.Content is string)
                {
                    return(AccessText.RemoveAccessKeyMarker(nameCore));
                }
            }
            return(nameCore);
        }
        /// <summary>Gets the text label of the <see cref="T:System.Windows.ContentElement" /> that is associated with this <see cref="T:System.Windows.Automation.Peers.ContentElementAutomationPeer" />. Called by <see cref="M:System.Windows.Automation.Peers.AutomationPeer.GetName" />.</summary>
        /// <returns>The string that contains the label.</returns>
        // Token: 0x060026E2 RID: 9954 RVA: 0x000B83F4 File Offset: 0x000B65F4
        protected override string GetNameCore()
        {
            string nameCore = base.GetNameCore();

            if (!string.IsNullOrEmpty(nameCore))
            {
                GroupBox groupBox = (GroupBox)base.Owner;
                if (groupBox.Header is string)
                {
                    return(AccessText.RemoveAccessKeyMarker(nameCore));
                }
            }
            return(nameCore);
        }
Exemple #12
0
        /// <summary>Gets the text label of the <see cref="T:System.Windows.Controls.MenuItem" /> that is associated with this <see cref="T:System.Windows.Automation.Peers.MenuItemAutomationPeer" />. Called by <see cref="M:System.Windows.Automation.Peers.AutomationPeer.GetName" />.</summary>
        /// <returns>The string that contains the label.</returns>
        // Token: 0x06002791 RID: 10129 RVA: 0x000BA4DC File Offset: 0x000B86DC
        protected override string GetNameCore()
        {
            string nameCore = base.GetNameCore();

            if (!string.IsNullOrEmpty(nameCore))
            {
                MenuItem menuItem = (MenuItem)base.Owner;
                if (menuItem.Header is string)
                {
                    return(AccessText.RemoveAccessKeyMarker(nameCore));
                }
            }
            return(nameCore);
        }
        // Return the base without the AccessKey character
        ///
        override protected string GetNameCore()
        {
            string result = base.GetNameCore();

            if (!string.IsNullOrEmpty(result))
            {
                TabItem tabItem = GetWrapper() as TabItem;
                if ((tabItem != null) && (tabItem.Header is string))
                {
                    return(AccessText.RemoveAccessKeyMarker(result));
                }
            }

            return(result);
        }
Exemple #14
0
 private void UpdateTextLabel(Label label, string text)
 {
     label.Dispatcher.BeginInvoke(new Action(() =>
     {
         if (label.Content is AccessText)
         {
             AccessText accessText = label.Content as AccessText;
             accessText.Text       = text;
         }
         else
         {
             label.Content = text;
         }
     }));
 }
        // Return the base without the AccessKey character
        ///
        override protected string GetNameCore()
        {
            string result = base.GetNameCore();

            if (!string.IsNullOrEmpty(result))
            {
                MenuItem menuItem = (MenuItem)Owner;
                if (menuItem.Header is string)
                {
                    return(AccessText.RemoveAccessKeyMarker(result));
                }
            }

            return(result);
        }
Exemple #16
0
        // Return the base without the AccessKey character
        ///
        override protected string GetNameCore()
        {
            string result = base.GetNameCore();

            if (!string.IsNullOrEmpty(result))
            {
                Label label = (Label)Owner;
                if (label.Content is string)
                {
                    return(AccessText.RemoveAccessKeyMarker(result));
                }
            }

            return(result);
        }
        // Return the base without the AccessKey character
        ///
        override protected string GetNameCore()
        {
            string result = base.GetNameCore();

            if (!string.IsNullOrEmpty(result))
            {
                GroupBox groupBox = (GroupBox)Owner;
                if (groupBox.Header is string)
                {
                    return(AccessText.RemoveAccessKeyMarker(result));
                }
            }

            return(result);
        }
Exemple #18
0
        private void CopyPrivateAddressToClipBoard()
        {
            PrivateKeyAddressLabel.Dispatcher.BeginInvoke(new Action(() =>
            {
                string pk = string.Empty;

                if (PrivateKeyAddressLabel.Content is AccessText)
                {
                    AccessText accessText = PrivateKeyAddressLabel.Content as AccessText;
                    pk = accessText.Text;

                    Clipboard.SetText(pk);
                    MessageBox.Show($"Your private key has been copied to your clipboard - make sure you clear it as soon as possible.");
                }
            }));
        }
Exemple #19
0
        public override object ProvideValue(IServiceProvider serviceProvider)
        {
            var accessText = new AccessText();

            var markupExtension = Text as MarkupExtension;

            if (markupExtension != null)
            {
                accessText.SetValue(AccessText.TextProperty, markupExtension.ProvideValue(serviceProvider));
            }
            else
            {
                accessText.SetValue(AccessText.TextProperty, Text);
            }

            return(accessText);
        }
Exemple #20
0
        private TextBlock FindText(Visual root)
        {
            // Cases where the root is itself a TextBlock
            TextBlock text = root as TextBlock;

            if (text != null)
            {
                return(text);
            }

            ContentPresenter cp = root as ContentPresenter;

            if (cp != null)
            {
                if (VisualTreeHelper.GetChildrenCount(cp) == 1)
                {
                    DependencyObject child = VisualTreeHelper.GetChild(cp, 0);

                    // Cases where the child is a TextBlock
                    TextBlock textBlock = child as TextBlock;
                    if (textBlock == null)
                    {
                        AccessText accessText = child as AccessText;
                        if (accessText != null &&
                            VisualTreeHelper.GetChildrenCount(accessText) == 1)
                        {
                            // Cases where the child is an AccessText whose child is a TextBlock
                            textBlock = VisualTreeHelper.GetChild(accessText, 0) as TextBlock;
                        }
                    }
                    return(textBlock);
                }
            }
            else
            {
                AccessText accessText = root as AccessText;
                if (accessText != null &&
                    VisualTreeHelper.GetChildrenCount(accessText) == 1)
                {
                    // Cases where the root is an AccessText whose child is a TextBlock
                    return(VisualTreeHelper.GetChild(accessText, 0) as TextBlock);
                }
            }
            return(null);
        }
Exemple #21
0
        void IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.DocumentRoot = (StackPanel)target;
                break;

            case 2:
                this.AcceptButton = (Button)target;
                break;

            case 3:
                this.ContinueButtonText = (AccessText)target;
                break;

            default:
                this._contentLoaded = true;
                break;
            }
        }
        // Return the base without the AccessKey character
        ///
        override protected string GetNameCore()
        {
            string     result = base.GetNameCore();
            ButtonBase bb     = (ButtonBase)Owner;

            if (!string.IsNullOrEmpty(result))
            {
                if (bb.Content is string)
                {
                    result = AccessText.RemoveAccessKeyMarker(result);
                }
            }
            else
            {
                RoutedUICommand uiCommand = bb.Command as RoutedUICommand;
                if (uiCommand != null && !string.IsNullOrEmpty(uiCommand.Text))
                {
                    result = uiCommand.Text;
                }
            }
            return(result);
        }
        /// <summary>Gets the name of the class of the element associated with this <see cref="T:System.Windows.Automation.Peers.ButtonBaseAutomationPeer" />. Called by <see cref="M:System.Windows.Automation.Peers.AutomationPeer.GetName" />.</summary>
        /// <returns>A string that contains the class name, minus the accelerator key.</returns>
        // Token: 0x06002523 RID: 9507 RVA: 0x000B3088 File Offset: 0x000B1288
        protected override string GetNameCore()
        {
            string     text       = base.GetNameCore();
            ButtonBase buttonBase = (ButtonBase)base.Owner;

            if (!string.IsNullOrEmpty(text))
            {
                if (buttonBase.Content is string)
                {
                    text = AccessText.RemoveAccessKeyMarker(text);
                }
            }
            else
            {
                RoutedUICommand routedUICommand = buttonBase.Command as RoutedUICommand;
                if (routedUICommand != null && !string.IsNullOrEmpty(routedUICommand.Text))
                {
                    text = routedUICommand.Text;
                }
            }
            return(text);
        }
Exemple #24
0
        // Token: 0x06005BFB RID: 23547 RVA: 0x0019DC88 File Offset: 0x0019BE88
        private TextBlock FindText(Visual root)
        {
            TextBlock textBlock = root as TextBlock;

            if (textBlock != null)
            {
                return(textBlock);
            }
            ContentPresenter contentPresenter = root as ContentPresenter;

            if (contentPresenter != null)
            {
                if (VisualTreeHelper.GetChildrenCount(contentPresenter) == 1)
                {
                    DependencyObject child      = VisualTreeHelper.GetChild(contentPresenter, 0);
                    TextBlock        textBlock2 = child as TextBlock;
                    if (textBlock2 == null)
                    {
                        AccessText accessText = child as AccessText;
                        if (accessText != null && VisualTreeHelper.GetChildrenCount(accessText) == 1)
                        {
                            textBlock2 = (VisualTreeHelper.GetChild(accessText, 0) as TextBlock);
                        }
                    }
                    return(textBlock2);
                }
            }
            else
            {
                AccessText accessText2 = root as AccessText;
                if (accessText2 != null && VisualTreeHelper.GetChildrenCount(accessText2) == 1)
                {
                    return(VisualTreeHelper.GetChild(accessText2, 0) as TextBlock);
                }
            }
            return(null);
        }
        public void AddToolBarCommands(IReadOnlyList <ToolBarCommand> commands)
        {
            int index = 0;

            foreach (var command in commands)
            {
                AccessText accessText = new AccessText()
                {
                    Text = command.Text
                };
                Button button = new Button()
                {
                    Content = accessText, Command = command.Command
                };
                if (!string.IsNullOrEmpty(command.ToolTip))
                {
                    button.ToolTip = command.ToolTip;
                }

                toolBar.Items.Insert(index, button);
                dynamicToolBarItems.Add(button);
                index += 1;
            }
        }
 public static IObservable <EventPattern <MouseButtonEventArgs> > MouseLeftButtonDownObserver(this AccessText This)
 {
     return(Observable.FromEventPattern <MouseButtonEventHandler, MouseButtonEventArgs>(h => This.MouseLeftButtonDown += h, h => This.MouseLeftButtonDown -= h));
 }
        async void GetResolvedTasks(string requester)
        {
            _client = new FireSharp.FirebaseClient(config);

            FirebaseResponse getResponse = null;

            List <Tasks> AllResolvedUserTasks = new List <Tasks>();

            try
            {
                getResponse = await _client.GetAsync("Users/" + requester + "/userTasks");

                var result = getResponse.ResultAs <currentTask>();

                if (result.first != "")
                {
                    getResponse = await _client.GetAsync("Tasks/" + result.first);

                    var firstTask = getResponse.ResultAs <Tasks>();
                    if (firstTask.status == "Resolved")
                    {
                        AllResolvedUserTasks.Add(firstTask);
                    }
                }
                if (result.second != "")
                {
                    getResponse = await _client.GetAsync("Tasks/" + result.second);

                    var secondTask = getResponse.ResultAs <Tasks>();
                    if (secondTask.status == "Resolved")
                    {
                        AllResolvedUserTasks.Add(secondTask);
                    }
                }
                if (result.third != "")
                {
                    getResponse = await _client.GetAsync("Tasks/" + result.third);

                    var thirdTask = getResponse.ResultAs <Tasks>();
                    if (thirdTask.status == "Resolved")
                    {
                        AllResolvedUserTasks.Add(thirdTask);
                    }
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
            }

            wrapPanel1.Children.Clear();

            foreach (var OneTask in AllResolvedUserTasks)
            {
                Border myBorder1 = new Border();
                myBorder1.Background      = Brushes.White;
                myBorder1.BorderBrush     = Brushes.Black;
                myBorder1.BorderThickness = new Thickness(1);
                myBorder1.Margin          = new Thickness(0, 0, 10, 10);

                Label Name = new Label();
                Name.Content = OneTask.name;

                var bc = new BrushConverter();
                Name.Background = (Brush)bc.ConvertFrom("#FF70B8E8");
                Name.Foreground = new SolidColorBrush(Colors.White);

                Label Owner = new Label();
                Owner.Content    = OneTask.owner;
                Owner.Margin     = new Thickness(0, 1, 0, 0);
                Owner.Background = (Brush)bc.ConvertFrom("#FF70B8E8");
                Owner.Foreground = new SolidColorBrush(Colors.White);

                Label Status = new Label();
                Status.Content    = OneTask.status;
                Status.Foreground = new SolidColorBrush(Colors.Black);

                StackPanel st = new StackPanel();
                st.Orientation = Orientation.Vertical;

                st.Children.Add(Name);
                st.Children.Add(Owner);
                st.Children.Add(Status);


                AccessText mess = new AccessText();
                mess.Text         = "Waiting for access";
                mess.TextWrapping = TextWrapping.Wrap;
                mess.Height       = double.NaN;
                mess.Foreground   = new SolidColorBrush(Colors.ForestGreen);

                st.Children.Add(mess);

                myBorder1.Child = st;
                myBorder1.Tag   = OneTask.id;
                wrapPanel1.Children.Add(myBorder1);
            }
        }
Exemple #28
0
        void IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.DocumentRoot = (StackPanel)target;
                break;

            case 2:
                this.HaveProductKeyButton = (RadioButton)target;
                break;

            case 3:
                this.KeyValueEditor = (ProductKeyEditControl)target;
                break;

            case 4:
                ((Hyperlink)target).Click += new RoutedEventHandler(this.NavigateToNavigateUri);
                break;

            case 5:
                ((Hyperlink)target).Click += new RoutedEventHandler(this.NavigateToNavigateUri);
                break;

            case 6:
                this.ActivateCheckBox = (CheckBox)target;
                break;

            case 7:
                this.ContinueTrialButton = (RadioButton)target;
                break;

            case 8:
                this.ContinueTrialButtonText = (TextBlock)target;
                break;

            case 9:
                ((Hyperlink)target).Click += new RoutedEventHandler(this.NavigateToNavigateUri);
                break;

            case 10:
                ((Hyperlink)target).Click += new RoutedEventHandler(this.NavigateToNavigateUri);
                break;

            case 11:
                this.ProgressAnimation = (ProgressAnimationControl)target;
                break;

            case 12:
                this.AcceptButton = (Button)target;
                break;

            case 13:
                this.ShieldImage = (Image)target;
                break;

            case 14:
                this.ContinueButtonText = (AccessText)target;
                break;

            case 15:
                this.CancelButton = (Button)target;
                break;

            case 16:
                this.CancelButtonText = (AccessText)target;
                break;

            default:
                this._contentLoaded = true;
                break;
            }
        }
Exemple #29
0
 internal MessageBoxResultButton(string content)
 {
     Content = new AccessText {
         Text = content
     };
 }
Exemple #30
0
        /// <summary>
        /// Tilføjer en log som man skal kunne læse
        /// </summary>
        /// <param name="dato">Dato`en</param>
        /// <param name="textlog">Log tekst</param>
        private void AddLogs(string dato, string textlog)
        {
            //opretter en grid som vil indeholde log elementer
            Grid gridBox = new Grid();

            gridBox.Background = Brushes.LightGray;

            //sæt rækker på grid
            for (int i = 0; i < 3; i++)
            {
                RowDefinition newRow = new RowDefinition();
                newRow.Height = GridLength.Auto;
                gridBox.RowDefinitions.Add(newRow);
            }
            //start grid række id
            int RowIndex = gridBox.RowDefinitions.Count - 3;


            //Sæt dato`en
            Label dateLabel_Text = new Label();

            dateLabel_Text.Content             = dato;
            dateLabel_Text.FontWeight          = FontWeights.Bold;
            dateLabel_Text.Margin              = new Thickness(5, 10, 0, 0);
            dateLabel_Text.VerticalAlignment   = VerticalAlignment.Top;
            dateLabel_Text.HorizontalAlignment = HorizontalAlignment.Left;

            //Sæt log tekst
            AccessText accessFreeText = new AccessText();

            accessFreeText.TextWrapping = TextWrapping.WrapWithOverflow;
            accessFreeText.Text         = textlog;

            Label freeTextLabel = new Label();

            freeTextLabel.Content             = accessFreeText;
            freeTextLabel.Width               = 790;
            freeTextLabel.MaxWidth            = 790;
            freeTextLabel.MinHeight           = 30;
            freeTextLabel.Margin              = new Thickness(5, 0, 5, 5);
            freeTextLabel.FontWeight          = FontWeights.Normal;
            freeTextLabel.VerticalAlignment   = VerticalAlignment.Top;
            freeTextLabel.HorizontalAlignment = HorizontalAlignment.Left;
            freeTextLabel.Background          = Brushes.White;

            //gør så links/dokumenter kommer til at
            //stå lige ved siden af hinanden
            WrapPanel LinkBoxWrapPanel = new WrapPanel();

            LinkBoxWrapPanel.Name                = "WrapPanel_AddFile_" + logAdded;
            LinkBoxWrapPanel.Margin              = new Thickness(10);
            LinkBoxWrapPanel.MaxWidth            = 790;
            LinkBoxWrapPanel.VerticalAlignment   = VerticalAlignment.Top;
            LinkBoxWrapPanel.HorizontalAlignment = HorizontalAlignment.Left;
            this.RegisterName("WrapPanel_AddFile_" + logAdded, LinkBoxWrapPanel);

            //sæt elemter på de rigtige rækker i grid
            Grid.SetRow(dateLabel_Text, RowIndex);
            Grid.SetRow(freeTextLabel, RowIndex + 1);
            Grid.SetRow(LinkBoxWrapPanel, RowIndex + 2);

            gridBox.Children.Add(dateLabel_Text);
            gridBox.Children.Add(freeTextLabel);
            gridBox.Children.Add(LinkBoxWrapPanel);

            //lav border på gridbox
            Border borderBox = new Border();

            borderBox.BorderThickness = new Thickness(1, 1, 1, 1);
            borderBox.Margin          = new Thickness(0, 10, 0, 0);
            borderBox.BorderBrush     = Brushes.Black;
            borderBox.Child           = gridBox;

            //tilføj gridbox til den store grid
            Grid_FreeText.RowDefinitions.Add(new RowDefinition());

            int gridRows = Grid_FreeText.RowDefinitions.Count - 1;

            Grid.SetRow(borderBox, gridRows);
            Grid_FreeText.Children.Add(borderBox);

            logAdded++;
        }