Winforms start change postion of Radtileelement

6 posts, 0 answers
  1. Rene
    Rene avatar
    8 posts
    Member since:
    Mar 2013

    Posted 27 May 2014 Link to this post

    Hi I have a friend looked at the trail version and now we have a question to the panorama .

    We have DemoHub 2-3 creates new tile and these assigned with Row and Column . Then we have saved with a button click event the values ​​of each Radtileelement in the registry .
    example:
    RegistryKey name = ( Radtileelement.Name )
    Value ( group = GroupName )
    Value ( row = Radtileelement.row )
    Value (Column = Radtileelement.Column )

    Now we want to read the registry and then adjust the RadTileElements so with the values ​​of the registry when starting the Winforms .

    e.g.
     For Each item As RadTileElement In radPanorama1.Items
                        If item.Name RegistryKey = Name Then
                            item.Column = Column
                            item.Row = row
                        end If
                    Next

    Unfortunately we did not get it back .

    PS: The aim should be that each user as he has relocated with a button we write it in his tile the regedit and then the positions are taken when starting saved it .


    Sorry for my bad English
  2. Rene
    Rene avatar
    8 posts
    Member since:
    Mar 2013

    Posted 27 May 2014 in reply to Rene Link to this post

    We have also tried yet.

      Dim RadGroup As TileGroupElement = radPanorama1.Groups.Item (Regkeygroupname)

                     For Each item As RadTileElement In RadGroup.Items
                         If item.Name = MainKeyName Then
                             item.Column = col
                             item.Row = row
                         end If
                         Console.WriteLine (item.Column)
                     Next


    error:
    Implicit conversion from 'Telerik.WinControls.RadItem "in" Telerik.WinControls.UI.TileGroupElement
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Dimitar
    Admin
    Dimitar avatar
    1404 posts

    Posted 30 May 2014 Link to this post

    Hi Rene,

    Thank you for writing.

    If I understand correctly you want to save and restore the tile positions upon application reopening. To show you how this can be achieved I have created a sample application where you can save and load the tiles position in a xml file (you can use another approach for the object serialization if you want). Could you please check it and let me know how it fits in your scenario?

    I am looking forward to your reply.

    Regards,
    Dimitar
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  5. Rene
    Rene avatar
    8 posts
    Member since:
    Mar 2013

    Posted 30 May 2014 Link to this post

    Yes that's what I look for when I test your programs and click the Load button crashes the software.


    An exception of type 'System.Reflection.TargetInvocationException' occurred in mscorlib.dll.

    {"Target of an invocation has caused an exception."}
  6. Rene
    Rene avatar
    8 posts
    Member since:
    Mar 2013

    Posted 30 May 2014 in reply to Rene Link to this post

    Could you give me an example with a group and 4 items.

    e.g. so it is not
    DirectCast (radPanorama1.Groups ("GroupName). Items (" Radtile1 "), RadTileElement). = Column 1
  7. Dimitar
    Admin
    Dimitar avatar
    1404 posts

    Posted 02 Jun 2014 Link to this post

    Hi Rene,

    Thank you for writing back. 

    On my side this works as expected. Nevertheless could you please check the exception details and see what is the inner exception? Also please make sure that you have saved the layout first.

    I am looking forward to your reply.

    Regards,
    Dimitar
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
Back to Top
UI for WinForms is Visual Studio 2017 Ready