Criel's Profile User Rating: -----

Reputation: 1 Apprentice
Active Members
Active Posts:
121 (0.11 per day)
11-March 11
Profile Views:
Last Active:
User is offline Yesterday, 06:42 AM

Previous Fields

Dream Kudos:
Icon   Criel has not set their status

Posts I've Made

  1. In Topic: Listview items not updating wpf

    Posted 9 Apr 2014

    Thanks for your reply

    Here's the code I currently have, I am setting the dataContext property of the listview to the observableCollection which has the entries I want added to the listview

    Public Class ObservableColl
        Public Structure Steps
            Private _Steps As List(Of String)
            Property Steps() As List(Of String)
                    Return _Steps
                End Get
                Set(ByVal value As List(Of String))
                    _Steps = value
                End Set
            End Property
        End Structure
        Dim songs As New ObservableCollection(Of Steps)
    End Class
     Private Sub CloseForm()
            Dim stepArr As String() = Split(sCommon.presetSteps, ",")
            Dim entries As New List(Of String)
            For i = 0 To stepArr.Count - 1
            sCommon.form1.entries.Add(New Steps With {.Steps = entries}) 'Add list entries to the observableCollection
            sCommon.form1.lvwCurrentSteps.DataContext = entries 'Assign the DataContext property to the observableCollection
            If Not PresetList Is Nothing Then 
                Me.Close() 'Close this form and focus returns to the main window
            End If
        End Sub
    <ListView Margin="49,23,0,33" HorizontalAlignment="Left" Width="230" Name="lvwCurrentSteps" SelectionMode="Multiple" ItemsSource="{Binding}" >
                    <Style TargetType="{x:Type ListViewItem}">
                        <Setter Property="BorderBrush" Value="LightGray" />
                        <Setter Property="BorderThickness" Value="0,0,0,1" />
                    <GridView x:Name="myGridView">
                        <GridViewColumn Width="220" Header="Steps to run"  DisplayMemberBinding="{Binding Path=Steps}">

    I can validate that there are items in the listview with this method but the listview doesn't 'refresh' with these values when focus returns to the original window.

  2. In Topic: Copy 2d array to any other list

    Posted 16 Jan 2014

    I am looking for a 2d list as well. A list meaning any other collection out there that's not an array, so a dictionary/List/Hasttable/HashSet

    Key was just an example of what I could use to search the whole collection, rather than using a for loop. So if I was able to convert it over to a 2d dictionary, I could search the whole dictionary values with just the Key or Value variables which I am hoping to copy over from the 2d array.
  3. In Topic: Copy 2d array to any other list

    Posted 16 Jan 2014

    To a different type of list entirely. What I'm looking for is I'm trying to reduce the amount of for loops I have, and to do that I was going to move the values of the array I originally looped through to find the value, to just be able to search for the key with a dictionary or hashtable hence removing the need to do multiple for loops, only just the one to convert or copy the array to a new list and then use that list from then on. 1d array aren't a problem but I guess i've never ran into this with 2d arrays before :)
  4. In Topic: When backgroundworker completes, how to give priority to update the UI

    Posted 14 Oct 2013

    @Modi - Perhaps I'm not understanding exactly what I thought a backgroundworker is for.

    Currently, I have functions that take some time to run through(.5s+) in the background worker as to not have the UI wait for those functions to complete before allowing the window to be responsive. My question is really geared only towards one of my functions I am calling(the biggest one taking up to a possible 2s). My thought logic was to move that to the BGW to begin running the functions prior to updating the labels on the form(around 50+). In my mind, if it takes the form an avg of 6+ with normally just to load the labels and comboboxes putting these time consuming functions in the background worker would actually cut down the response time by many seconds. But currently it's looking that everything I placed in the BGW such as combobox populate functions and the big functions actually are updated last on the GUI. I'm assuming because the UI thread hasn't completed from the original thread, it then updates the BGW functions to update the UI. Perhaps I am misunderstanding the use of a BGW.

    Note: The big functions are actually only updating some text boxes so it's just a few actual controls

    @Martyr2 - Perhaps I didn't give enough information. The BGW actually does make my form more responsive and shows information at a much more rapid pace(to me anyway) but I am more curious as to why my functions that update controls in the BGW are last to update the UI if I call the BGW well before the _load code actually begins to run.

    Regarding your note on delegates, I'm not too keen on these but I do believe you can use thread delegates to notify another thread. Like a BGW thread notifying the UI thread to update said control. I thought that since there's only one UI thread per application, that anything you would want to update control-wise would have to wait until the UI thread was free before you would be able to update any control on a form, regardless of delegates or not.

    Thanks for your time!!
  5. In Topic: Microchipping your children

    Posted 8 Oct 2013

    So I see it's a privacy thing. So what would you do if your child was taken? All you would be able to do is wait while the authorities find the person and who even knows if your child would still be alive by then. The world is a scary place and you can only do so much to keep your children safe. I'm not saying the chip is a good thing I'm just saying it gives you a fighting chance if this has is ever to happen to anyone. :)

My Information

Member Title:
D.I.C Head
Age Unknown
Birthday Unknown

Contact Information




Page 1 of 1
  1. Photo

    aleckie Icon

    09 Apr 2014 - 08:46
    hi are you a specialist in c++ ?
Page 1 of 1